[Scilab-Dev] Weird issue in the Scilab core
Stéphane Mottelet
stephane.mottelet at utc.fr
Tue Mar 11 15:29:27 CET 2008
Stéphane Mottelet a écrit :
> Sylvestre Ledru a écrit :
>> [...]
>>
>>
>>> /Users/mottelet/Documents/scilab-5.0-alpha-2/modules/arnoldi/.libs/libsciarnoldi.dylib(single
>>> module) definition of _icopy_
>>> /usr/bin/libtool: internal link edit command failed
>>>
>> Weird, I didn't have these issues.
>>
>> Your linker (ld) is provided by fink, isn't it?
>>
>> Sylvestre
>>
>>
> configure:3766: checking for ld used by GCC
> configure:3830: result: /usr/bin/ld
> configure:3839: checking if the linker (/usr/bin/ld) is GNU ld
> configure:3852: result: no
>
>
> I don't think so.
>
> S.
>
In fact, there are ld warnings, which don't stop compilation, and ld
errors, which
stop compilation. There are all about duplicated symbols when ld has to
produce the shared library of a given module. Trying to see what happens,
I noticed some confusing (to me) facts :
./modules/core/src/fortran/complexify.f
./modules/linear_algebra/src/fortran/complexify.f
# diff ./modules/core/src/fortran/complexify.f
./modules/linear_algebra/src/fortran/complexify.f
1,9d0
< c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
< c Copyright (C) INRIA
< c
< c This file must be used under the terms of the CeCILL.
< c This source file is licensed as described in the file COPYING, which
< c you should have received as part of this distribution. The terms
< c are also available at
< c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
<
43,46c34,37
< call scidcopy(isize,stk(ln),1,stk(lfree),1)
< call scidcopy(mn,0.0d0,0,stk(lfree+isize),1)
< call scidcopy(lw-isize-mn,stk(ln1),1,stk(lfree+isize+mn),1)
< call scidcopy(lw,stk(lfree),1,stk(ln),1)
---
> call dcopy(isize,stk(ln),1,stk(lfree),1)
> call dcopy(mn,0.0d0,0,stk(lfree+isize),1)
> call dcopy(lw-isize-mn,stk(ln1),1,stk(lfree+isize+mn),1)
> call dcopy(lw,stk(lfree),1,stk(ln),1)
I have supposed that these files are virtually identical and suppressed
any reference to
complexify.f in modules/linear_algebra/Makefile : the link error
dissappears, but this is
a quick and dirty fix. I suppose that on other plaforms (even on MacOSX with
different compilers) the link silently overwrites one of the two
definitions, but which
one ?
There are also some other problematic duplicates :
./modules/differential_equations/sci_gateway/fortran/bbvode.f
./modules/core/src/fortran/bcol.f
these files differ only by 3 lines of comments. Why both files are
needed on earth ?
I am still trying to find the right flags to make ld ignore these
duplicates.
S.
--
Stéphane Mottelet
Laboratoire de Mathématiques Appliquées
Université de Technologie de Compiègne
http://www.lmac.utc.fr/~mottelet
More information about the dev
mailing list