Anyone using Mono2.0 or higher?

View: New views
3 Messages — Rating Filter:   Alert me  

Anyone using Mono2.0 or higher?

by fevans :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is anyone using Mono 2.0, or 2.2 with SWIG? I can't upgrade beyond Mono 1.9.1 because all my SWIG bindings stop working. Typically, when mono finds the right dll, it starts "probing" for the entry point. For example...

==========================================
Mono-INFO: DllImport loading: 'libMonoSupportW.so'.
Mono-INFO: Searching for 'DrawText'.
Mono-INFO: Probing 'DrawTextW'.
==========================================

However with Mono 2.2 my apps never get that far. Instead I get

(<unknown>:14584): Mono-WARNING **: DllImport unable to load library 'libhutil_csharp:
cannot open shared object file: No such file or directory'

To be clear, its in my LD_LIBRARY_PATH. Everything was working before the mono upgrade. I've looked into "dllmaps" and some other mono settings. Still no success.

Re: Anyone using Mono2.0 or higher?

by wsfulton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



2009/4/27 fevans <fevans@...>

Is anyone using Mono 2.0, or 2.2 with SWIG? I can't upgrade beyond Mono 1.9.1
because all my SWIG bindings stop working. Typically, when mono finds the
right dll, it starts "probing" for the entry point. For example...

==========================================
Mono-INFO: DllImport loading: 'libMonoSupportW.so'.
Mono-INFO: Searching for 'DrawText'.
Mono-INFO: Probing 'DrawTextW'.
==========================================

However with Mono 2.2 my apps never get that far. Instead I get

(<unknown>:14584): Mono-WARNING **: DllImport unable to load library
'libhutil_csharp:
cannot open shared object file: No such file or directory'

To be clear, its in my LD_LIBRARY_PATH. Everything was working before the
mono upgrade. I've looked into "dllmaps" and some other mono settings. Still
no success.

I'm not sure what you are doing wrong, possibly mono isn't installed correctly or you have mixed old and new versions in your mono install. I just tried a fresh installation of Ubuntu Jaunty Jackalope which has mono 2.0. The SWIG C# test-suite passes. Below is a classic example build and run. Try replicate it.

William
 
william@jaunty:~/swig/trunk$ cd Examples/csharp/class/
william@jaunty:~/swig/trunk/Examples/csharp/class$ make clean all
make -f ../../Makefile csharp_clean
make[1]: Entering directory `/home/william/swig/trunk/Examples/csharp/class'
rm -f *_wrap* *~ .~* runme runme.exe *.exe.mdb gc.log `find . -name \*.cs | grep -v runme.cs`
rm -f core
rm -f *.o *.so
make[1]: Leaving directory `/home/william/swig/trunk/Examples/csharp/class'
make -f ../../Makefile CXXSRCS='example.cxx' SWIG='../../../preinst-swig' \
    SWIGOPT='' TARGET='example' INTERFACE='example.i' csharp_cpp
make[1]: Entering directory `/home/william/swig/trunk/Examples/csharp/class'
../../../preinst-swig -csharp -c++  example.i
g++ -c -fpic    example.cxx example_wrap.cxx
g++ -shared    example.o example_wrap.o    -o libexample.so
make[1]: Leaving directory `/home/william/swig/trunk/Examples/csharp/class'
make -f ../../Makefile CSHARPSRCS='*.cs' CSHARPFLAGS='-nologo -out:runme.exe' csharp_compile
make[1]: Entering directory `/home/william/swig/trunk/Examples/csharp/class'
gmcs -nologo -out:runme.exe *.cs
make[1]: Leaving directory `/home/william/swig/trunk/Examples/csharp/class'
william@jaunty:~/swig/trunk/Examples/csharp/class$ mono ./runme.exe
Creating some objects:
    Created circle Circle
    Created square Square

A total of 2 shapes were created

Here is their current position:
    Circle = (20 30)
    Square = (-10 5)

Here are some properties of the shapes:
   Circle
        area      = 314.159265358979
        perimeter = 62.8318530717959
   Square
        area      = 100
        perimeter = 40

Guess I'll clean up now
0 shapes remain
Goodbye
william@jaunty:~/swig/trunk/Examples/csharp/class$ gmcs --version
Mono C# compiler version 2.0.1.0
william@jaunty:~/swig/trunk/Examples/csharp/class$ mono --version
Mono JIT compiler version 2.0.1 (tarball)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
    TLS:           __thread
    GC:            Included Boehm (with typed GC)
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  x86
    Disabled:      none
william@jaunty:~/swig/trunk/Examples/csharp/class$ g++ --version
g++ (Ubuntu 4.3.3-5ubuntu4) 4.3.3
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

william@jaunty:~/swig/trunk/Examples/csharp/class$
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Swig-user mailing list
Swig-user@...
https://lists.sourceforge.net/lists/listinfo/swig-user

Re: Anyone using Mono2.0 or higher?

by fevans :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just wanted to follow up and close this thread. Everything is working now.  I had initially reported the problem with SWIG in Mono2.x or higher. In fact my mono1.9 build was 32-bit, but my mono2.x was 64-bit.  As soon as I compiled my C++ project and swig bindings in 64-bit, everything ran fine. Thanks again for a great project.


fevans wrote:
Is anyone using Mono 2.0, or 2.2 with SWIG? I can't upgrade beyond Mono 1.9.1 because all my SWIG bindings stop working. Typically, when mono finds the right dll, it starts "probing" for the entry point. For example...

==========================================
Mono-INFO: DllImport loading: 'libMonoSupportW.so'.
Mono-INFO: Searching for 'DrawText'.
Mono-INFO: Probing 'DrawTextW'.
==========================================

However with Mono 2.2 my apps never get that far. Instead I get

(<unknown>:14584): Mono-WARNING **: DllImport unable to load library 'libhutil_csharp:
cannot open shared object file: No such file or directory'

To be clear, its in my LD_LIBRARY_PATH. Everything was working before the mono upgrade. I've looked into "dllmaps" and some other mono settings. Still no success.