#3730: hp2ps: Deviation.c:(.text+0x42b): undefined reference to `sqrt'
-------------------------------+--------------------------------------------
Reporter: slyfox | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Build System | Version: 6.10.4
Resolution: | Keywords: autoconf, libm
Os: Linux | Testcase:
Architecture: x86_64 (amd64) | Failure: Building GHC failed
-------------------------------+--------------------------------------------
Comment (by slyfox):
Sigh, i tried so hard.
Replying to [comment:1 asuffield]:
> All of this bug report is completely misleading. This has got nothing to
do with libbfd or libiberty, neither of which defines atan. The correct
diagnostic line was this one:
>
> {{{
> conftest.c:109: warning: conflicting types for built-in function 'atan'
> }}}
>
>
> Somebody added a builtin atan function to gcc. Hence, you no longer need
to link libm in order to use atan.
>
> The test in configure.ac needs changing to check for sqrt. That's all.
Nope, autoconf's atan intentionally has nonbuiltin prototype, different
from gcc's to test _linkage_.
No matter what builting gcc has - it will not link w/o libm, and it does
not link on my system (with the same warning), so your point is incorrect.
Builtin does not affect process of libm needness resolution. Look at my
system:
{{{
configure:18619: gcc -o conftest -g -O2 conftest.c -lbfd -liberty >&5
conftest.c:108: warning: conflicting types for built-in function 'atan'
/tmp/ccSFmqh0.o: In function `main':
/tmp/z/ghc-6.10.4/conftest.c:119: undefined reference to `atan'
collect2: ld returned 1 exit status
configure:18625: $? = 1
}}}
The second - sqrt will be found in libbfd as well, as original bug
reporter has libm in depends on libbfd (don't ask me why, being silly it's
absolutely legal).
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3730#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs