CVS build error with new sort
Thomas Treichl
Thomas.Treichl at gmx.net
Wed Apr 2 11:53:16 CDT 2008
John W. Eaton schrieb:
> On 12-Feb-2008, John Swensen wrote:
> | On Feb 12, 2008, at 3:45 PM, John W. Eaton wrote:
> | > Hmm. I don't think the explicit instantiations in this file should
> | > actually be needed. I committed the following change. If you update,
> | > does it work now, or do you still see multiple definitions for some
> | > symbols?
> | >
> | > Thanks,
> | >
> | > jwe
> |
> | That fixed some of them. I don't get the same error now, but I still
> | get a linker error when linking liboctave.dylib
> |
> | ld: duplicate symbol Array<long long>::ArrayRep::length() constin pic/
> | Array-so.o and pic/Array-i.o
> |
> | I didn't include the nm output, grepping for ArrayRep, because it is
> | very, very long.
> |
> | Let me know if seeing it will help you figure out where this one is
> | doubly-defined.
>
> My guess is that this happens because on your system, std::streamoff
> is a typedef for "long long int". You can probably avoid the problem
> by commenting out the line
>
> INSTANTIATE_ARRAY_AND_ASSIGN (std::streamoff, OCTAVE_API);
>
> in liboctave/Array-so.cc.
>
> If it is a typedef problem, then how can we detect automatically at
> configure time so we can avoid the bug?
>
> BTW, I think this doesn't happen on my system because template
> instantiations produce "weak" symbols. If there are multiple weak
> symbols with the same name, the linker then uses only one and doesn't
> issue the error message you see.
Some time has been passed on this thread but the problem still follows me on
MacOSX. You have been right with std::streamoff==long long int. I also tried to
use several variations of -weak options for the linker but has not been successful.
So I gave it a try to write a configure test for it. Can somebody please have a
look at it and tell me if this would be the right way to do it (can the
AC_CHECK_TYPES for std::streamoff be neglected)? If so then I can prepare a
changeset for the current sources the following days. My idea was then to change
liboctave/Array-i.cc:#if defined (HAVE_LONG_LONG_INT)
into
liboctave/Array-i.cc:#if defined (HAVE_LONG_LONG_INT) &&
!defined (HAVE_LONG_LONG_INT_STREAMOFF)
Thomas
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: aclocal.m4
Url: https://www.cae.wisc.edu/pipermail/octave-maintainers/attachments/20080402/ecbe47c5/attachment.ksh
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Makefile
Url: https://www.cae.wisc.edu/pipermail/octave-maintainers/attachments/20080402/ecbe47c5/attachment-0001.ksh
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: configure.in
Url: https://www.cae.wisc.edu/pipermail/octave-maintainers/attachments/20080402/ecbe47c5/attachment-0002.ksh
More information about the Octave-maintainers
mailing list