#7864: libfplll tries to link 64-bit objects to 32-bit libstdc++.so
------------------------+---------------------------------------------------
Reporter: drkirkby | Owner: drkirkby
Type: defect | Status: new
Priority: major | Milestone: sage-4.5
Component: solaris | Keywords:
Author: | Upstream: Reported upstream. Little or no
feedback.
Reviewer: | Merged:
Work_issues: |
------------------------+---------------------------------------------------
Changes (by drkirkby):
* upstream: N/A => Reported upstream. Little or no feedback.
Comment:
Replying to [comment:2 wjp]:
> Could you check what compiler_lib_search_path is set to inside the
generated libtool in the fplll build directory? ({{{grep
compiler_lib_search_path= src/libtool}}})
Yes, sure.
Since posting this, I recompiled gcc and put it in the prefix
{{{
/usr/local/gcc-4.4.4-multilib
}}}
so the output from the build process is different to above. Here is the
output, which is achieved when CFLAGS, CXXFLAGS, CPPFLAGS and LDFLAGS all
have the option "-m64" addded.
{{{
g++ "-DPACKAGE_NAME=\"libfplll\"" "-DPACKAGE_TARNAME=\"libfplll\""
"-DPACKAGE_VERSION=\"3.0.12\"" "-DPACKAGE_STRING=\"libfplll 3.0.12\""
"-DPACKAGE_BUGREPORT=\"\"" "-DPACKAGE=\"libfplll\"" "-DVERSION=\"3.0.12\""
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
-DHAVE_LIBGMP=1 -DHAVE_LIBMPFR=1 -DSTDC_HEADERS=1 -DHAVE_FLOAT_H=1
-DHAVE_LIMITS_H=1 -DHAVE_STDLIB_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1
-DHAVE_STDBOOL_H=1 -DHAVE_FLOOR=1 -DHAVE_POW=1 -DHAVE_RINT=1 -DHAVE_SQRT=1
-DHAVE_STRTOL=1 -DHAVE_LIBGMP=1 -DHAVE_LIBMPFR=1 -I. -I.
-I/export/home/drkirkby/sage-4.5.alpha0/local/include/ -m64 -fPIC
-I/export/home/drkirkby/sage-4.5.alpha0/local/include/
-L/export/home/drkirkby/sage-4.5.alpha0/local/lib -m64 -MT dummy.lo -MD
-MP -MF .deps/dummy.Tpo -c dummy.cpp -fPIC -DPIC -o .libs/dummy.o
In file included from src/main.h:27,
from dummy.cpp:11:
src/fplll.h:29:1: warning: "NAN" redefined
In file included from src/defs.h:36,
from src/util.h:29,
from src/lexer.h:26,
from src/main.h:26,
from dummy.cpp:11:
src/dpe.h:30:1: warning: this is the location of the previous definition
g++ "-DPACKAGE_NAME=\"libfplll\"" "-DPACKAGE_TARNAME=\"libfplll\""
"-DPACKAGE_VERSION=\"3.0.12\"" "-DPACKAGE_STRING=\"libfplll 3.0.12\""
"-DPACKAGE_BUGREPORT=\"\"" "-DPACKAGE=\"libfplll\"" "-DVERSION=\"3.0.12\""
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
-DHAVE_LIBGMP=1 -DHAVE_LIBMPFR=1 -DSTDC_HEADERS=1 -DHAVE_FLOAT_H=1
-DHAVE_LIMITS_H=1 -DHAVE_STDLIB_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1
-DHAVE_STDBOOL_H=1 -DHAVE_FLOOR=1 -DHAVE_POW=1 -DHAVE_RINT=1 -DHAVE_SQRT=1
-DHAVE_STRTOL=1 -DHAVE_LIBGMP=1 -DHAVE_LIBMPFR=1 -I. -I.
-I/export/home/drkirkby/sage-4.5.alpha0/local/include/ -m64 -fPIC
-I/export/home/drkirkby/sage-4.5.alpha0/local/include/
-L/export/home/drkirkby/sage-4.5.alpha0/local/lib -m64 -MT dummy.lo -MD
-MP -MF .deps/dummy.Tpo -c dummy.cpp -o dummy.o >/dev/null 2>&1
/bin/sh ./libtool --tag=CXX --mode=link g++ -fPIC
-I/export/home/drkirkby/sage-4.5.alpha0/local/include/
-L/export/home/drkirkby/sage-4.5.alpha0/local/lib -m64 -m64 -o
libfplll.la -rpath /export/home/drkirkby/sage-4.5.alpha0/local/lib
-version-info 1:0:1 dummy.lo -lgmp -lmpfr -lmpfr -lgmp -lmpfr -lgmp
g++ -shared -nostdlib -m64 /usr/lib/amd64/crti.o /usr/lib/amd64/values-
Xa.o /usr/local/gcc-4.4.4-multilib/lib/gcc/i386-pc-
solaris2.11/4.4.4/amd64/crtbegin.o .libs/dummy.o -Wl,-R
-Wl,/export/home/drkirkby/sage-4.5.alpha0/local/lib -Wl,-R
-Wl,/usr/local/gcc-4.4.4-multilib/lib -Wl,-R
-Wl,/export/home/drkirkby/sage-4.5.alpha0/local/lib -Wl,-R
-Wl,/usr/local/gcc-4.4.4-multilib/lib
-L/export/home/drkirkby/sage-4.5.alpha0/local/lib
/export/home/drkirkby/sage-4.5.alpha0/local/lib/libmpfr.so
/export/home/drkirkby/sage-4.5.alpha0/local/lib/libgmp.so
-L/usr/local/gcc-4.4.4-multilib/lib/gcc/i386-pc-solaris2.11/4.4.4/amd64
-L/usr/local/gcc-4.4.4-multilib/lib/gcc/i386-pc-
solaris2.11/4.4.4/../../../amd64 -L/lib/amd64 -L/usr/lib/amd64
-L/usr/local/gcc-4.4.4-multilib/lib/gcc/i386-pc-solaris2.11/4.4.4
-L/usr/local/gcc-4.4.4-multilib/lib/gcc/i386-pc-solaris2.11/4.4.4/../../..
/usr/local/gcc-4.4.4-multilib/lib/libstdc++.so -lm -lgcc_s
/usr/local/gcc-4.4.4-multilib/lib/gcc/i386-pc-
solaris2.11/4.4.4/amd64/crtend.o /usr/lib/amd64/crtn.o -m64 -m64 -Wl,-h
-Wl,libfplll.so.0 -o .libs/libfplll.so.0.1.0
ld: fatal: file /usr/local/gcc-4.4.4-multilib/lib/libstdc++.so: wrong ELF
class: ELFCLASS32
ld: fatal: file processing errors. No output written to
.libs/libfplll.so.0.1.0
collect2: ld returned 1 exit status
make[3]: *** [libfplll.la] Error 1
make[3]: Leaving directory
`/export/home/drkirkby/sage-4.5.alpha0/spkg/build/libfplll-3.0.12.p1/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/export/home/drkirkby/sage-4.5.alpha0/spkg/build/libfplll-3.0.12.p1/src'
Error building libfplll
real 0m25.046s
user 0m19.920s
sys 0m4.043s
sage: An error occurred while installing libfplll-3.0.12.p1
}}}
Here is the output you requested.
{{{
drkir...@hawk:~/sage-4.5.alpha0/spkg/build/libfplll-3.0.12.p1$ grep
compiler_lib_search_path= src/libtool
compiler_lib_search_path=""
compiler_lib_search_path="-L/export/home/drkirkby/sage-4.5.alpha0/local/lib
-L/usr/local/gcc-4.4.4-multilib/lib/gcc/i386-pc-solaris2.11/4.4.4/amd64
-L/usr/local/gcc-4.4.4-multilib/lib/gcc/i386-pc-
solaris2.11/4.4.4/../../../amd64 -L/lib/amd64 -L/usr/lib/amd64
-L/export/home/drkirkby/sage-4.5.alpha0/local/lib
-L/usr/local/gcc-4.4.4-multilib/lib/gcc/i386-pc-solaris2.11/4.4.4
-L/usr/local/gcc-4.4.4-multilib/lib/gcc/i386-pc-
solaris2.11/4.4.4/../../.."
compiler_lib_search_path=""
}}}
If I manually add
{{{
-L /usr/local/gcc-4.4.4-multilib/lib/amd64 -R
/usr/local/gcc-4.4.4-multilib/lib/amd64
}}}
to CFLAGS, CXXFLAGS etc, so this will link properly. But it should not be
necessary to do this.
I sent this problem via email today to the three developers listed in
src/README.
Dave
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7864#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.