mail-archives/mono-osx/2008-November/001753.html

207 строки
11 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-osx] Bundled mono console application on OS X throwing gthread errors.
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20Bundled%20mono%20console%20application%20on%20OS%20X%20throwing%0A%09gthread%20errors.&In-Reply-To=20464171.post%40talk.nabble.com">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="001752.html">
<LINK REL="Next" HREF="001754.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-osx] Bundled mono console application on OS X throwing gthread errors.</H1>
<B>Duane Wandless</B>
<A HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20Bundled%20mono%20console%20application%20on%20OS%20X%20throwing%0A%09gthread%20errors.&In-Reply-To=20464171.post%40talk.nabble.com"
TITLE="[Mono-osx] Bundled mono console application on OS X throwing gthread errors.">duane at wandless.net
</A><BR>
<I>Wed Nov 12 11:47:38 EST 2008</I>
<P><UL>
<LI>Previous message: <A HREF="001752.html">[Mono-osx] Bundled mono console application on OS X throwing gthread errors.
</A></li>
<LI>Next message: <A HREF="001754.html">[Mono-osx] Bundled mono console application on OS X throwing gthread errors.
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#1753">[ date ]</a>
<a href="thread.html#1753">[ thread ]</a>
<a href="subject.html#1753">[ subject ]</a>
<a href="author.html#1753">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>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 &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">silver83 at gmail.com</A>&gt; wrote:
&gt;<i>
</I>&gt;<i> I still couldn't get it to work, using either @install_path or @rpath
</I>&gt;<i> techniques...
</I>&gt;<i> Still getting gthread error :
</I>&gt;<i> GThread-ERROR **: GThread system may only be initialized once.
</I>&gt;<i>
</I>&gt;<i> 0 libSystem.B.dylib 0x95123b9e __kill + 10
</I>&gt;<i> 1 libSystem.B.dylib 0x9519aec2 raise + 26
</I>&gt;<i> 2 libSystem.B.dylib 0x951aa47f abort + 73
</I>&gt;<i> 3 libglib-2.0.0.dylib 0x00e81ecc g_log + 0
</I>&gt;<i> 4 libglib-2.0.0.dylib 0x00e81ef5 g_log + 41
</I>&gt;<i> 5 libgthread-2.0.0.1800.1.dylib 0x0000e3d7 g_thread_init + 521
</I>&gt;<i> 6 libmono.0.0.0.dylib 0x0073233d mini_init + 2968
</I>&gt;<i> (mini.c:14091)
</I>&gt;<i> 7 libmono.0.0.0.dylib 0x00778a63 mono_main + 454
</I>&gt;<i> (driver.c:1445)
</I>&gt;<i> 8 LiboxEngine 0x00001fd0 main + 215
</I>&gt;<i> 9 LiboxEngine 0x00001e7a start + 54
</I>&gt;<i>
</I>&gt;<i> Help ??
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> duanew wrote:
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; I had a similar need. I wanted to fully embed mono within my application
</I>&gt;<i> &gt; so
</I>&gt;<i> &gt; the end user did not need to install mono. I posted here:
</I>&gt;<i> &gt; <A HREF="http://lists.ximian.com/pipermail/mono-osx/2008-October/001616.html">http://lists.ximian.com/pipermail/mono-osx/2008-October/001616.html</A>
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; which describes the steps I went through. Two differences in my post,
</I>&gt;<i> one
</I>&gt;<i> &gt; is that I was using a DLL. But now I use an EXE and have essentially the
</I>&gt;<i> &gt; same workflow. Two, I embedded my mono app into a Cocoa application.
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; I do not think you need that nant code referenced in the link in your
</I>&gt;<i> &gt; post.
</I>&gt;<i> &gt; You can download monobjc and look how their make system handles mkbundle.
</I>&gt;<i> &gt; I
</I>&gt;<i> &gt; started there and was able to pull out the necessary steps. Monobjc has
</I>&gt;<i> a
</I>&gt;<i> &gt; very ellegant build system that is a greating starting point.
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Best of luck,
</I>&gt;<i> &gt; Duane
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; On Tue, Nov 11, 2008 at 6:48 AM, silver83 &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">silver83 at gmail.com</A>&gt; wrote:
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; I have bundled a mono console application using the following steps :
</I>&gt;<i> &gt;&gt; 1. use mkbundle to create the binary
</I>&gt;<i> &gt;&gt; 2. use macpack to create a dummy .app
</I>&gt;<i> &gt;&gt; 3. inject the bundled binary into the .app's resources folder
</I>&gt;<i> &gt;&gt; 4. rewire the execution script and the files under /Resources to execute
</I>&gt;<i> &gt;&gt; the
</I>&gt;<i> &gt;&gt; binary
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; I run the application and everything is fine, but now I want to rewire
</I>&gt;<i> &gt;&gt; library dependencies -
</I>&gt;<i> &gt;&gt; I'm using code from :
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> <A HREF="http://code.google.com/p/cocoa-sharp-dev/wiki/RedistributableAppWithoutInstallingMono">http://code.google.com/p/cocoa-sharp-dev/wiki/RedistributableAppWithoutInstallingMono</A>
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; to inject mono libraries into Resources folder, rewire my app to use
</I>&gt;<i> &gt;&gt; them,
</I>&gt;<i> &gt;&gt; and rewire them to use themselves (using otool -L to see their
</I>&gt;<i> &gt;&gt; dependencies,
</I>&gt;<i> &gt;&gt; and install_name_tool to rewire them).
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; During rewiring, I exclude things that I consider &quot;non-mono&quot; -
</I>&gt;<i> &gt;&gt; CoreFoundation, Carbon, libgcc, and libSystem. I've tried several
</I>&gt;<i> &gt;&gt; mixtures
</I>&gt;<i> &gt;&gt; of which libraries to exclude, and I either end up with a mono-dependent
</I>&gt;<i> &gt;&gt; application, or an application that crashed on :
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; GThread-ERROR **: GThread system may only be initialized once.
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; Some of the crash report :
</I>&gt;<i> &gt;&gt; Exception Type: EXC_CRASH (SIGABRT)
</I>&gt;<i> &gt;&gt; Exception Codes: 0x0000000000000000, 0x0000000000000000
</I>&gt;<i> &gt;&gt; Crashed Thread: 0
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; Thread 0 Crashed:
</I>&gt;<i> &gt;&gt; 0 libSystem.B.dylib 0x95123b9e __kill + 10
</I>&gt;<i> &gt;&gt; 1 libSystem.B.dylib 0x9519aec2 raise + 26
</I>&gt;<i> &gt;&gt; 2 libSystem.B.dylib 0x951aa47f abort + 73
</I>&gt;<i> &gt;&gt; 3 libglib-2.0.0.dylib 0x00c00ecc g_log + 0
</I>&gt;<i> &gt;&gt; 4 libglib-2.0.0.dylib 0x00c00ef5 g_log + 41
</I>&gt;<i> &gt;&gt; 5 libgthread-2.0.0.1800.1.dylib 0x009ec3d7 g_thread_init + 521
</I>&gt;<i> &gt;&gt; 6 libmono.0.0.0.dylib 0x002c933d mini_init + 2968
</I>&gt;<i> &gt;&gt; (mini.c:14091)
</I>&gt;<i> &gt;&gt; 7 libmono.0.0.0.dylib 0x0030fa63 mono_main + 454
</I>&gt;<i> &gt;&gt; (driver.c:1445)
</I>&gt;<i> &gt;&gt; 8 MyApp 0x00001f62 main + 215
</I>&gt;<i> &gt;&gt; 9 MyApp 0x00001df2 start + 54
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; Thread 0 crashed with X86 Thread State (32-bit):
</I>&gt;<i> &gt;&gt; eax: 0x00000000 ebx: 0x951aa43f ecx: 0xbffff47c edx: 0x95123b9e
</I>&gt;<i> &gt;&gt; edi: 0x00000002 esi: 0x00d08010 ebp: 0xbffff498 esp: 0xbffff47c
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; Any help (clues, hints, things I can do to debug this, maybe dtrace or
</I>&gt;<i> &gt;&gt; something) - would be much appreciated...
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; Thanks in advance
</I>&gt;<i> &gt;&gt; Yoni.
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; --
</I>&gt;<i> &gt;&gt; View this message in context:
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> <A HREF="http://www.nabble.com/Bundled-mono-console-application-on-OS-X-throwing-gthread-errors.-tp20437966p20437966.html">http://www.nabble.com/Bundled-mono-console-application-on-OS-X-throwing-gthread-errors.-tp20437966p20437966.html</A>
</I>&gt;<i> &gt;&gt; Sent from the Mono - OSX mailing list archive at Nabble.com.
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; _______________________________________________
</I>&gt;<i> &gt;&gt; Mono-osx mailing list
</I>&gt;<i> &gt;&gt; <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">Mono-osx at lists.ximian.com</A>
</I>&gt;<i> &gt;&gt; <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">http://lists.ximian.com/mailman/listinfo/mono-osx</A>
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; _______________________________________________
</I>&gt;<i> &gt; Mono-osx mailing list
</I>&gt;<i> &gt; <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">Mono-osx at lists.ximian.com</A>
</I>&gt;<i> &gt; <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">http://lists.ximian.com/mailman/listinfo/mono-osx</A>
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i>
</I>&gt;<i> --
</I>&gt;<i> View this message in context:
</I>&gt;<i> <A HREF="http://www.nabble.com/Bundled-mono-console-application-on-OS-X-throwing-gthread-errors.-tp20437966p20464171.html">http://www.nabble.com/Bundled-mono-console-application-on-OS-X-throwing-gthread-errors.-tp20437966p20464171.html</A>
</I>&gt;<i> Sent from the Mono - OSX mailing list archive at Nabble.com.
</I>&gt;<i>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> Mono-osx mailing list
</I>&gt;<i> <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">Mono-osx at lists.ximian.com</A>
</I>&gt;<i> <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">http://lists.ximian.com/mailman/listinfo/mono-osx</A>
</I>&gt;<i>
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: <A HREF="http://lists.ximian.com/pipermail/mono-osx/attachments/20081112/092ad562/attachment-0001.html">http://lists.ximian.com/pipermail/mono-osx/attachments/20081112/092ad562/attachment-0001.html</A>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="001752.html">[Mono-osx] Bundled mono console application on OS X throwing gthread errors.
</A></li>
<LI>Next message: <A HREF="001754.html">[Mono-osx] Bundled mono console application on OS X throwing gthread errors.
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#1753">[ date ]</a>
<a href="thread.html#1753">[ thread ]</a>
<a href="subject.html#1753">[ subject ]</a>
<a href="author.html#1753">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/mono-osx">More information about the Mono-osx
mailing list</a><br>
</body></html>