[Mono-osx] error with AOT compile on MonoMac
Duane Wandless
duane at wandless.net
Tue Feb 28 12:23:43 UTC 2012
Try modifying your mono.pc file
(/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig/mono.pc).
prefix=/Library/Frameworks/Mono.framework/Versions/2.10.9
exec_prefix=${pcfiledir}/../..
libdir=${prefix}/lib
includedir=${prefix}/include/mono-2.0
sysconfdir=${prefix}/etc
Name: Mono
Description: Mono Runtime
Version: 2.10.9
*Cflags: -I${includedir} -D_THREAD_SAFE -arch i386 -isysroot
/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5
-no_compact_linkedit*
*Libs: -L${libdir} -lmono -pthread -lpthread -lm*
Duane
On Tue, Feb 28, 2012 at 2:14 AM, Eric Vandenberg <ericsv at live.com> wrote:
> Thanks, that worked great.
>
> After that I also needed to export AS="as -arch i386" and CC="cc -arch
> i386" for my architecture, at which point I was able to create a bundle
> successfully (mkbundle -o testapp TestApp.exe --deps)
>
> However, to create a standalone app which includes the runtime, I need to
> include --static. This gives an error:
>
> Erics-MacBook-Pro:Debug ericvandenberg$ *mkbundle -o testapp TestApp.exe
> --deps --static*
> OS is: Darwin
> Note that statically linking the LGPL Mono runtime has more licensing
> restrictions than dynamically linking.
> See http://www.mono-project.com/Licensing for details on licensing.
> Sources: 1 Auto-dependencies: True
> embedding:
> /Users/ericvandenberg/Projects/TestApp/TestApp/bin/Debug/TestApp.exe
> embedding:
> /Library/Frameworks/Mono.framework/Versions/2.10.8/lib/mono/4.0/mscorlib.dll
> embedding:
> /Library/Frameworks/Mono.framework/Versions/2.10.8/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll
> embedding:
> /Library/Frameworks/Mono.framework/Versions/2.10.8/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll
> embedding:
> /Library/Frameworks/Mono.framework/Versions/2.10.8/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
> embedding:
> /Library/Frameworks/Mono.framework/Versions/2.10.8/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll
> embedding:
> /Library/Frameworks/Mono.framework/Versions/2.10.8/lib/mono/gac/System.Security/4.0.0.0__b03f5f7f11d50a3a/System.Security.dll
> Compiling:
> as -arch i386 -o temp.o temp.s
> cc -arch i386 -o testapp -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
> *Undefined symbols for architecture i386:*
> "_CFLocaleCopyCurrent", referenced from:
> _get_darwin_locale in libmono-2.0.a(libmonoruntime_la-locales.o)
> "_CFLocaleGetIdentifier", referenced from:
> _get_darwin_locale in libmono-2.0.a(libmonoruntime_la-locales.o)
> "_CFStringGetLength", referenced from:
> _get_darwin_locale in libmono-2.0.a(libmonoruntime_la-locales.o)
> "_CFStringGetMaximumSizeForEncoding", referenced from:
> _get_darwin_locale in libmono-2.0.a(libmonoruntime_la-locales.o)
> "_CFStringGetCString", referenced from:
> _get_darwin_locale in libmono-2.0.a(libmonoruntime_la-locales.o)
> "_CFRelease", referenced from:
> _get_darwin_locale in libmono-2.0.a(libmonoruntime_la-locales.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)
> "_locale_charset", referenced from:
> _monoeg_g_get_charset in libmono-2.0.a(libeglib_la-gunicode.o)
> *ld: symbol(s) not found for architecture i386*
> *clang: error: linker command failed with exit code 1 (use -v to see
> invocation)*
> *[Fail]*
>
> Any idea what the problem is here? It found the DLL's to embed so not sure
> why it's not finding the symbols?
>
> Thanks,
> Eric
>
> ------------------------------
> Subject: Re: [Mono-osx] error with AOT compile on MonoMac
> From: troy-dawson at comcast.net
> Date: Sun, 26 Feb 2012 21:53:06 -0800
> CC: mono-osx at lists.ximian.com
> To: ericsv at live.com
>
>
> On Feb 26, 2012, at 9:16 PM, Eric Vandenberg <ericsv at live.com> wrote:
>
> Any help would be appreciated
>
>
> Apple has bunged things up a bit by moving away from a Unixy developer
> environment.
>
> "find / -name as 2> /dev/null" in the console will go find all the as
> executables on your system.
>
> I've got as's all over the place, but am running 10.8 beta 1 and none in
> my path now.
>
> My 10.7 volume has:
>
> /Volumes/Lion/usr/bin/as
> /Volumes/Lion/usr/libexec/as
> /Volumes/Lion/usr/libexec/as/arm/as
> /Volumes/Lion/usr/libexec/as/i386/as
> /Volumes/Lion/usr/libexec/as/x86_64/as
> /Volumes/Lion/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/as
>
> Xcode 4.3 and newer will install these for you if you open up Xcode >
> Preferences > Downloads:
>
> http://i.imgur.com/WUouj.png
>
>
>
> _______________________________________________
> 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/20120228/1ead603b/attachment.html>
More information about the Mono-osx
mailing list