This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: gfortran 4.3.4: NINT() intrinsic triggers undefined references to '_llround' and '_llroundf'
- From: Marco Atzeri <marco_atzeri at yahoo dot it>
- To: cygwin at cygwin dot com
- Date: Sat, 16 Oct 2010 15:57:00 +0100 (BST)
- Subject: Re: gfortran 4.3.4: NINT() intrinsic triggers undefined references to '_llround' and '_llroundf'
--- Sab 16/10/10, Cornelis de Gier ha scritto:
> 2010/10/16 Marco Atzeri <xxxxxxxxx@xxxxxxx>:
^^^^^^^^^^^^^^^^^
don't feed spammer please
> > As Dave wrote the problem is inside cygwin
> >
> >> I thought it was just because we are failing to
> export
> >> them in the cygwin.din file. ?The correct .o
> files are
> >> compiled as part of the newlib libm build.
> >
> > but we forgot to make a patch.
> >
> > I will look on it.
> >
> > Marco
>
> Below follows a C program that triggers the same undefined
> reference
> (gcc 4.3.4, current cygwin). A simpler version using e.g.
> llround(4.5)
> is optimized away. A strings command on /lib/libm.a shows
> llround is
> not available.
>
> =================================
> #include <math.h>
> float test(){
> return(4.569);
> }???
>
> int main(){
> return(llround(test()));
> }
> =================================
> $ gcc -Wall -lm testllround.c
> /tmp/ccLX7lEo.o:testllround.c:(.text+0x32): undefined
> reference to `_llround'
> collect2: ld returned 1 exit status
> =================================
> $ strings /lib/libm.a | grep lround
> _lround
> _lroundf
> _lround
> __imp__lround
> _lroundf
> __imp__lroundf
> =================================
Of course. As I wrote it is a cygwin problem
not a fortran issue.
llround and llroundf are built in newlib (cygwin C library)
$ nm i686-pc-cygwin/newlib/libm.a |grep round |grep T
00000000 T _llround
00000000 T _lround
00000000 T _round
00000000 T _llroundf
00000000 T _lroundf
00000000 T _roundf
but are not included in the final libm.a
$ nm i686-pc-cygwin/winsup/cygwin/libm.a |grep round |grep T
00000000 T _lround
00000000 T _lroundf
00000000 T _round
00000000 T _roundf
I will prepare a patch in the coming days, so that
next cygwin release will have them.
Regards
Marco
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple