It is seems like http://bugs.gentoo.org/show_bug.cgi?id=105876 but on Linux with gcc4: make[1]: Entering directory `/var/tmp/portage/glimpse-4.17.4/work/glimpse-4.17.4/dynfilters' gcc -fPIC -DSHARED_OBJECT -c lex.yy.c gcc -shared -o htuml2txt.so lex.yy.o -lfl /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/libfl.a(libyywrap.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/libfl.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[1]: *** [htuml2txt.so] Error 1 make[1]: Leaving directory `/var/tmp/portage/glimpse-4.17.4/work/glimpse-4.17.4/dynfilters' Reproducible: Always Portage 2.1 (default-linux/amd64/2006.0, gcc-4.1.1, glibc-2.3.6-r3, 2.6.16-gentoo-r9-modular x86_64) ================================================================= System uname: 2.6.16-gentoo-r9-modular x86_64 AMD Athlon(tm) 64 Processor 3200+ Gentoo Base System version 1.6.14 ccache version 2.3 [enabled] dev-lang/python: 2.3.5, 2.4.2 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.3 dev-util/confcache: 0.4.2-r1 sys-apps/sandbox: 1.2.17 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-r1 sys-devel/binutils: 2.16.1-r2 sys-devel/gcc-config: 1.3.13-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=k8 -pipe -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib/X11/xkb /usr/lib64/mozilla/defaults/pref" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo" CXXFLAGS="-O2 -march=k8 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache confcache distlocks metadata-transfer parallel-fetch sandbox sfperms strict userfetch userpriv usersandbox" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="en_US.UTF-8" LINGUAS="en ru" MAKEOPTS="-j2" PKGDIR="/usr/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/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X a52 acpi alsa apache2 avi bash-completion berkdb bidi bitmap-fonts cdr cli crypt cups dbus dri dvd dvdr dvdread encode exif fam fbcon firefox flac foomaticdb gif gnome gpm gstreamer gtk gtk2 hal icq imlib isdnlog jabber java jikes jpeg lm_sensors lzw lzw-tiff mime mmap mono mp3 mpeg ncurses nls nptl ogg opengl pam pcre pdf pdflib perl pic png ppds pppd python quicktime readline reflection sdl session spell spl ssl startup-notification subtitles svg symlink threads tiff truetype truetype-fonts type1-fonts unicode usb vorbis xface xine xml xorg xpm xv xvid zlib elibc_glibc kernel_linux linguas_en linguas_ru userland_GNU video_cards_nvidia" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
(In reply to comment #0) > It is seems like http://bugs.gentoo.org/show_bug.cgi?id=105876 Hmm? Completely different issue...
what's the output of 'emerge -pv flex glimpse'?
Ops, I forgot to copy first part of the output: make[1]: Entering directory `/var/tmp/portage/glimpse-4.17.4/work/glimpse-4.17.4/index' rm -f buildcast.c cp glimpse.c buildcast.c gcc -c -I../index -I../agrep -I../libtemplate/include -O2 -DBUILDCAST=1 -o buildcast.o buildcast.c buildcast.c:27: error: static declaration of 'TEMP_DIR' follows non-static declaration buildcast.c:22: error: previous declaration of 'TEMP_DIR' was here make[1]: *** [buildcast.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/glimpse-4.17.4/work/glimpse-4.17.4/index' I can fix compile error adove with own patch (which adds conditional compilation for TEMP_DIR) but following error (which comes immediately after previous) is presents anyway: make[1]: Entering directory `/var/tmp/portage/glimpse-4.17.4/work/glimpse-4.17.4/dynfilters' gcc -fPIC -DSHARED_OBJECT -c lex.yy.c gcc -shared -o htuml2txt.so lex.yy.o -lfl /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/libfl.a(libyywrap.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/libfl.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[1]: *** [htuml2txt.so] Error 1 make[1]: Leaving directory `/var/tmp/portage/glimpse-4.17.4/work/glimpse-4.17.4/dynfilters'
The output of 'emerge -pv flex glimpse' is here: Calculating dependencies... done! [ebuild R ] sys-devel/flex-2.5.33-r1 USE="nls -static" 0 kB [ebuild R ] app-misc/glimpse-4.17.4 USE="-static" 0 kB
I encountered the same problem. After temporarily recompiling flex with -fPIC in my CFLAGS, glimpse builds fine. So I think the flex ebuild maintainer will need to add -fPIC for amd64?
Thank you Vincent, I will try to recompile flex only with -fPIC flag. But I think it is not true Gentoo way. I have added pic flag in my USE variable and I think flex ebuild should add -fPIC for compiler automatically.
looks like flex isn't intended to be included in shared libs
Same here. I note that #131460 has been marked WONTFIX. What then is the correct way to resolve this situation? Should I be enabling the static flag? On flex or on the library that requires it? Portage 2.1-r2 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.4-r3, 2.6.16-gentoo-r12 x86_64) ================================================================= System uname: 2.6.16-gentoo-r12 x86_64 AMD Athlon(tm) 64 Processor 3000+ Gentoo Base System version 1.12.4 app-admin/eselect-compiler: [Not Present] dev-lang/python: 2.3.5-r2, 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 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.1-r3 sys-devel/gcc-config: 1.3.13-r3 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O2 -fPIC" 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 /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=athlon64 -O2 -fPIC" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--ask --alphabetical --verbose --deep --tree" FEATURES="autoconfig distlocks fixpackages keeptemp keepwork metadata-transfer parallel-fetch sandbox sfperms strict userfetch userpriv" GENTOO_MIRRORS="http://gentoo.blueyonder.co.uk/ http://mirror.switch.ch/mirror/gentoo/ http://pandemonium.tiscali.de/pub/gentoo/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo" LANG="en_GB" LC_ALL="en_GB.UTF-8" LINGUAS="en_GB" MAKEOPTS="-j1" PKGDIR="/usr/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/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X aac acpi alsa apache2 apm asf avi bash-completion berkdb bitmap-fonts bzip2 cairo cdr cli crypt cups curl dedicated dga dlloader dri dts dvd dvdr dvdread emboss encode exif expat fbcon ffmpeg firefox flac ftp gif gnutls gstreamer gtk gtk2 haskell idn ipv6 isdnlog ithreads java javascript jpeg jpeg2k junit kde krb4 lcms libg++ lirc lzo mad mikmod mjpeg mng mozsvg mp3 mpeg musepack mysql mysqli ncurses nls nocd nptl nptlonly nvidia ogg oggvorbis opengl pam pcre pdflib perl php png ppds pppd python qt3 qt4 quicktime rdesktop readline reflection samba sdl session speex spl sqlite ssl svg tcpd tetex theora threads tidy truetype truetype-fonts type1-fonts udev unicode usb vcd vhosts videos vorbis wmf wxwindows xine xml xorg xpm xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev input_devices_wacom kernel_linux linguas_en_GB lirc_devices_livedrive_midi userland_GNU video_cards_vesa video_cards_nvidia" Unset: CTARGET, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Just to note the fPIC in my CFLAGS was there because I was resolving this issue the way previous posts suggested. It was added in for one package then removed.
At least on AMD64 this happens independently of the glimpse version (4.17.4 as well as with 4.18.5). If flex is not fixed (as is suggested by #131460), may I suggest to mark all versions of glimpse unstable (or even mask them out, I don't know what the policy for non-compiling packages is).
sys-devel/flex-2.5.33-r2 fixes the issue. *** This bug has been marked as a duplicate of bug 131460 ***