the compilation ends with : ... libtool: link: x86_64-pc-linux-gnu-gcc -std=gnu99 -shared .libs/libaudioscrobbler_plugin_la-audioscrobbler.o -Wl,--whole-archive ../../compat/.libs/libcompat.a -Wl,--no-whole-archive -Wl,-rpath -Wl,/tmp/portage/media-video/vlc-1.0.1/work/vlc-1.0.1/src/.libs ../../src/.libs/libvlccore.so -L/usr/lib64 /usr/lib64/libhal.so /usr/lib64/libdbus-1.so -lrt -lpthread -ldl -lm -march=native -msse3 -Wl,-O1 -Wl,-soname -Wl,libaudioscrobbler_plugin.so -o .libs/libaudioscrobbler_plugin.so libtool: link: x86_64-pc-linux-gnu-gcc -std=gnu99 -shared .libs/libfreetype_plugin_la-freetype.o -Wl,--whole-archive ../../compat/.libs/libcompat.a -Wl,--no-whole-archive -Wl,-rpath -Wl,/tmp/portage/media-video/vlc-1.0.1/work/vlc-1.0.1/src/.libs /usr/lib64/libfribidi.so /usr/lib64/libfreetype.so -lz ../../src/.libs/libvlccore.so -L/usr/lib64 /usr/lib64/libhal.so /usr/lib64/libdbus-1.so -lrt -lpthread -ldl -lm -march=native -msse3 -Wl,-O1 -Wl,-soname -Wl,libfreetype_plugin.so -o .libs/libfreetype_plugin.so /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.1/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/libfreetype_plugin_la-freetype.o: relocation R_X86_64_PC32 against undefined symbol `GetStyleFromFontStack' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.1/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make[5]: *** [libfreetype_plugin.la] Error 1 make[5]: *** Waiting for unfinished jobs.... Reproducible: Always Portage 2.2_rc38 (default/linux/amd64/2008.0/developer, gcc-4.4.1, glibc-2.10.1-r0, 2.6.30-dirty x86_64) ================================================================= System uname: Linux-2.6.30-dirty-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4200+-with-gentoo-2.0.1 Timestamp of tree: Mon, 17 Aug 2009 02:30:01 +0000 distcc 3.1 x86_64-pc-linux-gnu [disabled] ccache version 2.4 [disabled] app-shells/bash: 4.0_p28 dev-java/java-config: 2.1.8-r1 dev-lang/python: 2.6.2-r1, 3.1 dev-python/pycrypto: 2.0.1-r8 dev-util/ccache: 2.4-r8 dev-util/cmake: 2.6.4-r2 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.4.3-r3 sys-apps/sandbox: 2.0 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11 sys-devel/binutils: 2.19.1-r1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.30-r1 ABI="amd64" ACCEPT_KEYWORDS="amd64 ~amd64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" ANT_HOME="/usr/share/ant" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ARCH="amd64" ASFLAGS_x86="--32" AUTOCLEAN="yes" BASH_ENV="/.profile" CAMERAS="canon ptp2" CBUILD="x86_64-pc-linux-gnu" CDEFINE_amd64="__x86_64__" CDEFINE_x86="__i386__" CFLAGS="-march=native -pipe -msse3" CFLAGS_x86="-m32" CHOST="x86_64-pc-linux-gnu" CHOST_amd64="x86_64-pc-linux-gnu" CHOST_x86="i686-pc-linux-gnu" CLEAN_DELAY="5" COLLISION_IGNORE="/lib/modules" CONFIG_PROTECT="/etc /usr/kde/4.3/env /usr/kde/4.3/share/config /usr/kde/4.3/shutdown /usr/kde/4.svn/share/config /usr/share/config /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d" CVS_RSH="ssh" CXXFLAGS="-march=native -pipe -msse3" DCCC_PATH="/usr/lib64/distcc/bin" DEFAULT_ABI="amd64" DISPLAY=":0" DISTCC_LOG="" DISTCC_VERBOSE="0" DISTDIR="/usr/portage/distfiles" EDITOR="/usr/bin/vim" ELIBC="glibc" EMERGE_WARNING_DELAY="10" FEATURES="assume-digests collision-protect cvs digest distlocks fixpackages multilib-strict noinfo parallel-fetch preserve-libs protect-owned sfperms sign splitdebug strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox" FETCHCOMMAND="/usr/bin/wget -t 5 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}"" FLTK_DOCDIR="/usr/share/doc/fltk-2.0_pre6786-r1/html" GDK_USE_XFT="1" GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org http://gentoo.tiscali.nl/ http://ftp.ntua.gr/pub/linux/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror" GUILE_LOAD_PATH="/usr/share/guile/1.8"
the faulty command is a few lines above what you posted; please attach the full build log and the config.log
Created attachment 201711 [details] build.log Oops.. sorry for this, here they are
Created attachment 201712 [details] config.log and here's the config.log
That's weird, the object that its ranting about is built with PIC so this shouldn't happen. What's the output of: emerge -pv sys-devel/gcc sys-devel/binutils
These are the packages that would be merged, in order: this is it : (i've unmasked gcc-4.4.1) Calculating dependencies... done! [ebuild R ] sys-devel/binutils-2.19.1-r1 USE="nls -gold -multislot -multitarget -test -vanilla" 0 kB [ebuild R ] sys-devel/gcc-4.4.1 USE="fortran gtk mudflap (multilib) nls nptl objc objc++ openmp (-altivec) -bootstrap -build -doc (-fixed-point) -gcj -graphite (-hardened) -ip28 -ip32r10k -libffi -multislot (-n32) (-n64) -nocxx -objc-gc -test -vanilla" 0 kB Total: 2 packages (2 reinstalls), Size of downloads: 0 kB
I've more or less the same setup but can't trigger the error :( Can you check if: - -march=athlon64 instead of -march=native triggers it too - vlc-1.0.9999 and vlc-9999 still fail to build?
march=athlon64 instead of -march=native triggers it too -----> yes, same problem I'm on to try live ebuilds (btw, i can be found as 'orzel' on irc if that can help)
same problem with vlc-1.0.9999
and exact same problem with vlc-9999
i'v tried to re-install freetype, just in case, but that does not fix the problem. I've tried using gcc 4.3 instead, doesn't work neither.
mm, anyway this is not a problem with a dependency. This function is inside vlc source: vlc-1.0.1/modules/misc/freetype.c if i touch this file and do 'make' then i see libtool: compile: x86_64-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -DSYS_LINUX -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -D__LIBVLC__ -D__PLUGIN__ -I/usr/include/freetype2 -I/usr/include/fribidi -DHAVE_FRIBIDI -DMODULE_NAME=freetype -DMODULE_NAME_IS_freetype -DMODULE_STRING=\"freetype\" -O0 -march=native -pipe -msse3 -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -MT libfreetype_plugin_la-freetype.lo -MD -MP -MF .deps/libfreetype_plugin_la-freetype.Tpo -c freetype.c -fPIC -DPIC -o .libs/libfreetype_plugin_la-freetype.o so indeed this file is compiled with PIC...
the.o should contain the symbol, but indeed has a undefined symbol.. this is not right : #berlioz misc # nm .libs/libfreetype_plugin_la-freetype.o | grep GetStyleFromFont U GetStyleFromFontStack
the function is inside a #ifdef FONTCONFIG and i have : berlioz misc # grep HAVE_FONTCONFIG ../../config.h /* #undef HAVE_FONTCONFIG_FONTCONFIG_H */ that's the reason for failure.
the reason is that configure was started with --without-fontconfig : i missed the 'fontconfig' use flag, though i have the freetype one. I think there is a bug in vlc that if compiled with freetype but without fontconfig, then if fails to build. I would recommend the gentoo ebuild to take this into account when dealing with use flag.
i confirm that adding the fontconfig use flag was the definite solution to this problem. I let you decide whether or not a workaround should be added to the ebuild and close this bug or not according tot this. greatings.
I can confirm this bug with vlc 1.0.2. Enabling the fontconfig use flag fixed it for me.
Ok i think i found the cause... indeed its caused by the #ifdef but at -O2 at least gcc performs dead code elimination, thus i couldn't reproduce it. At -O0 it wants the function which is never defined and then fail. For now, as a workaround you can build with -O2 in CFLAGS until it is fixed for real.
*** Bug 285827 has been marked as a duplicate of this bug. ***
fixed in 1.0.2, thanks for reporting.