OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000085OMNeT++simulation kernelpublic2009-07-15 20:242010-12-10 16:45
Assigned Torhornig 
PlatformMinGW 4.2.1-sjlj (mingw32-2)OSWindowsOS Version
Product Version4.0 
Target VersionFixed in Version4.1 
Summary0000085: linker errors when building statically linked simulations in release mode
DescriptionWith the MinGW compiler bundled with OMNeT++ 4.0, there are linker errors when building statically linked simulations in release mode.

Sample errors:
liboppsim.a(cmessage.o) multiple definition
 of `cPacket::setBitLength(long long)'
liboppsim.a(cmessage.o) multiple definition of `cPacket::cPacket(char const*, short, long long)'

Steps To Reproduce1. Set SHARED_LIBS=no in configure.user
2. ./configure, make cleanall, make (or make MODE=release)
3. Build stops with linker errors at the first sample simulation, Aloha
Additional InformationThese errors are specific to the given compiler, they do not occur on any other platform including the Linux MinGW cross-compiler of the same version (i586-mingw32msvc-gcc (GCC) 4.2.1-sjlj (mingw32-2)).

Also, they only occur when ALL of the following are met:
- static linking selected (SHARED_LIBS=no)
- release build (make MODE=release)
- CFLAGS_RELEASE contains -O2

The error does not manifest itself when compiling with -O1 or -O3!
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
andras (administrator)
2009-07-15 20:26

Will be resolved by shipping the new version of MinGW (4.4.0) with OMNeT++ 4.1.
andras (administrator)
2009-07-15 20:27

Suggested workaround: uncomment CFLAGS_RELEASE in configure.user, and change -O2 to either -O1 or -O3.
rhornig (administrator)
2010-12-10 16:45

The new gcc 4.5 compiler bundled with OMNeT 4.1 resolves this issue. (tested)

- Issue History
Date Modified Username Field Change
2009-07-15 20:24 andras New Issue
2009-07-15 20:26 andras Note Added: 0000157
2009-07-15 20:26 andras Status new => confirmed
2009-07-15 20:27 andras Note Added: 0000158
2010-03-31 17:00 rhornig Status confirmed => to be tested
2010-12-10 16:45 rhornig Note Added: 0000351
2010-12-10 16:45 rhornig Status to be tested => resolved
2010-12-10 16:45 rhornig Fixed in Version => 4.1
2010-12-10 16:45 rhornig Resolution open => fixed
2010-12-10 16:45 rhornig Assigned To => rhornig

Copyright © 2000 - 2022 MantisBT Team
Powered by Mantis Bugtracker