Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 186424 - net-analyzer/wireshark-0.99.6 fails to link due to undefined reference to `modf' on uclibc
Summary: net-analyzer/wireshark-0.99.6 fails to link due to undefined reference to `mo...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Peter Volkov (RETIRED)
URL: http://bugs.wireshark.org/bugzilla/sh...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-24 06:36 UTC by Natanael Copa
Modified: 2007-07-24 18:19 UTC (History)
1 user (show)

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


Attachments
wireshark-0.99.6-ldflag-lm.patch (wireshark-0.99.6-ldflag-lm.patch,727 bytes, patch)
2007-07-24 07:06 UTC, Natanael Copa
Details | Diff
config.log (config.log,168.54 KB, text/plain)
2007-07-24 07:16 UTC, Natanael Copa
Details
wiretap/config.log (config.log,99.14 KB, text/plain)
2007-07-24 07:17 UTC, Natanael Copa
Details
wireshark-0.99.6-lm.patch (wireshark-0.99.6-lm.patch,722 bytes, patch)
2007-07-24 08:25 UTC, Peter Volkov (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Natanael Copa 2007-07-24 06:36:02 UTC
I bet there is a missing -lm in LDFLAGS somewhere there.

/bin/sh ./libtool --tag=CC --mode=link i386-gentoo-linux-uclibc-gcc  -DINET6 -D_U_="__attribute__((unused))" -march=i386 -O3 -pipe -fomit-frame-pointer -fno-stack-protector -Wall -W -Wdeclaration-after-statement -Wendif-labels -Wpointer-arith -I/usr/local/include -I/usr/include/glib-1.2 -I/usr/lib/glib/include -DNETSNMP_ENABLE_IPV6 -march=i386 -pipe -O2 -Ulinux -Dlinux=linux -I. -I/usr/include  -L/usr/local/lib -o capinfos  capinfos.o plugins.o report_err.o privileges.o filesystem.o wiretap/libwiretap.la -L/usr/lib -rdynamic -lgmodule -lglib -lz 
i386-gentoo-linux-uclibc-gcc -DINET6 "-D_U_=__attribute__((unused))" -march=i386 -O3 -pipe -fomit-frame-pointer -fno-stack-protector -Wall -W -Wdeclaration-after-statement -Wendif-labels -Wpointer-arith -I/usr/local/include -I/usr/include/glib-1.2 -I/usr/lib/glib/include -DNETSNMP_ENABLE_IPV6 -march=i386 -pipe -O2 -Ulinux -Dlinux=linux -I. -I/usr/include -o .libs/mergecap mergecap.o merge.o -rdynamic  -L/usr/local/lib wiretap/.libs/libwiretap.so -L/usr/lib /usr/lib/libgmodule.so /usr/lib/libglib.so -lz
wiretap/.libs/libwiretap.so: undefined reference to `modf'
collect2: ld returned 1 exit status
make[2]: *** [mergecap] Error 1
make[2]: *** Waiting for unfinished jobs....
i386-gentoo-linux-uclibc-gcc -DINET6 "-D_U_=__attribute__((unused))" -march=i386 -O3 -pipe -fomit-frame-pointer -fno-stack-protector -Wall -W -Wdeclaration-after-statement -Wendif-labels -Wpointer-arith -I/usr/local/include -I/usr/include/glib-1.2 -I/usr/lib/glib/include -DNETSNMP_ENABLE_IPV6 -march=i386 -pipe -O2 -Ulinux -Dlinux=linux -I. -I/usr/include -o .libs/capinfos capinfos.o plugins.o report_err.o privileges.o filesystem.o -rdynamic  -L/usr/local/lib wiretap/.libs/libwiretap.so -L/usr/lib /usr/lib/libgmodule.so /usr/lib/libglib.so -lz
rm -f .libs/tshark.nm .libs/tshark.nmS .libs/tshark.nmT
creating .libs/tsharkS.c
(cd .libs && i386-gentoo-linux-uclibc-gcc  -march=i386 -O3 -pipe -fomit-frame-pointer -fno-stack-protector -c -fno-builtin "tsharkS.c")
wiretap/.libs/libwiretap.so: undefined reference to `modf'
collect2: ld returned 1 exit status
make[2]: *** [capinfos] Error 1
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-07-24 06:40:27 UTC
emerge --info please.
Comment 2 Natanael Copa 2007-07-24 06:46:38 UTC
Portage 2.1.2.9 (uclibc/x86/hardened, gcc-3.4.6, uclibc-0.9.28.3-r0, 2.6.22-gentoo-r1 i686)
=================================================================
System uname: 2.6.22-gentoo-r1 i686 Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz
Gentoo Base System release 2.0.0_alpha4
Timestamp of tree: Sat, 21 Jul 2007 23:00:02 +0000
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.61
sys-devel/automake:  1.6.3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i386-gentoo-linux-uclibc"
CFLAGS="-march=i386 -Os -pipe -fomit-frame-pointer"
CHOST="i386-gentoo-linux-uclibc"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo"
CXXFLAGS="-Os -pipe"
DISTDIR="/var/cache/distfiles"
FEATURES="autoconfig buildpkg distlocks metadata-transfer nodoc noinfo noman sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/var/cache/packages/default"
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 --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/alpine-portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X509 bitmap-fonts bri bzip2 cli cracklib dri encode expat extensions hardened iproute2 ipv6 jpeg lua mad midi mudflap ncurses netboot nonfsv4 ntfs ogg openmp oss pci pcmcia pic png pppd pri readline reflection rrdtool sensord session snmp speex spl ssl tdb truetype truetype-fonts type1-fonts uclibc uclibc++ udev usb userlocales wifi wordexp x86 xorg zaptel zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="uclibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" MISDN_CARDS="avmfritz hfcmulti hfcpci hfcsmini hfcsusb netjetpci sedlfax w6692pci xhfc" USERLAND="GNU" VIDEO_CARDS="dummy fbdev v4l apm ark chips cirrus cyrix epson glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng vesa vga via voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Peter Volkov (RETIRED) gentoo-dev 2007-07-24 06:56:51 UTC
Please, attach config.log and wiretap/config.log.
Comment 4 Natanael Copa 2007-07-24 07:06:14 UTC
Created attachment 125839 [details, diff]
wireshark-0.99.6-ldflag-lm.patch

You will get the config.log and wiretap/config.log in a second. (I blowed away my /var/tmp/..../wireshark dir so i need to recompile)
Comment 5 Natanael Copa 2007-07-24 07:16:28 UTC
Created attachment 125841 [details]
config.log

as requested
Comment 6 Natanael Copa 2007-07-24 07:17:02 UTC
Created attachment 125842 [details]
wiretap/config.log
Comment 7 Natanael Copa 2007-07-24 07:24:20 UTC
After applying the previously attatched wireshark-0.99.6-ldflag-lm.patch the linking works. "Forgetting" -lm is a common mistake since glibc works without it. Other libc's are not as forgiving.

Comment 8 Peter Volkov (RETIRED) gentoo-dev 2007-07-24 08:25:02 UTC
Created attachment 125849 [details, diff]
wireshark-0.99.6-lm.patch

Eh. Your clarification helped me to recall the problem.

But why do you fix compilation of the programs which compiles with libwireshark, while the problem is in libwireshark? Does this ^^ patch works for you?

Thank you for report, BTW :)
Comment 9 Peter Volkov (RETIRED) gentoo-dev 2007-07-24 08:35:30 UTC
Also, may be the correct solution will be use @LIBM@ and add AC_CHECK_LIBM into wiretap/configure.in which is part of libtool distribution (libtool.m4).
Comment 10 Natanael Copa 2007-07-24 09:05:23 UTC
(In reply to comment #9)
> Also, may be the correct solution will be use @LIBM@ and add AC_CHECK_LIBM into
> wiretap/configure.in which is part of libtool distribution (libtool.m4).
> 

Sounds like the proper way to handle this.
Should be reported upstream too.

btw. The patch you posted works too. (my patch was shooting at anything that was moving...)

Comment 11 Peter Volkov (RETIRED) gentoo-dev 2007-07-24 18:19:54 UTC
wireshark-0.99.6-r1 is commited with the fixes for this problem too.  Please,
report if I did anything wrong, as I do not have system with ulibc to test the
fix.

Again, thank you for report... fixed. :)