[Mono-dev] mkbundle2 and libMonoPosixHelper.so

Burkhard Linke blinke at cebitec.uni-bielefeld.de
Mon Apr 18 03:42:17 EDT 2011


Hi,

On Wednesday 13 April 2011 17:57:18 Robert Jordan wrote:
> On 13.04.2011 09:03, danwalmsley wrote:
> >      Is there a problem with mkbundle2 (this also happens with mkbundle)?
> > Surely we shouldn't have to distribute these library modules alongside
> > our application? I used the mkbundle2 --deps command to make sure all
> > dependancies are included.
>
> It's by design. Mkbundle is only considering managed components.
> libMonoPosixHelper.so is needed whenever Mono.Posix is consumed
> by some assembly (WinForms in your case).

Yu can use monolinker to create a "standalone" binary linked to libmono 
(either dynamically or statically).

By modifying the link command printed by monolinker you can also link other 
libraries.

Unfortunatly the [DllImport] mechanism used to link libMonoPosixHelper always 
tries to use dlopen and dlsym to lookup functions in the shared objects.

Since the lookup is also subject to dll name mapping (see metadata/loader.c), 
you may try to provide a custom config file to monolinker, mapping 
monoPosixHelper to "_Internal". This should result in a lookup of the 
executing shared object, which should allow to link libMonoPosixHelper 
statically. But I haven't tried that yet.

With best regards,
Burkhard Linke


More information about the Mono-devel-list mailing list