Build failure for clisp: bug or problematic linker?

I was going to post an issue on the nixpkgs repo but thought it better to ask first since I was unsure.

I’m on aarch-64-darwin with nixpkgs unstable and was building texliveFull > xindy > clisp. clisp doesn’t build because of:

       >
       > ;; MODPREP: 270 objects, 39 DEFUNs
       > ;; packages: ("RAWSOCK")
       > MODPREP: wrote rawsock.m.c (222,279 bytes)
       > clang -I/private/tmp/nix-build-clisp-2.50pre20230112.drv-0/source/src -I/private/tmp/nix-build-clisp-2.50pre20230112.drv-0/source/builddir/gllib -I/private/tmp/nix-build-clisp-2.50pre20230112.drv-0/source/src/gllib -g -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wreturn-type -Wmissing-declarations -Wimplicit -Wno-sign-compare -Wno-format-nonliteral -Wno-shift-negative-value -O2 -fwrapv -fPIC -fno-strict-aliasing -DUNIX_BINARY_DISTRIB -DNO_ASM -DNO_ARI_ASM -DNO_SP_ASM -DNO_FAST_DISPATCH -DNO_FAST_FLOAT -DNO_FAST_DOUBLE -DNO_ALLOCA -DNO_ADDRESS_SPACE_ASSUMPTIONS -DNO_GENERATIONAL_GC -DNO_SYMBOLFLAGS -DENABLE_UNICODE -DDYNAMIC_MODULES  -fno-common -DPIC -I. -I/private/tmp/nix-build-clisp-2.50pre20230112.drv-0/source/builddir/linkkit \
       >  -c rawsock.m.c -o rawsock.o
       > /private/tmp/nix-build-clisp-2.50pre20230112.drv-0/source/modules/rawsock/rawsock.c:1894:48: warning: unused parameter 'module' [-Wunused-parameter]
       >  1894 | void module__rawsock__fini_function (module_t* module)
       >       |                                                ^
       > 1 warning generated.
       > ln -s /private/tmp/nix-build-clisp-2.50pre20230112.drv-0/source/modules/rawsock/preload.lisp .
       > make[1]: Leaving directory '/private/tmp/nix-build-clisp-2.50pre20230112.drv-0/source/builddir/rawsock'
       > rm -rf full
       > rm -rf dynmod; mkdir dynmod
       > MAKE=make CLISP="/private/tmp/nix-build-clisp-2.50pre20230112.drv-0/source/builddir/clisp  -E UTF-8 -Emisc 1:1 -norc" ./clisp-link add base full asdf pcre rawsock || (rm -rf full ; exit 1)
       > make[1]: Entering directory '/private/tmp/nix-build-clisp-2.50pre20230112.drv-0/source/builddir/asdf'
       > make[1]: Nothing to be done for 'clisp-module'.
       > make[1]: Leaving directory '/private/tmp/nix-build-clisp-2.50pre20230112.drv-0/source/builddir/asdf'
       > make[1]: Entering directory '/private/tmp/nix-build-clisp-2.50pre20230112.drv-0/source/builddir/pcre'
       > make[1]: Nothing to be done for 'clisp-module'.
       > make[1]: Leaving directory '/private/tmp/nix-build-clisp-2.50pre20230112.drv-0/source/builddir/pcre'
       > clang -dynamiclib -undefined dynamic_lookup -no_fixup_chains -o /private/tmp/nix-build-clisp-2.50pre20230112.drv-0/source/builddir/dynmod/lib-pcre.dylib cpcre.o -lpcre -g -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wreturn-type -Wmissing-declarations -Wimplicit -Wno-sign-compare -Wno-format-nonliteral -Wno-shift-negative-value -O2 -fwrapv -fPIC -fno-strict-aliasing -DUNIX_BINARY_DISTRIB -DNO_ASM -DNO_ARI_ASM -DNO_SP_ASM -DNO_FAST_DISPATCH -DNO_FAST_FLOAT -DNO_FAST_DOUBLE -DNO_ALLOCA -DNO_ADDRESS_SPACE_ASSUMPTIONS -DNO_GENERATIONAL_GC -DNO_SYMBOLFLAGS -DENABLE_UNICODE -DDYNAMIC_MODULES -fno-common -DPIC -install_name /lib-pcre.dylib
       > clang: error: unknown argument: '-no_fixup_chains'
       > ./clisp-link: failed in /private/tmp/nix-build-clisp-2.50pre20230112.drv-0/source/builddir/full
       > make: *** [Makefile:2358: full] Error 1

I checked that ld has the flag, so I’m not sure if my clang is the problem, or if this build error is an actual bug. I checked from the previous revision 041c867bad68dfe34b78b2813028a2e2ea70a23c that I was on, but it builds fine on that. I checked the commit history but can’t tell what changed either; the last commit to the flake was January 7th (ba353096c979b75e9da892e9ae0542e47700e826). Any thoughts?

1 Like

Getting this as well on aarch64-darwin as well.

This was solved and merged into unstable: https://nixpk.gs/pr-tracker.html?pr=377410.