Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 113799 - Compile of dev-tcltk/expect fails if GCC option -mieee-fp is used
Summary: Compile of dev-tcltk/expect fails if GCC option -mieee-fp is used
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-28 08:02 UTC by Vladimir G. Ivanovic
Modified: 2005-11-28 12:20 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir G. Ivanovic 2005-11-28 08:02:51 UTC
Using the GCC option '-mieee-fp' (Controls whether or not the compiler uses IEEE
floating point comparisons.  These handle correctly the case where the result of
a comparison is unordered) with expect--5.42.1-r1 or expect-5.43.0 fails with
identical errors:

  libexpect5.43.a(pty_termios.o): In function `exp_getptymaster':
  pty_termios.c:(.text+0x1e9): undefined reference to `openpty'

during linking.

Reproducible: Always
Steps to Reproduce:
1. Include '-mieee-fp' in CFLAGS in /etc/make.conf.
2. emerge dev-tcltk/expect-5.xx.x
3.

Actual Results:  
gcc -pipe -Wall -march=k8 -mieee-fp -pipe -O2 -fno-strict-aliasing -O2 
-Wl,--export-dynamic -o expectk exp_main_tk.o libexpect5.43.a -L/usr/lib64
-ltk8.4 -L/usr/lib64 -ltcl8.4   -L/usr/lib64 -lX11 -ldl  -lieee -lm
-Wl,-rpath,/usr/lib64:/usr/lib:/usr/lib64:/usr/lib64
/usr/lib64/libieee.a:(.data+0x0): multiple definition of `_LIB_VERSION'
/usr/lib64/libieee.a:(.data+0x0): first defined here
libexpect5.43.a(pty_termios.o): In function `exp_getptymaster':
pty_termios.c:(.text+0x1e9): undefined reference to `openpty'
collect2: ld returned 1 exit status
make: *** [expect] Error 1
make: *** Waiting for unfinished jobs....
/usr/lib64/libieee.a:(.data+0x0): multiple definition of `_LIB_VERSION'
/usr/lib64/libieee.a:(.data+0x0): first defined here
libexpect5.43.a(pty_termios.o): In function `exp_getptymaster':
pty_termios.c:(.text+0x1e9): undefined reference to `openpty'
collect2: ld returned 1 exit status
make: *** [expectk] Error 1

!!! ERROR: dev-tcltk/expect-5.43.0 failed.

Expected Results:  
Successful emerge.

The workaround is to remove '-mieee-fp' from CFLAGS.

BTW, this is the only package which has given me problems when specifying
'-mieee-fp'.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-11-28 08:23:09 UTC
Don't put stupid C[XX]FLAGS into make.conf
Comment 2 Vladimir G. Ivanovic 2005-11-28 12:02:57 UTC
jakub@gentoo.org's comments are singularly unhelpful, and rude besides.

Someone though that there was a good reasone to include the option in GCC, and
there are no indications in the documentation of when it should not be used. And
frankly, I'd prefer that my code use IEEE comparisons, especially since they now
ensure that the results of aun unordered comparison are handled CORRECTLY as
opposed to incorrectly.
Comment 3 Vladimir G. Ivanovic 2005-11-28 12:16:15 UTC
See
http://www.gnu.org/software/libc/manual/html_node/FP-Comparison-Functions.html
for an explanation of why -mieee-fp exists.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2005-11-28 12:20:28 UTC
So ask upstream to fix it. We won't be filtering every obscure flag that someone
for whatever reason picks up and thinks to be a great one to put into make.conf
and later on finds that it breaks things.