X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Message-ID: <448494.36555.qm@web25508.mail.ukl.yahoo.com> Date: Sat, 16 Oct 2010 15:57:00 +0100 (BST) From: Marco Atzeri Subject: Re: gfortran 4.3.4: NINT() intrinsic triggers undefined references to '_llround' and '_llroundf' To: cygwin AT cygwin DOT com In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --- Sab 16/10/10, Cornelis de Gier ha scritto: > 2010/10/16 Marco Atzeri : ^^^^^^^^^^^^^^^^^=20=20=20 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. =A0The 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 >=20 > 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. >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > #include > float test(){ > return(4.569); > }=A0=A0=A0=20 >=20 > int main(){ > return(llround(test())); > } > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > $ gcc -Wall -lm testllround.c > /tmp/ccLX7lEo.o:testllround.c:(.text+0x32): undefined > reference to `_llround' > collect2: ld returned 1 exit status > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > $ strings /lib/libm.a | grep lround > _lround > _lroundf > _lround > __imp__lround > _lroundf > __imp__lroundf > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D 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