← Back to team overview

yade-dev team mailing list archive

Re: compilation error

 

Hi,
me I had your problem few times.
It comes because in your build-*/ folder, where all plugins*.cpp are stored, it may happen that two of these plugin* file contain the same line, like for example:

in plugins0.cpp:
#include "/home/3S-LAB/ecatalano/Yade/yade/pkg/dem/Engine/GlobalEngine/GlobalStiffnessTimeStepper.cpp"

and the same in plugins1.cpp:
#include "/home/3S-LAB/ecatalano/Yade/yade/pkg/dem/Engine/GlobalEngine/GlobalStiffnessTimeStepper.cpp"

so that you have a "multiple definition" error.

To solve the problem, it is sufficient to delete the line from one the two files.

Much better, especially in the case of several cases like this one, is to type

"scons -c"

and then recompile, type "scons".

Ema



On 09/07/2010 08:10 AM, Honza Stránský wrote:
Hello,
while compiling, I got these error:

L libplugins.so
/home/yade/yade-src/build-trunk/plugins3.os: In function `TriaxialCompressionEngine::~TriaxialCompressionEngine()':
plugins3.cpp:(.text+0xc10): multiple definition of `TriaxialCompressionEngine::~TriaxialCompressionEngine()'
/home/yade/yade-src/build-trunk/plugins2.os:plugins2.cpp:(.text+0x830): first defined here
/home/yade/yade-src/build-trunk/plugins3.os: In function `TriaxialCompressionEngine::~TriaxialCompressionEngine()':
plugins3.cpp:(.text+0xc90): multiple definition of `TriaxialCompressionEngine::~TriaxialCompressionEngine()'
/home/yade/yade-src/build-trunk/plugins2.os:plugins2.cpp:(.text+0x8b0): first defined here
/home/yade/yade-src/build-trunk/plugins3.os: In function `TriaxialCompressionEngine::~TriaxialCompressionEngine()':
plugins3.cpp:(.text+0xd10): multiple definition of `TriaxialCompressionEngine::~TriaxialCompressionEngine()'
/home/yade/yade-src/build-trunk/plugins2.os:plugins2.cpp:(.text+0x930): first defined here
/home/yade/yade-src/build-trunk/plugins3.os: In function `TriaxialCompressionEngine::setContactProperties(double)':
plugins3.cpp:(.text+0xe040): multiple definition of `TriaxialCompressionEngine::setContactProperties(double)'
/home/yade/yade-src/build-trunk/plugins2.os:plugins2.cpp:(.text+0x60c0): first defined here
/home/yade/yade-src/build-trunk/plugins3.os: In function `TriaxialCompressionEngine::doStateTransition(int)':
plugins3.cpp:(.text+0xe230): multiple definition of `TriaxialCompressionEngine::doStateTransition(int)'
/home/yade/yade-src/build-trunk/plugins2.os:plugins2.cpp:(.text+0x62b0): first defined here
/home/yade/yade-src/build-trunk/plugins3.os:(.bss+0x0): multiple definition of `TriaxialCompressionEngine::logger'
/home/yade/yade-src/build-trunk/plugins2.os:(.bss+0xf0): first defined here
/home/yade/yade-src/build-trunk/plugins3.os: In function `TriaxialCompressionEngine::updateParameters()':
plugins3.cpp:(.text+0xeac0): multiple definition of `TriaxialCompressionEngine::updateParameters()'
/home/yade/yade-src/build-trunk/plugins2.os:plugins2.cpp:(.text+0x6b40): first defined here
/home/yade/yade-src/build-trunk/plugins3.os: In function `TriaxialCompressionEngine::action()':
plugins3.cpp:(.text+0xebc0): multiple definition of `TriaxialCompressionEngine::action()'
/home/yade/yade-src/build-trunk/plugins2.os:plugins2.cpp:(.text+0x6c40): first defined here
/home/yade/yade-src/build-trunk/plugins3.os: In function `TriaxialCompressionEngine* boost::serialization::factory<TriaxialCompressionEngine, 0>(__va_list_tag*)':
plugins3.cpp:(.text+0xfef0): multiple definition of `TriaxialCompressionEngine* boost::serialization::factory<TriaxialCompressionEngine, 0>(__va_list_tag*)'
/home/yade/yade-src/build-trunk/plugins2.os:plugins2.cpp:(.text+0x5fc0): first defined here
/home/yade/yade-src/build-trunk/plugins3.os:(.bss+0x10): multiple definition of `boost::archive::detail::init_guid<TriaxialCompressionEngine>::guid_initializer'
/home/yade/yade-src/build-trunk/plugins2.os:(.bss+0x100): first defined here
collect2: ld returned 1 exit status
scons: *** [/home/yade/yade-src/build-trunk/libplugins.so] Error 1
scons: building terminated because of errors.

Has anybody got similar problem? or any advice how to fix it? :-)
thanks
Jan

_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp





Follow ups

References