[Error] OmNet not working after upgrade to OS X Lion - libmpi_cxx.0.dylib is missing

607 views
Skip to first unread message

kamuro

unread,
Aug 5, 2011, 11:23:58 AM8/5/11
to omnetpp
Hello,

I installed OmNet several weeks ago under OS X Snow Leopard. After the
upgrade to OS X Lion I encounter problems.

I installed XCode and tried to run a simulation via Terminal.

Following error is appearing:
dyld: Library not loaded: /usr/lib/libmpi_cxx.0.dylib
Referenced from: /Users/Michael/Dev/omnetpp/omnetpp-4.1/lib/
liboppsimd.dylib
Reason: image not found
Trace/BPT trap: 5

I traced the problem back to probably missing Open MPI libraries. I
found this Portuguese article but Google translate is only little
help:
http://www.othonbatista.com/index.php/doutorado/34-compilacao-do-omnet-41-no-mac-os-x-lion

I don't get the install instructions, but I tried to install Open MPI
via MacPorts. But the install is crashing and the massive log file is
no help to me.

So, am I the only one having problems after upgrading to OS X Lion?

Best regards,

Michael

kamuro

unread,
Aug 5, 2011, 4:42:13 PM8/5/11
to omnetpp
Well I did some further research and could solve that problem
(partly). The compiler has to be changed.

This post describes the task -> http://lists.macosforge.org/pipermail/macports-dev/2011-July/015263.html

And this one details it on Open MPI -> https://trac.macports.org/ticket/30330

In short adding

if {${configure.compiler} == "llvm-gcc-4.2"} {

configure.compiler clang

}

at the end to the file
/opt/local/var/macports/sources/rsync.macports.org/release/ports/
science/openmpi/Portfile

let's build it properly.

But the library does not appear in /usr/lib/...

Gürkan

unread,
Aug 6, 2011, 3:45:14 AM8/6/11
to omn...@googlegroups.com
Hi Michael,

I have the same problem. Does it mean that I have to use MacPorts and can not use OMNeT anymore directly?

Best regards,

Gürkan

> --
> You received this message because you are subscribed to the Google Groups "omnetpp" group.
> To post to this group, send email to omn...@googlegroups.com.
> To unsubscribe from this group, send email to omnetpp+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/omnetpp?hl=en.
>

kamuro

unread,
Aug 6, 2011, 4:54:34 AM8/6/11
to omnetpp
I used MacPorts only to install Open MPI. The install finally worked
but the libraries did not appear.

I'm not fit in Terminal and how to work with a command line tool, so
I'm not able to trace the error back correctly.

I created the locate data base to find the libraries and XCode has the
libraries saved in /Developer/SDKs/MacOSX10.6.sdk/usr/lib/libmpi.
0.dylib. Only god knows why it's 10.6 and not 10.7.

I tried to link to this library in the file creating the error,
namely /Users/Michael/Dev/omnetpp/omnetpp-4.1/lib/liboppsimd.dylib,
but that did not work either.

