[CLN-list] Multiple definition errors when natively compiling CLN
1.1.13 with GCC 3.4 for ARM target
Alexei Sheplyakov
varg at theor.jinr.ru
Wed Feb 28 10:59:39 CET 2007
Hello!
On Mon, Feb 26, 2007 at 11:03:38PM +0000, Simon Pickering wrote:
> I'm attempting to compile CLN 1.1.13 using GCC 3.4 (inside scratchbox
> using qemu which allows GCC to be a native ARM compiler). I am
> compiling for the Nokia N800.
> I'm compiling with the following configure command:
>
> ./configure --with-gmp --prefix=/usr
>
> and with the following env vars:
> CPPFLAGS="-DNO_ASM"
> CXXFLAGS="-O2 -fno-exceptions -finline-limit=1000 -mfpu=vfp
> -mfloat-abi=softfp"
>
> I get the following error (trimmed as the preceeding command is very long):
[snipped infamous linker error due to duplicated symbols]
> I did a search of the mailing list archives and could only find this
> mentioned for MinGW.
The same problem exits for Darwin (a.k.a. Mac OS X).
> There was no solution as far as I could tell,
The solution is to use static library (I admit it is ugly).
[snipped]
> I am trying to compile Qalculate, and even if I compile CLN to be a
> static library, I get linking errors due to the multiple functions when
> compiling libqalculate.
> Is there any way around this problem? Any other -finline*/--param
> options I could try, etc., or any other ideas?
Both CLN and Qalculate build just fine on Linux/arm (both dynamic and
static libraries), see e.g.
http://buildd.debian.org/fetch.cgi?pkg=cln;ver=1.1.13-2;arch=arm;stamp=1158809249
http://buildd.debian.org/fetch.cgi?pkg=libqalculate;ver=0.9.4-5;arch=arm;stamp=1152862989
The difference seems to be: 1) real hardware, 2) compilers (Debian
uses GCC 4.1), 3) compiler flags (no '-mfpu=vfp -mfloat-abi=softfp').
So I suggest to
1) try to build with CXXFLAGS='-O2 -fno-exceptions -finline-limit=1000'
and CPPFLAGS='-DNO_ASM', run make check after compilation
2) if that fails, upgrade the compiler
Best regards,
Alexei
--
All science is either physics or stamp collecting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
Url : http://www.cebix.net/pipermail/cln-list/attachments/20070228/43223873/attachment.pgp
More information about the CLN-list
mailing list