[Ns-developers] dynamic libraries on Mac OS X [was: problem with libMiracle.so (image not found)]

Nicola Baldo baldo at dei.unipd.it
Mon Apr 7 13:33:36 PDT 2008


Hi all,

fhe following email exchange was originally on the nsmiracle mailing 
list. I am forwarding it here since it actually deals with a ns2 issue.
Any hint, feedback or developer effort is welcome!

Nicola

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

Nicola Baldo wrote:

unfortunately ns-2.33 does not currently support dynamic libraries on
Mac OS X. The point is that when we developed the dynamic libraries
patch, none of us was a Mac user, so we didn't have the knowledge and
hardware to add  support for dynamic libraries on OS X.

Anyway, I think there is no intrinsic problem with Mac OS X, it should 
be just a matter of finding a way to:

1) export symbols from the ns executable to dynamically loaded libraries
(i.e., finding the equivalent of the -export-dynamic flag of the GNU linker)

2) correctly build dynamic libraries. I'm mainly thinking of the
autotools stuff that we are currently using to build all our ns2
extensions. It has never been tested on OS X due to issue 1) above not
having been solved; it might work as-is, or it might require some tweaking.

We're evaluating the possibility of putting some effort on this issue in
the next couple of months - one of us just bought a MacBook ;-)
Unfortunately I cannot guarantee anything at this point.

Regards,

Nicola


Giorgio Buffa wrote:
> 
> 
> 
> Hi. I'm tryng to install nsmiracle-1.2.1 on Mac OS X 10.5.2
> 
> I installed ns-2.33 with dei80211mr-1.1.4 and they seems to work: 
> scripts in the dei80211mr/samples directory run. I only changed 
> libdei80211mr.so with libdei80211mr.dylib
> Then I compiled nsmiracle-1.2.1, but sample scripts don't run. Follow 
> the error message:
> 
> 
> "couldn't load file "../nsmiracle/.libs//libMiracle.so": 
> dlopen(../nsmiracle/.libs//libMiracle.so, 10): image not found
>     while executing
> "load "${path}/[dynlibname ${name}]""
>     (procedure "dynlibload" line 6)
>     invoked from within
> "dynlibload Miracle ../nsmiracle/.libs/"
>     (file "link_with_errors_cbr.tcl" line 38)"
> 
> 
> I looked at ../nsmiracle/.libs and I have libMiracle.dylib instead of 
> libMiracle.so. And I can't use it: I tried to force ns to use 
> libMiracle.dylib, but I get the following message:
> 
> 
> "warning: no class variable Module/CBR::period_
> 
>     see tcl-object.tcl in tclcl for info about this warning.
> 
> warning: no class variable Module/CBR::destPort_
> 
> warning: no class variable Module/CBR::destAddr_
> 
> warning: no class variable Module/CBR::packetSize_
> 
> warning: no class variable Module/CBR::alpha_
> 
> warning: no class variable Module/CBR::debug_
> 
> warning: no class variable Module/CBR::period_
> 
>     see tcl-object.tcl in tclcl for info about this warning.
> 
> warning: no class variable Module/CBR::destPort_
> 
> warning: no class variable Module/CBR::destAddr_
> 
> warning: no class variable Module/CBR::packetSize_
> 
> warning: no class variable Module/CBR::alpha_
> 
> warning: no class variable Module/CBR::debug_
> 
> Simulating."
> 
> 
> 
> and I get a loop.
> 
> I compile in that way:
> 
> 
> $ ./configure --with-ns-allinone=..... --prefix=..... --disable-static 
> --enable-shared  --with-dei80211mr=.....
> $ make
> $ make install
> 
> The ouput I get is in the file I attached to this mail.
> 
> 
> Thanks. Bye,
> Giorgio Buffa
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> nsmiracle-users mailing list
> nsmiracle-users at dei.unipd.it
> https://mail.dei.unipd.it/mailman/listinfo/nsmiracle-users



More information about the Ns-developers mailing list