[RFC] Full float128, third iteration
Steve Kargl
sgk@troutmask.apl.washington.edu
Fri Sep 10 16:51:00 GMT 2010
On Fri, Sep 10, 2010 at 05:31:24PM +0200, FX wrote:
> > $ gfortran-4.6 -Wall test_qp.f90 -o test_qp
> > /usr/local/gfortran/bin/../lib/gcc/i686-pc-cygwin/4.6.0/../../../libgfortran.a(write.o):(.text$write_float+0x1fc): undefined reference to `_libgfortran_dtoaq'
> > /usr/local/gfortran/bin/../lib/gcc/i686-pc-cygwin/4.6.0/../../../libgfortran.a(read.o):(.text$__gfortrani_convert_real+0x95): undefined reference to `_libgfortran_strtopQ'
> > collect2: ld returned 1 exit status
> >
> > (I have also tried adding '-L/foo/lib -lquad' and '/foo/bin' to PATH)
> >
> > What have I done of wrong?
>
> Hard to tell. Do you have those symbols defined in the libquad shared lib? (You should be able to check using "nm".)
> Also, why are you using a static library for libgfortran instead of shared library?
>
I'm seeing a similar issue with -static linkage.
% gfc4x -o z norm2_3.f90 -L/usr/home/sgk/work/lib -lquad -static
/usr/home/sgk/work/4x/bin/../lib/gcc/x86_64-unknown-freebsd9.0/4.6.0/../../../libgfortran.a(n rm2_r16.o): In function `_gfortran_norm2_r16':
/home/sgk/gcc/obj4x/x86_64-unknown-freebsd9.0/libgfortran/../../../gcc4x/libgfortran/generated/norm2_r16.c:166: undefined reference to `fabsq'
/usr/home/sgk/work/4x/bin/../lib/gcc/x86_64-unknown-freebsd9.0/4.6.0/../../../libgfortran.a(write.o): In function `write_float':
/home/sgk/gcc/obj4x/x86_64-unknown-freebsd9.0/libgfortran/../../../gcc4x/libgfortran/io/write_float.def:1066: undefined reference to `libgfortran_dtoaq'
/usr/home/sgk/work/4x/bin/../lib/gcc/x86_64-unknown-freebsd9.0/4.6.0/../../../libgfortran.a(read.o): In function `_gfortrani_convert_real':
/home/sgk/gcc/obj4x/x86_64-unknown-freebsd9.0/libgfortran/../../../gcc4x/libgfortran/io/read.c:168: undefined reference to `libgfortran_strtopQ'
collect2: ld returned 1 exit status
% nm ~/work/lib/libquad.a | grep strtop
strtopQ.o:
0000000000000000 T libgfortran_strtopQ
% nm ~/work/lib/libquad.a | grep fabs
U fabsq
U fabsq
U fabsq
U fabsq
U fabsq
U fabsq
U fabsq
U fabsq
U fabsq
U fabsq
U fabsq
fabsq.o:
0000000000000000 T fabsq
U fabsq
With the shared library,
troutmask:sgk[233] gfc4x -o z norm2_3.f90 -L/usr/home/sgk/work/lib -lquad
troutmask:sgk[234] ./z
/libexec/ld-elf.so.1: Shared object "libquad.so.0" not found, required by "z"
troutmask:sgk[235] setenv LD_LIBRARY_PATH $HOME/work/lib
troutmask:sgk[236] setenv LD_RUN_PATH $HOME/work/lib
troutmask:sgk[237] gfc4x -o z norm2_3.f90 -L/usr/home/sgk/work/lib -lquad
troutmask:sgk[238] ./z
The location of the terminal symbol in libquad.a looks very
suspicious, ie., 00000000000000.
--
Steve
More information about the Fortran
mailing list