Also when I configure OmNet it shows me no Open MPI files exist:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
checking build system type... i386-apple-darwin11.0.0
checking host system type... i386-apple-darwin11.0.0
configure: -----------------------------------------------
configure: reading configure.user for your custom settings
configure: -----------------------------------------------
checking for icc... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for icpc... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for g++... g++
checking for ranlib... ranlib
checking whether g++ supports -fno-stack-protector... yes
checking whether g++ supports -fno-stack-protector... yes
checking if shared libs need -fPIC... no
checking for dlopen with CFLAGS="" LIBS=""... yes
checking if --export-dynamic linker option is supported/needed... test
failed
checking for flags needed to link with static libs containing simple
modules... -all_load
configure: NOTE: Use the following syntax when linking with static
libraries
configure: containing simple modules and other dynamically registered
components:
configure: g++ ... -Wl,-all_load <libs> ...
checking whether linker supports -rpath... yes
checking for bison... bison -y
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... none needed
checking whether yytext is a pointer... no
checking for make... make
checking for perl... perl
checking for swig... not found
checking for math with CFLAGS="" LIBS=""... yes
checking for standard C++ lib with CFLAGS="" LIBS="-lstdc++"... yes
checking for dlopen with CFLAGS="" LIBS=""... yes
checking for winsock with CFLAGS="" LIBS="-lwsock32"... no
checking for zlib with CFLAGS=" -O2 -DNDEBUG=1 -fno-stack-protector -
m32 " LIBS="-lz"... yes
checking for Tcl/Tk 8.6 with CFLAGS=" -O2 -DNDEBUG=1 -fno-stack-
protector -m32 " LIBS="-ltk8.6 -ltcl8.6"... no
checking for Tcl/Tk 8.5 with CFLAGS=" -O2 -DNDEBUG=1 -fno-stack-
protector -m32 " LIBS="-ltk8.5 -ltcl8.5"... yes
checking for wish... wish
checking for java... java
checking for JNI with CFLAGS=" -O2 -DNDEBUG=1 -fno-stack-protector -
m32 -fno-strict-aliasing -I/Library/Java/Home/include -I/Library/Java/
Home/include/"... no
checking for mpic++... not found
checking for mpicxx... not found
checking for MPI with CFLAGS=" -O2 -DNDEBUG=1 -fno-stack-protector -
m32 " LIBS=" -m32 -Wl,-rpath,$(OMNETPP_LIB_DIR) -Wl,-rpath,. -
lmpi"... no
configure: WARNING: Optional package MPI (needed for parallel
simulation) not found.
checking for PCAP with CFLAGS=" -O2 -DNDEBUG=1 -fno-stack-protector -
m32 " LIBS="-lpcap"... yes
checking for PTHREAD with CFLAGS=" -O2 -DNDEBUG=1 -fno-stack-
protector -m32 -DHAVE_PCAP " LIBS="-lpthread"... yes
checking for LibXML XML parser with CFLAGS=" -O2 -DNDEBUG=1 -fno-stack-
protector -m32 -DHAVE_PCAP " LIBS="-lxml2"... no
checking for LibXML XML parser with CFLAGS=" -O2 -DNDEBUG=1 -fno-stack-
protector -m32 -DHAVE_PCAP -I/usr/include/libxml2" LIBS="-lxml2"...
yes
checking for Expat XML parser with CFLAGS=" -O2 -DNDEBUG=1 -fno-stack-
protector -m32 -DHAVE_PCAP " LIBS="-lexpat"... yes
configure: Using LibXML for XML parsing
checking for Akaroa with CFLAGS=" -O2 -DNDEBUG=1 -fno-stack-
protector -m32 -DHAVE_PCAP -DXMLPARSER=libxml -I/usr/local/akaroa/
include" LIBS="-L/usr/local/akaroa/lib -lakaroa -lfl"... no
configure: WARNING: Optional package Akaroa not found
configure: creating ./config.status
config.status: creating Makefile.inc
config.status: creating test/core/runtest

WARNING: The configuration script could not detect the following
packages:

MPI (optional) Akaroa (optional)

Scroll up to see the warning messages (use shift+PgUp), and search
config.log
for more details. While you can use OMNeT++ in the current
configuration,
be aware that some functionality may be unavailable or incomplete.

Your PATH contains /Users/Michael/Dev/omnetpp/omnetpp-4.1/bin. Good!

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Ah, now I see it's needed for parallel simulation. Well, I'm not sure
what to do next, I try to install Open MPI directly.

kamuro

unread,
Aug 6, 2011, 6:35:53 AM8/6/11
to omnetpp
Alright I got it. Go to http://www.open-mpi.org/software/ompi/v1.4/

Download openmpi-1.4.3.tar.gz

In your Terminal go to your Download folder, do
shell$ gunzip -c openmpi-1.4.3.tar.gz | tar xf -
shell$ cd openmpi-1.4.3
shell$ ./configure --prefix=/usr/local
<...lots of output...>
shell$ make all install

Go to your omnetpp-4.1 (or your version) folder
open the configure.user file

after the lines
WITH_PARSIM=yes
SHARED_LIBS=yes

add
MPI_CFLAGS=“-I /usr/local/include -L /usr/local/lib”
MPI_LIBS=“-lmpi_cxx -lmpi -lopen-rte -lopen-pal -lutil”

then
./configure

make cleanall

make dep

make

Then it works again in the Terminal, have to test the IDE though.

In case another problem appears at the end, look if you have the same
problem this guy had
http://www.othonbatista.com/index.php/doutorado/34-compilacao-do-omnet-41-no-mac-os-x-lion

So, see you soon.
Reply all
Reply to author
Forward
0 new messages