-
Notifications
You must be signed in to change notification settings - Fork 257
Link correctly with libdl #917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This breaks the Debian build; you'll need some tweaks (see CI results for more details): BTW, out of curiousity, what systems want the latest shadow but an old glibc? |
|
Will look at CI in a bit.
Consider building binaries you will need to deploy to an enterprise Linux distribution. You can get away with modern userland, but you need an older libstdc++ and glibc.
Yes please. |
This fixes build with glibc-2.33 (newer glibc merged libdl and libpthread into libc): ``` libtool: link: x86_64-pc-linux-gnu-gcc -isystem /usr/include/bsd -DLIBBSD_OVERLAY -O2 -pipe -Wl,-O1 -o login login.o login_nopam.o -Wl,--as-needed ../lib/.libs/libshadow.a -lcrypt -lsystemd -lpam -lpam_misc -lbsd /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: ../lib/.libs/libshadow.a(libshadow_la-nss.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /lib64/libdl.so.2: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status ``` In Debian, the needed macro from libtool seems to be in libltdl-dev. Signed-off-by: Sam James <sam@gentoo.org>
ikerexxe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for the patch.
This fixes build with glibc-2.33 (newer glibc merged libdl and libpthread into libc): ``` libtool: link: x86_64-pc-linux-gnu-gcc -isystem /usr/include/bsd -DLIBBSD_OVERLAY -O2 -pipe -Wl,-O1 -o login login.o login_nopam.o -Wl,--as-needed ../lib/.libs/libshadow.a -lcrypt -lsystemd -lpam -lpam_misc -lbsd /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: ../lib/.libs/libshadow.a(libshadow_la-nss.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /lib64/libdl.so.2: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status ``` In Debian, the needed macro from libtool seems to be in libltdl-dev. Signed-off-by: Sam James <sam@gentoo.org> Cc: Iker Pedrosa <ikerpedrosam@gmail.com> Cherry-picked-from: 0f4e59f ("Link correctly with libdl") Link: <shadow-maint#917> Signed-off-by: Alejandro Colomar <alx@kernel.org>
This fixes build with glibc-2.33 (newer glibc merged libdl and libpthread into libc):