[Mono-osx] Bundled mono console application on OS X throwing gthread errors.

Duane Wandless duane at wandless.net
Wed Nov 12 11:47:38 EST 2008


It is too vague (to me anyway) what you are actually doing... you might try
posting the code as well as the steps involving mkbundle, install_name_tool,
etc.

On Wed, Nov 12, 2008 at 11:43 AM, silver83 <silver83 at gmail.com> wrote:

>
> I still couldn't get it to work, using either @install_path or @rpath
> techniques...
> Still getting gthread error :
> GThread-ERROR **: GThread system may only be initialized once.
>
> 0   libSystem.B.dylib                   0x95123b9e __kill + 10
> 1   libSystem.B.dylib                   0x9519aec2 raise + 26
> 2   libSystem.B.dylib                   0x951aa47f abort + 73
> 3   libglib-2.0.0.dylib                 0x00e81ecc g_log + 0
> 4   libglib-2.0.0.dylib                 0x00e81ef5 g_log + 41
> 5   libgthread-2.0.0.1800.1.dylib       0x0000e3d7 g_thread_init + 521
> 6   libmono.0.0.0.dylib                 0x0073233d mini_init + 2968
> (mini.c:14091)
> 7   libmono.0.0.0.dylib                 0x00778a63 mono_main + 454
> (driver.c:1445)
> 8   LiboxEngine                         0x00001fd0 main + 215
> 9   LiboxEngine                         0x00001e7a start + 54
>
> Help ??
>
>
>
> duanew wrote:
> >
> > I had a similar need.  I wanted to fully embed mono within my application
> > so
> > the end user did not need to install mono.  I posted here:
> > http://lists.ximian.com/pipermail/mono-osx/2008-October/001616.html
> >
> > which describes the steps I went through.  Two differences in my post,
> one
> > is that I was using a DLL.  But now I use an EXE and have essentially the
> > same workflow.  Two, I embedded my mono app into a Cocoa application.
> >
> > I do not think you need that nant code referenced in the link in your
> > post.
> > You can download monobjc and look how their make system handles mkbundle.
> > I
> > started there and was able to pull out the necessary steps.  Monobjc has
> a
> > very ellegant build system that is a greating starting point.
> >
> > Best of luck,
> > Duane
> >
> > On Tue, Nov 11, 2008 at 6:48 AM, silver83 <silver83 at gmail.com> wrote:
> >
> >>
> >> I have bundled a mono console application using the following steps :
> >> 1. use mkbundle to create the binary
> >> 2. use macpack to create a dummy .app
> >> 3. inject the bundled binary into the .app's resources folder
> >> 4. rewire the execution script and the files under /Resources to execute
> >> the
> >> binary
> >>
> >> I run the application and everything is fine, but now I want to rewire
> >> library dependencies -
> >> I'm using code from :
> >>
> >>
> >>
> http://code.google.com/p/cocoa-sharp-dev/wiki/RedistributableAppWithoutInstallingMono
> >>
> >> to inject mono libraries into Resources folder, rewire my app to use
> >> them,
> >> and rewire them to use themselves (using otool -L to see their
> >> dependencies,
> >> and install_name_tool to rewire them).
> >>
> >> During rewiring, I exclude things that I consider "non-mono" -
> >> CoreFoundation, Carbon, libgcc, and libSystem.  I've tried several
> >> mixtures
> >> of which libraries to exclude, and I either end up with a mono-dependent
> >> application, or an application that crashed on :
> >>
> >> GThread-ERROR **: GThread system may only be initialized once.
> >>
> >> Some of the crash report :
> >> Exception Type:  EXC_CRASH (SIGABRT)
> >> Exception Codes: 0x0000000000000000, 0x0000000000000000
> >> Crashed Thread:  0
> >>
> >> Thread 0 Crashed:
> >> 0   libSystem.B.dylib                   0x95123b9e __kill + 10
> >> 1   libSystem.B.dylib                   0x9519aec2 raise + 26
> >> 2   libSystem.B.dylib                   0x951aa47f abort + 73
> >> 3   libglib-2.0.0.dylib                 0x00c00ecc g_log + 0
> >> 4   libglib-2.0.0.dylib                 0x00c00ef5 g_log + 41
> >> 5   libgthread-2.0.0.1800.1.dylib       0x009ec3d7 g_thread_init + 521
> >> 6   libmono.0.0.0.dylib                 0x002c933d mini_init + 2968
> >> (mini.c:14091)
> >> 7   libmono.0.0.0.dylib                 0x0030fa63 mono_main + 454
> >> (driver.c:1445)
> >> 8   MyApp                         0x00001f62 main + 215
> >> 9   MyApp                         0x00001df2 start + 54
> >>
> >> Thread 0 crashed with X86 Thread State (32-bit):
> >>  eax: 0x00000000  ebx: 0x951aa43f  ecx: 0xbffff47c  edx: 0x95123b9e
> >>  edi: 0x00000002  esi: 0x00d08010  ebp: 0xbffff498  esp: 0xbffff47c
> >>
> >>
> >> Any help (clues, hints, things I can do to debug this, maybe dtrace or
> >> something) - would be much appreciated...
> >>
> >> Thanks in advance
> >> Yoni.
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Bundled-mono-console-application-on-OS-X-throwing-gthread-errors.-tp20437966p20437966.html
> >> Sent from the Mono - OSX mailing list archive at Nabble.com.
> >>
> >> _______________________________________________
> >> Mono-osx mailing list
> >> Mono-osx at lists.ximian.com
> >> http://lists.ximian.com/mailman/listinfo/mono-osx
> >>
> >
> > _______________________________________________
> > Mono-osx mailing list
> > Mono-osx at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-osx
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Bundled-mono-console-application-on-OS-X-throwing-gthread-errors.-tp20437966p20464171.html
> Sent from the Mono - OSX mailing list archive at Nabble.com.
>
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20081112/092ad562/attachment-0001.html 


More information about the Mono-osx mailing list