Solving OMNeT++ 4.3.1 issues on Mac OS X 10.9 - Mavericks

1,362 views
Skip to first unread message

Rudolf Hornig

unread,
Nov 20, 2013, 9:17:06 AM11/20/13
to omn...@googlegroups.com
Hello all,

based on several bug reports here is a short summary about the issues / workarounds required for the latest and greatest 10.9:

1. OS X Command line tools no longer contain GCC. Possible solutions:
  • A) Install MacPorts and install GCC from there. You may need to explicitly specify the gcc-executable names in the configure.user file before running ./configure.
  • B) Use clang++. Several OMNET++ files need to be patched. It's quite a bit work, but the next omnet version will compile fine with clang++
2. OS X Command line tools no longer contain GDB. Possible solutions:
  • A) Install XCode and debug from there.
  • B) Install MacPorts and install gdb from there. You have to 'code sign' the ggdb executable (see details at the end of the mail)
3. Icons are not shown in Tkenv. Reason: In the Tk version that comes with 10.9 the PNG files with alpha channel are not rendered. 
  • A) Install Tk from macports and specify that library path in TK_CFLAGS and TK_LIBS
  • B) Wait for Apple to fix this in Tkenv.
  • C) Wait for the next OMNeT++ version. On MAC the 256 level transparency is converted to 1bit transparency. Icons will look more ugly, but they will be visible at least.
  • D) Using an image processing app, convert all PNG files in image directory to 1bit transparency.
4. Because of some OS API changes the CDT Indexer got extremely slow. Actually it got unusable. 
  • To fix this, you should disable Indexing in the Preferences dialog.
We will push out a new version of OMNeT++ ASAP. Until then you should rely on MacPorts as much as possible.

Happy OS X 10.9-ing ;),
Rudolf

======================================================================
PS: Finally here is a brief tutorial how to fix the debugging issue:

Command line tools on Mac OS X 10.9 no longer contain gdb or gcc. To debug 
directly from the IDE you have to install MacPorts from 
http://macports.org and install gdb manually. (Alternatively you can use
XCode for debugging.)

After installing MacPorts, install gdb:

    $ sudo port install gdb

To be able to debug with gdb on OS X 10.9 you must sign the ggdb executable
with a self signed certificate:

Start Keychain Access application (`/Applications/Utilities/Keychain Access.app`)

Open menu `/ Keychain Access / Certificate Assistant / Create a Certificate...`

Choose a name (e.g. gdb-cert), set Identity Type to Self Signed Root, set 
Certificate Type to Code Signing and select the Let me override defaults. 
Click several times on Continue until you get to the Specify a 
Location For The Certificate screen, then set Keychain to System.

If you can't store the certificate in the System keychain, create it in the 
login keychain, then exported it. You can then imported it into the 'System' keychain.

Finally, using the contextual menu for the certificate, select 'Get Info', open 
the 'Trust' item, and set 'Code Signing' to 'Always Trust'.

You must quit 'Keychain Access' application in order to use the certificate and 
restart taskgated service by killing the current running taskgated process 
(or restart the system).

Now sign the executable:

    $ sudo codesign -s gdb-cert /opt/local/bin/ggdb

After installing the @OMNETPP@ IDE you have to change the name of the 
executable used for debugging. Open menu / Preferences / C++ / Debug / gdb
in the IDE and chenge the executable name from `gdb` to `ggdb`. 


Piotr Rygielski

unread,
Nov 29, 2013, 6:59:58 AM11/29/13
to omn...@googlegroups.com
After applying these tricks, there is still a problem with linking.

I was compiling using gcc-4.7 installed from brew and the newest Omnet 4.3.1.


===== Compiling queueinglib ====
MSGC
: Job.msg
Allocate.cc
Classifier.cc
Clone.cc
Delay.cc
Fork.cc
Job.cc
JobList.cc
Join.cc
PassiveQueue.cc
Queue.cc
ResourceBasedQueue.cc
Server.cc
Sink.cc
Source.cc
Job_m.cc
Creating shared library: out/gcc-release//libqueueinglib.dylib
Undefined symbols for architecture x86_64:
 
"operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, cOwnedObject const*)", referenced from:
      cStdSetWatcher
<queueing::Job*>::atIt() const in JobList.o
      cStdListWatcher
<queueing::Job*>::atIt() const in Join.o
 
"operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, cOwnedObject const&)", referenced from:
      cStdPointerSetWatcher
<queueing::Job*>::atIt() const in JobList.o
      cStdPointerListWatcher
<queueing::Job*>::atIt() const in Join.o
ld
: symbol(s) not found for architecture x86_64
clang
: error: linker command failed with exit code 1 (use -v to see invocation)
make
[2]: *** [out/gcc-release//libqueueinglib.dylib] Error 1
make
[1]: *** [queueinglib] Error 2
make
: *** [allmodes] Error 2



Rudolf Hornig

unread,
Nov 30, 2013, 1:37:32 PM11/30/13
to omn...@googlegroups.com
You are clearly compiling with clang and not with gcc-4.7. 

To be able to compile with clang a lot of patching is needed here and there in the OMNeT++ code. That will be included in OMNeT++ 4.4, but for the time being, you should really compile OMNeT++ 4.3.1 with gcc.

Rudolf

ps: be sure that the configure script has really detected the installed gcc. configure checks only for the name "gcc" and "g++" and these are just symlinks to clang and clang++ on Mavericks :(

check that with
$ gcc --version

If you want to use the gcc from the brew, you have to specify the c and c++ compiler executable in configure.user and then re-run ./configure

Rudolf

Till

unread,
Jan 7, 2014, 9:55:53 AM1/7/14
to omn...@googlegroups.com
Hi Rudolf,

is there a timeline for the 4.4 release? Would be great to have OMNeT++ running under OSX again without ports.
And do you already have plans for a 5.0 beta?

Best Regards
Till

Andras Varga

unread,
Jan 7, 2014, 6:25:47 PM1/7/14
to omn...@googlegroups.com

Hi Till,

 

Version 4.4 is just a matter of days. Just the release build and final testing is left to be done.

 

INET 2.3.0 will follow in a few days, main highlights being STP/RSTP for 802 LANs, and improved DHCP.

INET 2.4.0 is planned a few weeks after that, with netfilter hooks for IPv4, and a few new protocols backported from the integration branch ("integration" will be released as 3.0 eventually, but there's a lot of work to be done until then)

 

OMNeT++ 5.0 is a bit far off, maybe a year. We'll surely release Betas until then, we'll see how it goes.

 

Regards,

Andras

 

 

--
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Till

unread,
Jan 8, 2014, 3:04:01 AM1/8/14
to omn...@googlegroups.com
Great News! Thanks Andras for keeping us updated!

Shaikha Al-Khuder

unread,
Feb 6, 2015, 8:26:07 AM2/6/15
to omn...@googlegroups.com
I'm trying to execute the command:

port install ggdb

Error: Insufficient privileges to write to MacPorts install prefix.


But it shows the error in the next line...
I'm the administrator and my user ID is 0.

Any ideas?

Behnam Dezfouli

unread,
May 1, 2015, 5:45:03 PM5/1/15
to omn...@googlegroups.com
A very good source for gdb installation on MAC OS is: http://ntraft.com/installing-gdb-on-os-x-mavericks/.

After installing gdb, in the gdb tab:

- Set GDB debugger to "/opt/local/bin/gdb-apple"
- set GDB Command File to ".gdbinit"
Reply all
Reply to author
Forward
0 new messages