[Bug 269637] sysutils/nix: build fails - linker issues - undefined symbols from AWS libs

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 28 Feb 2023 21:48:32 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269637

John Hein <jcfyecrayz@liamekaens.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #240342|0                           |1
        is obsolete|                            |
 Attachment #240342|maintainer-approval?(0mp@Fr |
              Flags|eeBSD.org)                  |
 Attachment #240491|                            |maintainer-approval?(0mp@Fr
              Flags|                            |eeBSD.org)

--- Comment #3 from John Hein <jcfyecrayz@liamekaens.com> ---
Created attachment 240491
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=240491&action=edit
[patch] update nix to 2.13.2 - resolves aws linking issues (v2)

Here is an update to the previous patch to include missing deps now needed for
1.13.2, get non-default PREFIX working, and get 'make test' fully working.

In a bit more detail v2 includes the following changes missed in the previous
patch:

- Add missing build deps: googletest, jq, nlohmann-json
- Add missing lib deps: USES+=libarchive
- Change HAS_CONFIGURE to GNU_CONFIGURE to get PREFIX working
- Specify GNU_CONFIGURE_MANPREFIX in share/ (matches plist) - needed after
   switch to GNU_CONFIGURE which specifies --mandir.
- Use static patches instead of REINPLACE_CMD for linux/freebsd test
   compatibility fixes (sed -i, wc -l, GNU vs BSD cmp & touch).  Some
   of these could be upstreamed.
- Fix getSelfExe for FreeBSD [[1]].  The patch for this can be
   submitted upstream.
- Update _ALL_TESTS (also see files/Makefile.regentestlist to help
   future developers when updating this port - the previous comment
   instructions for updating _ALL_TESTS do not work for 2.13.2).

QA:
 poudriere testport -P (ok - 12-stable (amd64 & i386))
 portlint, portclippy (ok)
 'make test' (ok, amd64)


[[1]] The getSelfExe() fix was noticed when the tests/flakes/flakes.sh test was
run:

    error: executing 'nix': No such file or directory
    error:
           … while reading the response from the build hook

The reason is that src/libstore/build/hook-instance.c uses execv(3) which does
not use PATH from the environment (like execvp(3)).  So it needs a full path to
the executable.  And with the failure of getSelfExe() (before the patch), it
would just use "nix" (instead of "/usr/local/bin/nix").  Hence the ENOENT
failure.

-- 
You are receiving this mail because:
You are the assignee for the bug.