* gfortran 4.3.4: NINT() intrinsic triggers undefined references to '_llround' and '_llroundf'
@ 2010-10-15 20:58 Cornelis de Gier
2010-10-16 5:38 ` R: " Marco Atzeri
2010-10-18 15:46 ` R: " Marco Atzeri
0 siblings, 2 replies; 7+ messages in thread
From: Cornelis de Gier @ 2010-10-15 20:58 UTC (permalink / raw)
To: cygwin
The NINT() intrinsic in current gfortran under current cygwin triggers
undefined references to '_llround' and '_llroundf'. I found a somewhat
related post here:
http://sourceware.org/ml/cygwin/2010-06/msg00369.html , but I could
not deduce a solution from this message.
Below follows a small test program and the output of gfortran. The
test program worked OK on a linux system.)
====================
program testnint
integer, parameter :: kr64 = selected_real_kind(15,307)
integer, parameter :: ki64 = selected_int_kind(18)
real(kr64)::dp=1.
real::r=2.
write(*,*),nint(r,ki64)
write(*,*),nint(dp,ki64)
endprogram testnint
====================
$ gfortran -Wall testnint.f90
/tmp/ccqOJVB5.o:testnint.f90:(.text+0x5c): undefined reference to `_llroundf'
/tmp/ccqOJVB5.o:testnint.f90:(.text+0xd1): undefined reference to `_llround'
collect2: ld returned 1 exit status
====================
Cornelis
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* R: gfortran 4.3.4: NINT() intrinsic triggers undefined references to '_llround' and '_llroundf'
2010-10-15 20:58 gfortran 4.3.4: NINT() intrinsic triggers undefined references to '_llround' and '_llroundf' Cornelis de Gier
@ 2010-10-16 5:38 ` Marco Atzeri
2010-10-16 12:12 ` Cornelis de Gier
2010-10-18 15:46 ` R: " Marco Atzeri
1 sibling, 1 reply; 7+ messages in thread
From: Marco Atzeri @ 2010-10-16 5:38 UTC (permalink / raw)
To: cygwin
--- Ven 15/10/10, Cornelis de Gier ha scritto:
> The NINT() intrinsic in current
> gfortran under current cygwin triggers
> undefined references to '_llround' and '_llroundf'. I found
> a somewhat
> related post here:
> http://sourceware.org/ml/cygwin/2010-06/msg00369.html ,
> but I could
> not deduce a solution from this message.
>
> Below follows a small test program and the output of
> gfortran. The
> test program worked OK on a linux system.)
> ====================
> program testnint
> integer, parameter :: kr64 = selected_real_kind(15,307)
> integer, parameter :: ki64 = selected_int_kind(18)
>
> real(kr64)::dp=1.
> real::r=2.
>
> write(*,*),nint(r,ki64)
> write(*,*),nint(dp,ki64)
>
> endprogram testnint
> ====================
> $ gfortran -Wall testnint.f90
> /tmp/ccqOJVB5.o:testnint.f90:(.text+0x5c): undefined
> reference to `_llroundf'
> /tmp/ccqOJVB5.o:testnint.f90:(.text+0xd1): undefined
> reference to `_llround'
> collect2: ld returned 1 exit status
> ====================
>
>
> Cornelis
>
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
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: gfortran 4.3.4: NINT() intrinsic triggers undefined references to '_llround' and '_llroundf'
2010-10-16 5:38 ` R: " Marco Atzeri
@ 2010-10-16 12:12 ` Cornelis de Gier
2010-10-16 15:11 ` Marco Atzeri
0 siblings, 1 reply; 7+ messages in thread
From: Cornelis de Gier @ 2010-10-16 12:12 UTC (permalink / raw)
To: cygwin
2010/10/16 Marco Atzeri <marco_atzeri@yahoo.it>:
> 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
=================================
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: gfortran 4.3.4: NINT() intrinsic triggers undefined references to '_llround' and '_llroundf'
2010-10-16 12:12 ` Cornelis de Gier
@ 2010-10-16 15:11 ` Marco Atzeri
0 siblings, 0 replies; 7+ messages in thread
From: Marco Atzeri @ 2010-10-16 15:11 UTC (permalink / raw)
To: cygwin
--- 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* R: gfortran 4.3.4: NINT() intrinsic triggers undefined references to '_llround' and '_llroundf'
2010-10-15 20:58 gfortran 4.3.4: NINT() intrinsic triggers undefined references to '_llround' and '_llroundf' Cornelis de Gier
2010-10-16 5:38 ` R: " Marco Atzeri
@ 2010-10-18 15:46 ` Marco Atzeri
2010-10-19 11:56 ` Cornelis de Gier
1 sibling, 1 reply; 7+ messages in thread
From: Marco Atzeri @ 2010-10-18 15:46 UTC (permalink / raw)
To: cygwin, Cornelis de Gier
--- Ven 15/10/10, Cornelis de Gier ha scritto:
> The NINT() intrinsic in current
> gfortran under current cygwin triggers
> undefined references to '_llround' and '_llroundf'. I found
> a somewhat
> related post here:
> http://sourceware.org/ml/cygwin/2010-06/msg00369.html ,
> but I could
> not deduce a solution from this message.
>
> Below follows a small test program and the output of
> gfortran. The
> test program worked OK on a linux system.)
> ====================
> program testnint
> integer, parameter :: kr64 = selected_real_kind(15,307)
> integer, parameter :: ki64 = selected_int_kind(18)
>
> real(kr64)::dp=1.
> real::r=2.
>
> write(*,*),nint(r,ki64)
> write(*,*),nint(dp,ki64)
>
> endprogram testnint
> ====================
> $ gfortran -Wall testnint.f90
> /tmp/ccqOJVB5.o:testnint.f90:(.text+0x5c): undefined
> reference to `_llroundf'
> /tmp/ccqOJVB5.o:testnint.f90:(.text+0xd1): undefined
> reference to `_llround'
> collect2: ld returned 1 exit status
> ====================
>
>
> Cornelis
>
next cygwin release/snapshot will solve it.
http://cygwin.com/ml/cygwin-patches/2010-q4/msg00005.html
$ gfortran -Wall testninit.f90 -o testninit
$ ./testninit
2
1
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-10-19 12:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-15 20:58 gfortran 4.3.4: NINT() intrinsic triggers undefined references to '_llround' and '_llroundf' Cornelis de Gier
2010-10-16 5:38 ` R: " Marco Atzeri
2010-10-16 12:12 ` Cornelis de Gier
2010-10-16 15:11 ` Marco Atzeri
2010-10-18 15:46 ` R: " Marco Atzeri
2010-10-19 11:56 ` Cornelis de Gier
2010-10-19 13:18 ` Marco Atzeri
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).