No subject
Mon Sep 20 21:34:08 CEST 2010
Is my guess correct? (In general it's a good idea to specify
the compiler version, i.e. the output of g++ --version).
> The build seemed to be going well until linking, when I got the following error:
>
> ../src/.libs/libcln.a(cl_F_decode.o):cl_F_decode.cc:(.text$_ZN3cln12decode_floatERKNS_5cl_LFE[cln::decode_float(cln::cl_LF const&)]+0x0): multiple definition of `cln::decode_float(cln::cl_LF const&)'
> ../src/.libs/libcln.a(cl_LF_decode.o):d:\School\Grad\Thesis\Prototype09\cln-1.3.1\src/float/lfloat/misc/cl_LF_decode.cc:19: first defined here
>
> From looking at the following files, there indeed seems to be
> a multiple definition?
Not exactly, there are two overloaded functions which differ only
in the return type, that is
const decoded_lfloat decode_float (const cl_LF& x)
(in src/float/lfloat/misc/cl_LF_decode.cc), and
inline const decoded_float decode_float (const cl_LF& x)
(in src/float/misc/cl_F_decode.cc).
This violates the Standard (specifically, [over.load], paragraph 2,
explicitly forbids this), and is a bug. I'm afraid fixing it will
take a while (and will certainly break binary and source compatibility).
Meanwhile you can try the following work-arounds:
1. Compile CLN with optimization turned on:
make clean
CXXFLAGS='-O2 -g -Wall' CFLAGS='-O2 -g -Wall' ./configure [more options here]
make
make check
This may force GCC to not emit out-of-line version of
inline const decode_float decode_float(const cl_LF&)
2. Use GCC 3.4 (to compile CLN itself, you can compile your programs
with newer GCCs)
Best regards,
Alexei
More information about the CLN-list
mailing list