[Mono-osx] OS X mkbundle --static --deps fails
Ulrich Hertlein
u.hertlein at gmail.com
Fri May 25 03:52:34 UTC 2012
Hi Rodrigo,
On 24/05/12 21:58 , Rodrigo Kumpera wrote:
> Link it with Foundation.
Thanks, I had already tried that through the mkbundle command line, without success.
I eventually ended up patching mkbundle.cs to include '-framework CoreFoundation -liconv'
and with that it works.
But that seems to be a heavy handed and inflexible approach and I'm wondering if it's
worth patching 'mkbundle' for a more general solution, either by specifying additional
libs on the command line or an environment variable to the same effect.
Thoughts?
Cheers,
/uli
> On Thu, May 24, 2012 at 12:58 AM, Ulrich Hertlein <u.hertlein at gmail.com
> <mailto:u.hertlein at gmail.com>> wrote:
>
> Hi guys,
>
> this was also reported on Mar 27 2012 by 'rberk', but unfortunately
> there was no response at the time...
>
> When trying to build a static bundle of my .exe I'm getting linker errors:
>
> $ export AS="as -arch i386" CC="clang -arch i386"
> $ mkbundle -o Copy-bin --deps --static ManagedLibraries/Copy.exe
> ManagedLibraries/X*.dll
>
> Compiling:
> as -arch i386 -o temp.o temp.s
> clang -arch i386 -o Copy-bin -Wall `pkg-config --cflags mono-2` temp.c
> `pkg-config --libs-only-L mono-2` `pkg-config --variable=libdir
> mono-2`/libmono-2.0.a `pkg-config --libs-only-l mono-2 | sed -e
> "s/\-lmono-2.0 //"` temp.o
> temp.c: In function 'install_dll_config_files':
> temp.c:153: warning: pointer targets in passing argument 2 of
> 'mono_register_config_for_assembly' differ in signedness
> Undefined symbols for architecture i386:
> "_CFLocaleCopyCurrent", referenced from:
>
> _ves_icall_System_Globalization_CultureInfo_construct_internal_locale_from_current_locale
> in libmono-2.0.a(libmonoruntime_la-locales.o)
> "_CFLocaleGetIdentifier", referenced from:
>
> _ves_icall_System_Globalization_CultureInfo_construct_internal_locale_from_current_locale
> in libmono-2.0.a(libmonoruntime_la-locales.o)
> "_CFStringGetLength", referenced from:
>
> _ves_icall_System_Globalization_CultureInfo_construct_internal_locale_from_current_locale
> in libmono-2.0.a(libmonoruntime_la-locales.o)
> "_CFStringGetMaximumSizeForEncoding", referenced from:
>
> _ves_icall_System_Globalization_CultureInfo_construct_internal_locale_from_current_locale
> in libmono-2.0.a(libmonoruntime_la-locales.o)
> "_CFStringGetCString", referenced from:
>
> _ves_icall_System_Globalization_CultureInfo_construct_internal_locale_from_current_locale
> in libmono-2.0.a(libmonoruntime_la-locales.o)
> "_CFRelease", referenced from:
>
> _ves_icall_System_Globalization_CultureInfo_construct_internal_locale_from_current_locale
> in libmono-2.0.a(libmonoruntime_la-locales.o)
> "_locale_charset", referenced from:
> _monoeg_g_get_charset in libmono-2.0.a(libeglib_la-gunicode.o)
> "_iconv_open", referenced from:
> _monoeg_g_convert in libmono-2.0.a(libeglib_la-gunicode.o)
> "_iconv", referenced from:
> _monoeg_g_convert in libmono-2.0.a(libeglib_la-gunicode.o)
> "_iconv_close", referenced from:
> _monoeg_g_convert in libmono-2.0.a(libeglib_la-gunicode.o)
> ld: symbol(s) not found for architecture i386
> collect2: ld returned 1 exit status
> [Fail]
>
> This is on Lion (10.7.4), Xcode 4.3.2, Mono 2.10.9 (tarball Mon May 7
> 20:25:51 EDT 2012).
> Any ideas on how to fix this?
>
> Cheers,
> /uli
More information about the Mono-osx
mailing list