My cflags and cxxflags are as follows: CFLAGS="-O3 -mtune=pentium4 -march=pentium4 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -frename-registers -fweb -ftracer -pipe" CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden -fvisibility=hidden" When I try to emerge media-libs/id3lib-3.8.3-r3 with these flags, I get multiple errors about, ": undefined reference to `ID3_Tag::", and finally a, !!! ERROR: media-libs/id3lib-3.8.3-r3 failed. !!! Function src_compile, Line 43, Exitcode 2 The full log of errors is below. If I take "-fvisibility=hidden" out of my CXXFLAGS, id3libs compiles perfectly. Reproducible: Always Steps to Reproduce: 1. Add -fvisibility=hidden to CXXFLAGS 2. emerge id3lib Actual Results: *normal up to here then:* demo_copy.o(.text+0x154): In function `PrintVersion(char const*)': : undefined reference to `ID3LIB_FULL_NAME' demo_copy.o(.text+0x299): In function `main': : undefined reference to `ID3_Tag::ID3_Tag(char const*)' demo_copy.o(.text+0x2d1): In function `main': : undefined reference to `ID3_Tag::Clear()' demo_copy.o(.text+0x2e5): In function `main': : undefined reference to `ID3_Tag::Link(char const*, unsigned short)' demo_copy.o(.text+0x335): In function `main': : undefined reference to `ID3_Tag::Link(char const*, unsigned short)' demo_copy.o(.text+0x341): In function `main': : undefined reference to `ID3_Tag::Update(unsigned short)' demo_copy.o(.text+0x365): In function `main': : undefined reference to `ID3_Tag::~ID3_Tag()' demo_copy.o(.text+0x37e): In function `main': : undefined reference to `ID3_Tag::~ID3_Tag()' collect2: ld returned 1 exit status make[2]: *** [id3cp] Error 1 make[2]: *** Waiting for unfinished jobs.... i686-pc-linux-gnu-g++ -O3 -mtune=pentium4 -march=pentium4 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -frename-registers -fweb -ftracer -pipe -fvisibility-inlines-hidden -fvisibility=hidden -o .libs/id3convert demo_convert_options.o demo_convert.o ../src/.libs/libid3.so //usr/lib/gcc/i686-pc-linux-gnu/3.4.3/libstdc++.so -L/usr/i686-pc-linux-gnu/bin -L/usr/i686-pc-linux-gnu/lib -lz -Wl,--rpath -Wl,//usr/lib/gcc/i686-pc-linux-gnu/3.4.3 demo_convert.o(.text+0x190): In function `PrintVersion(char const*)': : undefined reference to `ID3LIB_FULL_NAME' demo_convert.o(.text+0x2fe): In function `main': : undefined reference to `ID3_Tag::ID3_Tag(char const*)' demo_convert.o(.text+0x345): In function `main': : undefined reference to `ID3_Tag::Clear()' demo_convert.o(.text+0x359): In function `main': : undefined reference to `ID3_Tag::Link(char const*, unsigned short)' demo_convert.o(.text+0x36e): In function `main': : undefined reference to `ID3_Tag::SetPadding(bool)' demo_convert.o(.text+0x3bc): In function `main': : undefined reference to `ID3_Tag::Strip(unsigned short)' demo_convert.o(.text+0x417): In function `main': : undefined reference to `ID3_Tag::~ID3_Tag()' demo_convert.o(.text+0x45a): In function `main': : undefined reference to `ID3_Tag::~ID3_Tag()' demo_convert.o(.text+0x47a): In function `main': : undefined reference to `ID3_Tag::Update(unsigned short)' collect2: ld returned 1 exit status make[2]: *** [id3convert] Error 1 i686-pc-linux-gnu-g++ -O3 -mtune=pentium4 -march=pentium4 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -frename-registers -fweb -ftracer -pipe -fvisibility-inlines-hidden -fvisibility=hidden -o .libs/id3tag demo_tag_options.o demo_tag.o ../src/.libs/libid3.so //usr/lib/gcc/i686-pc-linux-gnu/3.4.3/libstdc++.so -L/usr/i686-pc-linux-gnu/bin -L/usr/i686-pc-linux-gnu/lib -lz -Wl,--rpath -Wl,//usr/lib/gcc/i686-pc-linux-gnu/3.4.3 demo_tag.o(.text+0xa0): In function `PrintVersion(char const*)': : undefined reference to `ID3LIB_FULL_NAME' demo_tag.o(.text+0x293): In function `main': : undefined reference to `ID3_Tag::ID3_Tag(char const*)' demo_tag.o(.text+0x2d7): In function `main': : undefined reference to `ID3_Tag::Link(char const*, unsigned short)' demo_tag.o(.text+0x386): In function `main': : undefined reference to `ID3_AddTrack(ID3_Tag*, unsigned char, unsigned char, bool)' demo_tag.o(.text+0x392): In function `main': : undefined reference to `ID3_Tag::Update(unsigned short)' demo_tag.o(.text+0x3ed): In function `main': : undefined reference to `ID3_Tag::~ID3_Tag()' demo_tag.o(.text+0x72e): In function `main': : undefined reference to `ID3_Tag::~ID3_Tag()' demo_tag.o(.text+0x7c2): In function `main': : undefined reference to `ID3_AddArtist(ID3_Tag*, char const*, bool)' demo_tag.o(.text+0x7e1): In function `main': : undefined reference to `ID3_AddAlbum(ID3_Tag*, char const*, bool)' demo_tag.o(.text+0x819): In function `main': : undefined reference to `ID3_AddTitle(ID3_Tag*, char const*, bool)' demo_tag.o(.text+0x838): In function `main': : undefined reference to `ID3_AddYear(ID3_Tag*, char const*, bool)' demo_tag.o(.text+0x861): In function `main': : undefined reference to `ID3_AddComment(ID3_Tag*, char const*, char const*, bool)' demo_tag.o(.text+0x881): In function `main': : undefined reference to `ID3_AddGenre(ID3_Tag*, unsigned int, bool)' collect2: ld returned 1 exit status make[2]: *** [id3tag] Error 1 make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/id3lib-3.8.3-r3/work/id3lib-3.8.3' make: *** [all] Error 2 !!! ERROR: media-libs/id3lib-3.8.3-r3 failed. !!! Function src_compile, Line 43, Exitcode 2 !!! (no error message) !!! If you need support, post the topmost build error, NOT this status message. i686-pc-linux-gnu-g++ -O3 -mtune=pentium4 -march=pentium4 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -frename-registers -fweb -ftracer -pipe -fvisibility-inlines-hidden -fvisibility=hidden -o .libs/id3info demo_info_options.o demo_info.o ../src/.libs/libid3.so //usr/lib/gcc/i686-pc-linux-gnu/3.4.3/libstdc++.so -L/usr/i686-pc-linux-gnu/bin -L/usr/i686-pc-linux-gnu/lib -lz -Wl,--rpath -Wl,//usr/lib/gcc/i686-pc-linux-gnu/3.4.3 root@dextux dextux # demo_info.o(.text+0x146): In function `PrintVersion(char const*)': : undefined reference to `ID3LIB_FULL_NAME' demo_info.o(.text+0x17c): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_Tag::CreateIterator() const' demo_info.o(.text+0x19b): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_Frame::GetDescription() const' demo_info.o(.text+0x1ad): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_Frame::GetTextID() const' demo_info.o(.text+0x203): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_Frame::GetID() const' demo_info.o(.text+0x26c): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_GetString(ID3_Frame const*, ID3_FieldID)' demo_info.o(.text+0x27e): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_GetString(ID3_Frame const*, ID3_FieldID)' demo_info.o(.text+0x2f6): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_GetString(ID3_Frame const*, ID3_FieldID)' demo_info.o(.text+0x336): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_GetString(ID3_Frame const*, ID3_FieldID)' demo_info.o(.text+0x348): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_GetString(ID3_Frame const*, ID3_FieldID)' demo_info.o(.text+0x35a): more undefined references to `ID3_GetString(ID3_Frameconst*, ID3_FieldID)' follow demo_info.o(.text+0x40c): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_Frame::GetField(ID3_FieldID) const' demo_info.o(.text+0x489): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_GetString(ID3_Frame const*, ID3_FieldID)' demo_info.o(.text+0x49c): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_GetString(ID3_Frame const*, ID3_FieldID)' demo_info.o(.text+0x4af): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_Frame::GetField(ID3_FieldID) const' demo_info.o(.text+0x4c9): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_Frame::GetField(ID3_FieldID) const' demo_info.o(.text+0x55b): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_GetString(ID3_Frame const*, ID3_FieldID)' demo_info.o(.text+0x56e): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_Frame::GetField(ID3_FieldID) const' demo_info.o(.text+0x588): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_Frame::GetField(ID3_FieldID) const' demo_info.o(.text+0x611): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_Frame::GetField(ID3_FieldID) const' demo_info.o(.text+0x641): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_Frame::GetField(ID3_FieldID) const' demo_info.o(.text+0x666): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_GetString(ID3_Frame const*, ID3_FieldID, unsignedint)' demo_info.o(.text+0x6b1): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_GetString(ID3_Frame const*, ID3_FieldID)' demo_info.o(.text+0x6c4): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_Frame::GetField(ID3_FieldID) const' demo_info.o(.text+0x6de): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_Frame::GetField(ID3_FieldID) const' demo_info.o(.text+0x768): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_GetString(ID3_Frame const*, ID3_FieldID)' demo_info.o(.text+0x77a): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_GetString(ID3_Frame const*, ID3_FieldID)' demo_info.o(.text+0x78d): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_GetString(ID3_Frame const*, ID3_FieldID)' demo_info.o(.text+0x7a0): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_Frame::GetField(ID3_FieldID) const' demo_info.o(.text+0x881): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_GetString(ID3_Frame const*, ID3_FieldID)' demo_info.o(.text+0x894): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_GetString(ID3_Frame const*, ID3_FieldID)' demo_info.o(.text+0x8a7): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_GetString(ID3_Frame const*, ID3_FieldID)' demo_info.o(.text+0x8ba): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_Frame::GetField(ID3_FieldID) const' demo_info.o(.text+0x8d4): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_Frame::GetField(ID3_FieldID) const' demo_info.o(.text+0xa1d): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `ID3_Frame::GetField(ID3_FieldID) const' demo_info.o(.text+0xa49): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `vtable for ID3_MemoryReader' demo_info.o(.text+0xa7a): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `dami::io::readString(ID3_Reader&)' demo_info.o(.text+0xacb): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `dami::io::readBENumber(ID3_Reader&, unsigned int)' demo_info.o(.text+0xb14): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `vtable for ID3_MemoryReader' demo_info.o(.text+0xb71): In function `PrintInformation(ID3_Tag const&)': : undefined reference to `vtable for ID3_MemoryReader' demo_info.o(.text+0xc7b): In function `main': : undefined reference to `ID3_Tag::ID3_Tag(char const*)' demo_info.o(.text+0xc8f): In function `main': : undefined reference to `ID3_Tag::Link(char const*, unsigned short)' demo_info.o(.text+0xc97): In function `main': : undefined reference to `ID3_Tag::GetMp3HeaderInfo() const' demo_info.o(.text+0xdf7): In function `main': : undefined reference to `ID3_Tag::~ID3_Tag()' demo_info.o(.text+0xe15): In function `main': : undefined reference to `ID3_Tag::~ID3_Tag()' demo_info.o(.text+0xe66): In function `main': : undefined reference to `ID3_Tag::ID3_Tag(ID3_Tag const&)' demo_info.o(.text+0xe76): In function `main': : undefined reference to `ID3_Tag::~ID3_Tag()' demo_info.o(.text+0xecf): In function `main': : undefined reference to `ID3_Tag::~ID3_Tag()' demo_info.o(.gnu.linkonce.t._ZN10ID3_Reader8readCharEv+0x19): In function `ID3_Reader::readChar()': : undefined reference to `ID3_Reader::END_OF_READER' collect2: ld returned 1 exit status Expected Results: Emerged with -fvisiblity=hidden. Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r12 i686) ================================================================= System uname: 2.6.9-gentoo-r12 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r5,sys-devel/autoconf-2.13 Automake: sys-devel/automake-1.8.5-r1,sys-devel/automake-1.8.5-r2,sys-devel/automake-1.4_p6,sys-devel/automake-1.6.3,sys-devel/automake-1.7.9,sys-devel/automake-1.9.3 Binutils: sys-devel/binutils-2.15.90.0.1.1-r3 Headers: sys-kernel/linux26-headers-2.6.8.1-r1 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -mtune=pentium4 -march=pentium4 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -frename-registers -fweb -ftracer -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -mtune=pentium4 -march=pentium4 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -frename-registers -fweb -ftracer -pipe -fvisibility-inlines-hidden" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="ftp://public.planetmirror.com/pub/gentoo http://mirror.pacific.net.au/gentoo http://mirror.aarnet.edu.au/pub/gentoo" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.au.gentoo.org/gentoo-portage" USE="X aalib acl alsa arts avi berkdb bitmap-fonts bonobo cdr crypt cups directfb dvd dvdr encode esd f77 fam flac foomaticdb fortran gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 imagemagick imlib ipv6 java jpeg kde ldap libg++ libwww madmikmod mmx motif mozilla mpeg ncurses nls nptl nvidia oggvorbis opengl oss pam pdflib perl pic png ppds python qt quicktime readline samba sdl spell sse ssl svga tcpd tiff truetype usb x86 xml xml2 xmms xv xvid zlib"
I managed to do "emerge info" after I had taken out -fvisibility=hidden from my make.conf, but be assured that it was actually there when I compiled id3libs.
Sorry, but modifying programs extensively just to make a still experimental CXXFLAG work will not happen. Do feel free to submit this as a bug upstream. Alternatively you may reopen this bug if you attach a patch that makes this program compile with your experimental CXXFLAG and I will add it to portage.