Bug#987130: libcrypt-dev makes sysvinit FTBFS: ./src/sulogin.c:978: undefined reference to `crypt'
On Apr 18, Helmut Grohne wrote: > One aspect to this certainly is that the .pc files are now located in > /lib, which is wrong as pkg-config does not search that directory. I've I am not even sure that there is any point in having a .pc file for libcrypt (and I highly doubt that anything uses it), but I will fix this later in a simpler way. -- ciao, Marco signature.asc Description: PGP signature
Bug#987130: libcrypt-dev makes sysvinit FTBFS: ./src/sulogin.c:978: undefined reference to `crypt'
Control: affects -1 = Control: clone -1 -2 Control: reassign -2 src:sysvinit Control: retitle -2 sysvinit FTBFS: broken check for presence of -lcrypt Control: tags -2 + patch Control: tags -1 - ftbfs Control: retitle -1 libcrypt-dev misplaced pkg-config files On Sun, Apr 18, 2021 at 10:44:17AM +0200, Helmut Grohne wrote: > One aspect to this certainly is that the .pc files are now located in > /lib, which is wrong as pkg-config does not search that directory. I've > attempted fixing this aspect and am attaching a patch for that. > Unfortunately, this does not fix sysvinit. There must be something else > to this. I looked into the sysvinit side now and the way it detectd -lcrypt is ... broken. It quite simply cannot be fixed in libxcrypt. Please find a patch for sysvinit attached that fixes the ftbfs in a general way, that is without hardcoding random library search paths. I've cloned a bug for this as -2. I'm leaving the original -1 bug around, because the issue around pkg-config files needs to be addressed as well. What a mess. Helmut --- sysvinit-2.96.orig/src/Makefile +++ sysvinit-2.96/src/Makefile @@ -89,15 +89,8 @@ SULOGINLIBS = endif -# Additional libs for GNU libc. -ifneq ($(wildcard /usr/lib*/libcrypt.*),) - SULOGINLIBS += -lcrypt -endif - -# Additional libs for GNU libc / multiarch on Debian based systems. -ifneq ($(wildcard /usr/lib/*/libcrypt.*),) - SULOGINLIBS += -lcrypt -endif +# Add -lcrypt if available. Needed with GNU libc or libxcrypt. +SULOGINLIBS += $(shell $(CC) -shared -x c /dev/null -o /dev/null -lcrypt 2>/dev/null && echo -lcrypt) all: $(BIN) $(SBIN) $(USRBIN)
Bug#987130: libcrypt-dev makes sysvinit FTBFS: ./src/sulogin.c:978: undefined reference to `crypt'
On Sun, Apr 18, 2021 at 10:26:44AM +0200, Helmut Grohne wrote: > Not yet seen by reproducible, but I've rescheduled a build there. Likely > a matter of waiting. It also fails there now: https://tests.reproducible-builds.org/debian/rbuild/unstable/amd64/sysvinit_2.96-6.rbuild.log.gz One aspect to this certainly is that the .pc files are now located in /lib, which is wrong as pkg-config does not search that directory. I've attempted fixing this aspect and am attaching a patch for that. Unfortunately, this does not fix sysvinit. There must be something else to this. Helmut diff --minimal -Nru libxcrypt-4.4.18/debian/changelog libxcrypt-4.4.18/debian/changelog --- libxcrypt-4.4.18/debian/changelog 2021-04-17 04:04:04.0 +0200 +++ libxcrypt-4.4.18/debian/changelog 2021-04-18 10:37:07.0 +0200 @@ -1,3 +1,10 @@ +libxcrypt (1:4.4.18-3.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix location of .pc files. + + -- Helmut Grohne Sun, 18 Apr 2021 10:37:07 +0200 + libxcrypt (1:4.4.18-3) unstable; urgency=high [ Ivo De Decker ] diff --minimal -Nru libxcrypt-4.4.18/debian/rules libxcrypt-4.4.18/debian/rules --- libxcrypt-4.4.18/debian/rules 2021-04-17 03:43:28.0 +0200 +++ libxcrypt-4.4.18/debian/rules 2021-04-18 10:37:06.0 +0200 @@ -1,5 +1,7 @@ #!/usr/bin/make -f +include /usr/share/dpkg/architecture.mk + DOPACKAGES := $(shell dh_listpackages) BUILD_TARGETS := @@ -98,6 +100,8 @@ ifeq ($(BUILD_DEV_VER), 1) dh_movefiles -plibcrypt-dev --sourcedir=debian/libcrypt1/ + mkdir -p debian/libcrypt-dev/usr/lib/$(DEB_HOST_MULTIARCH) + mv debian/libcrypt-dev/lib/$(DEB_HOST_MULTIARCH)/pkgconfig debian/libcrypt-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig else cd $D && echo $(shell sed -re 's#^/##' $(CURDIR)/debian/libcrypt-dev.files) | xargs echo rm -rf endif @@ -112,6 +116,8 @@ ifeq ($(BUILD_DEV_VER), 2) dh_movefiles -plibcrypt-dev --sourcedir=debian/libcrypt2/ + mkdir -p debian/libcrypt-dev/usr/lib/$(DEB_HOST_MULTIARCH) + mv debian/libcrypt-dev/lib/$(DEB_HOST_MULTIARCH)/pkgconfig debian/libcrypt-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig else cd $(D2) && echo $(shell sed -re 's#^/##' $(CURDIR)/debian/libcrypt-dev.files) | xargs echo rm -rf endif
Bug#987130: libcrypt-dev makes sysvinit FTBFS: ./src/sulogin.c:978: undefined reference to `crypt'
Package: libcrypt-dev Version: 1:4.4.18-3 Severity: serious Tags: ftbfs Control: affects -1 + src:sysvinit User: helm...@debian.org Usertags: rebootstrap X-Debbugs-Cc: iv...@debian.org Since the latest libxcrypt upload, sysvinit fails to build from source. A build on amd64 ends with: | cc -Wl,-z,relro -Wl,-z,now sulogin.o consoles.o -lselinux -o sulogin | /usr/bin/ld: sulogin.o: in function `main': | ./src/sulogin.c:978: undefined reference to `crypt' | collect2: error: ld returned 1 exit status | make[4]: *** [: sulogin] Error 1 | make[4]: Leaving directory '/<>/src' | make[3]: *** [Makefile:6: all] Error 2 | make[3]: Leaving directory '/<>' | make[2]: *** [debian/rules:33: override_dh_auto_build] Error 2 | make[2]: Leaving directory '/<>' | make[1]: *** [debian/rules:30: build-arch] Error 2 | make[1]: Leaving directory '/<>' | make: *** [debian/rules:30: binary] Error 2 | dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 I'm not entirely ruling out an issue with sysvinit, but the coincidence with the libxcrypt upload is quite strong, so I'm therefore filing it here first. Also seen by crossqa: http://crossqa.debian.net/build/sysvinit_2.96-6_arm64_20210418081950.log Not yet seen by reproducible, but I've rescheduled a build there. Likely a matter of waiting. Helmut