I've run into trouble with shared libraries, and I've tracked it down to a change in /usr/lib/portage/bin/prepstrip. Earlier, shared libraries were stripped using --strip-debug, but now they are stripped using --strip-unneeded. This plainly does not work in my x86 system, the library will have no symbols and no dynamic linking can be done. I don't know if there is a problem in the change to prestrip or if strip is not behaving. Anyway, the combination does not work. Reproducible: Always Steps to Reproduce: 1.emerge sys-libs/db 2. 3. Actual Results: # file /usr/lib/libdb-4.1.so /usr/lib/libdb-4.1.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), stripped # nm /usr/lib/libdb-4.1.so nm: /usr/lib/libdb-4.1.so: no symbols Expected Results: # file /usr/lib/libdb-4.1.so /usr/lib/libdb-4.1.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped # nm /usr/lib/libdb-4.1.so | head 00015270 t .L100 000355fa t .L100 0003e900 t .L101 00087870 t .L101 000152a0 t .L102 0003e889 t .L103 0004bfb0 t .L103 00027b03 t .L1034 00015260 t .L104 00027f9c t .L1040 Related package versions are: sys-apps/portage-2.0.50-r1 (provides prepstrip) sys-devel/binutils-2.14.90.0.7-r4 (provides strip) sys-libs/db-4.1.25_p1-r3 My /etc/make.conf variables: USE="alsa cdr directfb dga dvb dvd dvdr emacs encode fbcon flac ggi gpm jack jav a ladcca lirc mad matrox mmx mozilla mpi nas samba sse usb xinerama" CHOST="i486-pc-linux-gnu" CFLAGS="-O3 -mcpu=i486 -funroll-loops -pipe" MAKEOPTS="-j2" My patch to reverse the change (and make the shared library work again): --- /usr/lib/portage/bin/prepstrip.orig Tue Feb 17 22:07:39 2004 +++ /usr/lib/portage/bin/prepstrip Tue Feb 17 23:30:32 2004 @@ -28,7 +28,7 @@ fi if [ -z "${f/*SB shared object*/}" ]; then echo " ${x:${#D}:${#x}}" - ${STRIP} --strip-unneeded "${x}" + ${STRIP} --strip-debug "${x}" # etdyn binaries are shared objects, but not really. Non-relocatable. if [ -x /usr/bin/isetdyn ]; then
define 'plainly does not work' ... basically you havent provided much information in order to track down the problem ... something along the lines of 'i emerged db-4.1 with strip-unneeded and when i tried to do XXX it failed' could possibly help :P yeah, no symbols exist in the binaries anymore, that was the whole point of the change ;)
Oh, I didn't know that was even possible, sorry for my ignorence. I guess I'm too used to needing those symbols... Anyway, this is what failed for me, and now that I look closer on the output it seems that nm is used to look for some symbol (see line 5). It's a problem with this particular package, not portage and --strip-unneeded. bin/sh-2.05b# ebuild net-p2p/dc-gui/dc-gui-0.79.ebuild compile >>> md5 src_uri ;-) dc_gui2-0.79.tar.gz >>> Unpacking source... >>> Unpacking dc_gui2-0.79.tar.gz to /var/tmp/portage/dc-gui-0.79/work nm: /usr/lib/libdb.so: no symbols perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_MESSAGES = "C", LC_CTYPE = "iso8859-1", LANG = "C" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). >>> Source unpacked. configure: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used. checking for a BSD-compatible install... /bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for i486-pc-linux-gnu-strip... no checking for strip... strip checking whether to enable maintainer-specific portions of Makefiles... no checking for style of include used by make... GNU checking for i486-pc-linux-gnu-gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking dependency style of gcc... gcc3 checking for strerror in -lcposix... no checking for i486-pc-linux-gnu-gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ANSI C... (cached) none needed checking dependency style of gcc... (cached) gcc3 checking build system type... i686-pc-linux-gnu checking host system type... i486-pc-linux-gnu checking for ld used by GCC... /usr/i486-pc-linux-gnu/bin/ld checking if the linker (/usr/i486-pc-linux-gnu/bin/ld) is GNU ld... yes checking for /usr/i486-pc-linux-gnu/bin/ld option to reload object files... -r checking for BSD-compatible nm... nm checking for a sed that does not truncate output... /bin/sed checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking command to parse nm output... ok checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for i486-pc-linux-gnu-ranlib... no checking for ranlib... ranlib checking for i486-pc-linux-gnu-strip... strip checking for objdir... .libs checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.lo... yes checking if gcc supports -fno-rtti -fno-exceptions... yes checking whether the linker (/usr/i486-pc-linux-gnu/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking whether -lc should be explicitly linked in... no creating libtool checking for gcc option to accept ANSI C... none needed checking for ANSI C header files... (cached) yes checking for pkg-config... /usr/bin/pkg-config checking for libgnomeui-2.0... yes checking PACKAGE_CFLAGS... -DORBIT2=1 -pthread -I/usr/include/libgnomeui-2.0 -I/usr/include/libgnome-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/libbonoboui-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/bonobo-activation-2.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/X11R6/include -I/usr/include/libxml2 checking PACKAGE_LIBS... -pthread -Wl,--export-dynamic -L/usr/X11R6/lib -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lxml2 -lpthread -lz -lgnomecanvas-2 -lgnome-2 -lpopt -lart_lgpl_2 -lpangoft2-1.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lbonobo-2 -lgconf-2 -lgnomevfs-2 -lbonobo-activation -lORBit-2 -lgobject-2.0 -lgthread-2.0 -lm -lgmodule-2.0 -ldl -lglib-2.0 checking locale.h usability... yes checking locale.h presence... yes checking for locale.h... yes checking for LC_MESSAGES... yes checking libintl.h usability... yes checking libintl.h presence... yes checking for libintl.h... yes checking for dgettext in libc... yes checking for bind_textdomain_codeset... yes checking for msgfmt... /usr/bin/msgfmt checking for dcgettext... yes checking for gmsgfmt... /usr/bin/msgfmt checking for xgettext... /usr/bin/xgettext checking for catalogs to be installed... fr nl pl checking for pkg-config... (cached) /usr/bin/pkg-config checking GTK+ version... recent enough checking for dctc... yes checking DCTC version... 0.85.8 checking for hublist... yes checking db.h usability... yes checking db.h presence... yes checking for db.h... yes checking Berkeley Database library version... 4.1 checking for in -ldb-4.1... no checking for in -ldb4... no configure: error: db.h reports Berkeley DB version is 4.1 but no db-4.1 library exists !!! ERROR: net-p2p/dc-gui-0.79 failed. !!! Function econf, Line 365, Exitcode 1 !!! econf failed --------------------- I guess this is it (dc-gui-0.79.ebuild:29) -------------- # fix for #26708 (db4 support) local dbfunc="`nm /usr/lib/libdb.so | grep \ db_env_create | awk '{print $3}'`" if [ "${dbfunc}" != "db_env_create" ] ; then sed -i "s:db_env_create:${dbfunc}:g" configure fi
ah, my little hack for dc-gui, i'll fix that correctly this time :)
ok, changed it to read /usr/include/db.h for the db func def