[GiNaC-list] compiler compatibility?
varg at theor.jinr.ru
Thu Apr 24 16:34:21 CEST 2008
On Thu, Apr 24, 2008 at 08:45:14AM -0500, Chris Bouchard wrote:
> Invocation of g++
> ./g++ ginactest.cpp -o ginactest.exe /usr/lib/libgslcblas.so.0.0.0 -I/home/theorist/cbouchrd/GiNaC/ginac -L/home/theorist/cbouchrd/local/lib -lcln -lginac
It looks like the headers and the library come from different (incompatible)
versions of GiNaC (that is, headers from 1.4.X and library from 1.3.Y)...
> Error messages
> /tmp/ccojEpA1.o(.gnu.linkonce.t._ZN5GiNaC5powerC1ERKNS_2exES3_+0xa): In function `GiNaC::power::power(GiNaC::ex const&, GiNaC::ex const&)':
> : undefined reference to `GiNaC::power::tinfo_static'
> /tmp/ccojEpA1.o(.gnu.linkonce.r._ZTVN5GiNaC9containerISt6vectorEE+0x6c): undefined reference to `GiNaC::basic::has(GiNaC::ex const&, unsigned int) const'
> /tmp/ccojEpA1.o(.gnu.linkonce.r._ZTVN5GiNaC9containerISt6vectorEE+0x84): undefined reference to `GiNaC::basic::is_polynomial(GiNaC::ex const&) const'
> /tmp/ccojEpA1.o(.gnu.linkonce.t._ZN5GiNaC9containerISt6vectorE9get_tinfoEv+0x4): In function `GiNaC::container<std::vector>::get_tinfo()':
> : undefined reference to `GiNaC::container<std::vector>::tinfo_static'
> collect2: ld returned 1 exit status
... so some inlined methods/functions present in the headers can not be
resolved from the shared library.
> I'm having, what I think are, problems linking to GiNaC's precompiled libraries.
> I'm using gcc 3.4.6, and according to the gcc msg board I will likely be
> unsuccessful linking to any library compiled with a different version of gcc.
That depends (ABI changes are very platform dependent). On GNU/Linux x86 and
x86_64 g++ [3.4, 4.2] seem to have compatible ABIs, so one can mix C++
libraries compiled with g++ [3.4, 4.2] (unless those libraries are
incompatible for reasons other than compiler and standard library ABI
> I haven't noticed mention of the compiler version used to build GiNaC's libraries
> in the GiNaC documentation and was wondering if you had this information readily
Actually, we have some "know to work with" list in the `INSTALL' file.
> Does this explanation sound legitimate to you?
All science is either physics or stamp collecting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 827 bytes
Desc: Digital signature
Url : http://www.cebix.net/pipermail/ginac-list/attachments/20080424/a3d1682b/attachment.sig
More information about the GiNaC-list