Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 503522 - sys-devel/flex-2.5.38: libfl.so installed now which can break builds
Summary: sys-devel/flex-2.5.38: libfl.so installed now which can break builds
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-05 16:58 UTC by Andrés Becerra Sandoval
Modified: 2014-03-18 02:25 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info output (info.txt,5.15 KB, text/plain)
2014-03-05 16:58 UTC, Andrés Becerra Sandoval
Details
build.log (build.log,24.62 KB, text/plain)
2014-03-05 16:59 UTC, Andrés Becerra Sandoval
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrés Becerra Sandoval 2014-03-05 16:58:35 UTC
With glibc-2.19 I get this error:


/bin/sh ../libtool  --tag=CC  --silent --mode=link x86_64-pc-linux-gnu-gcc -Wall -W    -I/usr/include/libpng16  -march=native -O2 -pipe  -Wl,-O1 -o kateenc kateenc-kateenc.o kateenc-kate_lexer.o kateenc-kate_parser.o kateenc-kpng.o ../lib/liboggkate.la ../lib/libkate.la -logg  -lpng16  -lfl 
/usr/lib64/libfl.so: undefined reference to `yylex'
collect2: error: ld returned 1 exit status
Makefile:456: recipe for target 'kateenc' failed
make[3]: *** [kateenc] Error 1
Comment 1 Andrés Becerra Sandoval 2014-03-05 16:58:59 UTC
Created attachment 371798 [details]
emerge --info output
Comment 2 Andrés Becerra Sandoval 2014-03-05 16:59:54 UTC
Created attachment 371800 [details]
build.log
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2014-03-05 18:35:36 UTC
Looks like same issue as discussed here:

http://comments.gmane.org/gmane.linux.lfs.devel/14740
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2014-03-05 18:36:44 UTC
$ nm -D --defined-only /usr/lib64/libfl.so.2.0.0 |grep yylex
$ nm -D /usr/lib64/libfl.so.2.0.0 |grep yylex
U yylex

(I'm still using glibc-2.18, but looks like it's undefined in libfl)
Comment 5 SpanKY gentoo-dev 2014-03-16 04:55:33 UTC
this isn't related to glibc-2.19.  fails on older versions too.  maybe people generally have --as-needed in their flags or are using gold which causes the lib to not actually get linked in.

deleting the shared lib and using the static libfl.a gets you the same experience as if you used --as-needed -- the linker won't link in any objects that aren't used.  apparently libkate isn't actually using any symbols from libfl, so it doesn't pull in any objects, so the linking step doesn't fail.

the yylex symbol not being defined in libfl (both the .a and the .so) is to be expected.  your lexer is supposed to define yylex itself.  -lfl is there only to provide stubs for other funcs (like yywrap).

the fact that flex-2.5.38 includes a shared lib is a new thing.  upstream converted to using libtool (it was just using ar/ranlib before).  i can't see why they would possibly want this when the only symbols libfl provides are dummy symbols (main & yywrap).  so i'll disable these things and restore the long standing status quo.
Comment 6 SpanKY gentoo-dev 2014-03-16 05:06:48 UTC
should be all set now in the tree; thanks for the report!

Commit message: Drop shared lib since it makes no sense
http://sources.gentoo.org/sys-devel/flex/flex-2.5.38-r1.ebuild?rev=1.1
Comment 7 John Youells 2014-03-16 20:09:42 UTC
I don't understand the issue, but now, for me several packages will not link that built fine before: flex-2.5.38-r1 itself, media-video/vlc-2.1.4, sys-apps/systemd-208-r3 with the message 'error while loading shared libraries: libfl.so.2' I do not have preserve-libs turned on.


emerge --info 
Portage 2.2.8-r1 (default/linux/x86/13.0/desktop/gnome/systemd, gcc-4.8.2, glibc-2.18-r1, 3.13.5-gentoo i686)
=================================================================
System uname: Linux-3.13.5-gentoo-i686-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4400+-with-gentoo-2.2
KiB Mem:     3080492 total,    143040 free
KiB Swap:     995992 total,    995448 free
Timestamp of tree: Sun, 16 Mar 2014 14:00:01 +0000
ld GNU ld (GNU Binutils) 2.24
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p45-r1
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6, 3.3.4
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4, 1.14.1
sys-devel/binutils:       2.24-r2
sys-devel/gcc:            4.8.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.18-r1
Repositories: gentoo zinger-overlay
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=athlon-xp -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y --quiet-build=n"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
USE="3dnow 3dnowext X a52 aac aalib acl acpi alsa asf avahi berkdb bluetooth branding bzip2 cairo cdda cdr cli colord cracklib crypt cups cxx dbus divx4linux dri dts dvd dvdr dvdread eds emboss encode evo exif fam firefox flac foomaticdb fortran gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk2 iconv icu introspection ipv6 jpeg kde lcms ldap libnotify libsecret live mad mmx mng modules mp3 mp4 mpeg nautilus ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf pic png policykit ppds prebuilt pulseaudio qt3support qt4 quicktime radeon readline real rtc samba sdk sdl session socialweb spell sse sse2 ssl startup-notification svg systemd tcltk tcpd threads tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 x86 xcb xml xv xvid zlib" ABI_X86="32" ALSA_CARDS="ymfpci emu10k1 cs46xx" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="i386" QEMU_USER_TARGETS="i386" RUBY_TARGETS="ruby19 ruby20" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="radeon r300 r600" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2014-03-17 09:49:28 UTC
(In reply to John Youells from comment #7)
> I don't understand the issue, but now, for me several packages will not link
> that built fine before: flex-2.5.38-r1 itself, media-video/vlc-2.1.4,
> sys-apps/systemd-208-r3 with the message 'error while loading shared
> libraries: libfl.so.2' I do not have preserve-libs turned on.

install the version that has libfl.so.2 (2.5.38, not -r1) -> enable preserved-libs -> upgrade to version that doesn't have the libfl.so.2 -> run emerge @preserved-rebuild to get rid of anything using libfl.so.2 -> profit ;)
Comment 9 John Youells 2014-03-17 16:45:58 UTC
I put flex-2.5.38 in my local overlay and it's still looking for libfl.so.2: 

>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-devel/flex-2.5.38/work/flex-2.5.38 ...
make -j3 
make  all-recursive
make[1]: Entering directory '/var/tmp/portage/sys-devel/flex-2.5.38/work/flex-2.5.38'
Making all in lib
make[2]: Entering directory '/var/tmp/portage/sys-devel/flex-2.5.38/work/flex-2.5.38/lib'
/bin/sh ../libtool --tag=CC   --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..     -march=athlon-xp -O2 -fomit-frame-pointer -pipe -c -o lib.lo lib.c
libtool: compile:  i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -march=athlon-xp -O2 -fomit-frame-pointer -pipe -c lib.c  -fPIC -DPIC -o .libs/lib.o
libtool: compile:  i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -march=athlon-xp -O2 -fomit-frame-pointer -pipe -c lib.c -o lib.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CC   --mode=link i686-pc-linux-gnu-gcc  -march=athlon-xp -O2 -fomit-frame-pointer -pipe  -Wl,-O1 -o libcompat.la  lib.lo  -lm 
libtool: link: i686-pc-linux-gnu-ar cru .libs/libcompat.a .libs/lib.o 
i686-pc-linux-gnu-ar: error while loading shared libraries: libfl.so.2: cannot open shared object file: No such file or directory
Makefile:292: recipe for target 'libcompat.la' failed
make[2]: *** [libcompat.la] Error 127
make[2]: Leaving directory '/var/tmp/portage/sys-devel/flex-2.5.38/work/flex-2.5.38/lib'
Makefile:797: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/sys-devel/flex-2.5.38/work/flex-2.5.38'
Makefile:524: recipe for target 'all' failed
make: *** [all] Error 2
 * ERROR: sys-devel/flex-2.5.38::zinger-overlay failed (compile phase):
 *   emake failed

I've also tried all the flex ebuilds still in the tree without success.
(even tried installing lib-compat -- no luck
Comment 10 John Youells 2014-03-18 02:25:15 UTC
I grabbed a libfl.so.2 and related files from stage3-i686-funtoo-current-2014-03-11.tar.xz and was able to get flex-2.5.38 compiled and got out of the recussive compile jam ..... thanks for the help ... I couldn't find a compiled flex-2.5.38 with the right elf headers in any other distributions except funtoo.