On 28-09-2014 06:28, Pierre Labastie wrote: > Le 28/09/2014 10:50, Armin K. a écrit : >> On 09/28/2014 09:36 AM, Pierre Labastie wrote: >>> Hi, >>> >>> I run into the following error when building sudo-1.8.11 on a fresh LFS 7.6: >>> ------ >>> libtool: link: gcc -shared -fPIC -DPIC .libs/sudo_auth.o .libs/getspwuid.o >>> .libs/passwd.o .libs/boottime.o .libs/check.o .libs/env.o .libs/find_path.o >>> .libs/goodpath.o .libs/group_plugin.o .libs/interfaces.o .libs/iolog.o >>> .libs/iolog_path.o .libs/locale.o .libs/logging.o .libs/logwrap.o >>> .libs/parse.o .libs/policy.o .libs/prompt.o .libs/set_perms.o >>> .libs/sudo_nss.o >>> .libs/sudoers.o .libs/timestamp.o -Wl,--whole-archive >>> ./.libs/libparsesudoers.a -Wl,--no-whole-archive -Wl,-rpath >>> -Wl,/sources/sudo/sudo-1.8.11/lib/util/.libs -Wl,-rpath -Wl,/usr/lib/sudo >>> -lcrypt -lshadow ../../lib/util/.libs/libsudo_util.so -ldl -lz -Wl,-z >>> -Wl,relro -Wl,-soname -Wl,sudoers.so -o .libs/sudoers.so >>> /usr/bin/ld: cannot find -lshadow >>> collect2: error: ld returned 1 exit status >>> Makefile:204: recipe for target 'sudoers.la' failed >>> make[2]: *** [sudoers.la] Error 1 >>> make[2]: Leaving directory '/sources/sudo/sudo-1.8.11/plugins/sudoers' >>> Makefile:89: recipe for target 'all' failed >>> make[1]: *** [all] Error 2 >>> make[1]: Leaving directory '/sources/sudo/sudo-1.8.11' >>> ------ >>> I have tried to find libshadow in /usr/lib and /lib, and found nothing. >>> Actually, during the build of shadow, they use libshadow.a, which is linked >>> to >>> the executables, but not installed. >>> >>> Looking at what changed in configure.ac, I think I found the faulty code: >>> -------- Note that shadow_libs_optional contains "-lshadow" >>> AC_CHECK_FUNCS($shadow_funcs, [found=yes]) >>> - if test "$found" = "yes"; then >>> - SUDOERS_LIBS="$SUDOERS_LIBS $shadow_libs" >>> - elif test -n "$shadow_libs_optional"; then >>> + if test "$found" = "yes" -a -n "$shadow_libs_optional"; then >>> LIBS="$LIBS $shadow_libs_optional" >>> AC_CHECK_FUNCS($shadow_funcs, [found=yes]) >>> if test "$found" = "yes"; then >>> - SUDOERS_LIBS="$SUDOERS_LIBS $shadow_libs >>> $shadow_libs_optional" >>> + shadow_libs="$shadow_libs $shadow_libs_optional" >>> ------- >>> So while before, $shadow_libs_optional was only added when $found was >>> different from "yes", now it is included when $found is equal to "yes". >>> >>> >>> >>> Actually, the issue seems to have been corrected at: >>> http://www.sudo.ws/repos/sudo/rev/fdf06757f25d >>> >>> But what amazes me is that nobody on the list has seen this yet. Is there a >>> possibility that some of our developpers have libshadow installed? And if >>> so, how? >>> >>> Pierre >>> >> >> If you build with PAM support then it's not needed, obviously. My guess >> is that whoeever updated the package had PAM installed, that's why the >> issue went undetected. >> >> So, for the time being, you can try manually copying libshadow.a from >> shadow build dir. >> >> > Thanks Armin! I installed PAM and could rebuild sudo without the above patch. > But since the above patch does not prevent building with PAM enabled, and > allows to build without PAM, I think it should be included in the book. > > Making a ticket (still open to discussion of course) > > Pierre
Thanks, Pierre. Please if you found the fix and don't mind, create the ticket and fix it. -- []s, Fernando -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
