Using -Wl,--as-needed cyrus-sasl gives linker errors on compilation. Using this patch fixes it.
Created attachment 75376 [details, diff] fix for --as-needed breakage
Created attachment 79647 [details, diff] Alternate fix for --as-needed I didn't search for a bug earlier and ended up fixing this also. My solution is somewhat different. I'm unsure of which is the correct method so I'll post the patch here also. The difference is that instead of patching the utilities to link the libraries that libsasldb.so and libsasl2.so use, I made the .so's link with them.
I am not an expert myself, but I think your patch makes more sense than mine.
"Me too" -ping
*** Bug 133471 has been marked as a duplicate of this bug. ***
I've commited cyrus-sasl-2.1.22 with --as-needed support (p.masked). Please test. Best Regards, Tuan
2.1.22 builds sucessfully with --as-needed here now. araqiel ~ # emerge --info Portage 2.1_rc2-r3 (default-linux/amd64/2006.0, gcc-4.1.1-pre20060517, glibc-2.4-r3, 2.6.17-rc5-ck1 x86_64) ================================================================= System uname: 2.6.17-rc5-ck1 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ Gentoo Base System version 1.12.0 distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [enabled] dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.4-r1 dev-util/confcache: 0.4.2-r1 sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.91.0.6 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.16 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -msse3 -O2 -pipe -g -ggdb -ftracer -fprefetch-loop-arrays -ftree-vectorize" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-march=athlon64 -msse3 -O2 -pipe -g -ggdb -ftracer -fprefetch-loop-arrays -ftree-vectorize" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig buildpkg ccache distlocks metadata-transfer multilib-strict parallel-fetch sandbox sfperms splitdebug strict" GENTOO_MIRRORS="ftp://ftp.iinet.net.au/pub/Gentoo/" LANG="en_US.utf8" LC_ALL="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,-Bdirect -Wl,--as-needed" LINGUAS="en de" MAKEOPTS="-j3" PKGDIR="/home/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/overlays/toolchain /usr/local/overlays/migration-java /usr/local/overlays/bluetooth-alsa /usr/local/overlays/asneeded /usr/local/overlays/argb_mods /usr/local/overlays/ooo-build /usr/local/overlays/scratch" SYNC="rsync://rsync.au.gentoo.org/gentoo-portage" USE="amd64 X a52 aac acl acpi aiglx alsa audiofile avahi avi bash-completion berkdb bitmap-fonts browserplugin bzip2 cairo cdr cli crypt cups dbus dri dvd dvdr dvdread eds emboss encode ffmpeg firefox flac foomaticdb fortran gcj gif glitz gnome gpm gstreamer gtk gtk2 hal hardened imagemagick imlib ipv6 isdnlog jpeg kde kdeenablefinal ldap lm_sensors logitech-mouse logrotate lzw lzw-tiff mad mmap mono mp3 mpeg ncurses nls nptl nptlonly nsplugin nvidia offensive ogg opengl pam pcre pdflib perl png pppd python qt quicktime readline reflection samba sasl sdl session spell spl ssl svg tcpd theora threads tiff truetype truetype-fonts type1-fonts unicode usb userlocales vorbis xcomposite xinerama xml2 xorg xpm xprint xscreensaver xv xvid xvmc zlib elibc_glibc input_devices_evdev input_devices_keyboard kernel_linux linguas_en linguas_de userland_GNU video_cards_nv video_cards_nvidia" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_RSYNC_EXTRA_OPTS
works perfectly, you can unmask. thanks
works here too. ~x86 system with LDFLAGS="-Wl,-O1 -Wl,--as-needed"
*** Bug 143072 has been marked as a duplicate of this bug. ***
*** Bug 144896 has been marked as a duplicate of this bug. ***
The bug #144896 is definitly NOT a duplicate, it's a completly different issue.