[Scilab-Dev] trunk, other multiple symbols

Stéphane Mottelet stephane.mottelet at utc.fr
Fri Mar 14 14:21:54 CET 2008


Sylvestre Ledru a écrit :
> Le vendredi 14 mars 2008 à 11:00 +0100, Stéphane Mottelet a écrit :
>   
>> Hi all,
>>
>> I am still trying to compile Scilab, with the combination
>> apple gcc (4.0.1) + gfortran (4.2 this time) on 10.4, and
>> I can notice the following duplicate symbols.
>> Is it a good thing to suppress them because it could
>> be harmful some day ?
>>     
> I don't think it is a good thing to disable this kind of warnings (to
> tell you the truth, I looked yesterday how to reproduce the same
> behaviour under Linux).
> This could work:
> LDFLAGS="-z muldefs"
> The "man ld" says:
> muldefs - Allows multiple definitions.
>
>
> Sylvestre
>   
The man says :

 --allow-multiple-definition
       -z muldefs
Normally when a symbol is defined multiple times, the linker will report a fatal error. 
These options allow multiple definitions and the first definition will be used.

Well,  it suppresses the error, but I understand that under Linux the warnings and
error I encounter (in OSX) do not occur ? Under OSX we have
the flag -multiply_defined :

       -multiply_defined treatment (32-bit only)
              Specifies how multiply defined symbols in dynamic libraries when
              -twolevel_namespace  is  in effect are to be treated.  treatment
              can be: error, warning, or suppress.  Which cause the  treatment
              of  multiply  defined  symbols  in  dynamic libraries as either,
              errors, warnings, or suppresses the checking of multiply symbols
              from  dynamic  libraries  when -twolevel_namespace is in effect.
              The default is to treat  multiply  defined  symbols  in  dynamic
              libraries as warnings when -twolevel_namespace is in effect.

but it does not seem to work, i.e. when adding 
-multiply_defined suppress I have the same behavior as without. The last error I
have is in Scicos module

Making all in scicos
[...]
ld: multiple definitions of symbol _cosdebug_
.libs/libsciscicos_la-scicos.o definition of _cosdebug_ in section (__DATA,__common)
/Users/mottelet/svn/scilab/scilab/modules/core/.libs/libscicore.dylib(single module) definition of _cosdebug_

this is the same for symbols _dtosci_, _itosci_, _scsptr_, _dbcos_
_costol_, _coshlt_

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