[Mono-osx] error with AOT compile on MonoMac

Eric Vandenberg ericsv at live.com
Tue Feb 28 18:55:45 UTC 2012





Thanks for the response.
I didn't see any difference with the mono.pc edit below.  I updated the file at:
/Library/Frameworks/Mono.framework/Versions/2.10.8/lib/pkgconfig/mono.pc
which now looks like:
prefix=/Library/Frameworks/Mono.framework/Versions/2.10.8exec_prefix=${pcfiledir}/../..libdir=${prefix}/libincludedir=${prefix}/include/mono-2.0sysconfdir=${prefix}/etc
Name: MonoDescription: Mono RuntimeVersion: 2.10.8Cflags: -I$(includedir) -D_THREAD_SAFE -arch i386 -isysroot /Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.5 -no_compact_linkeditLibs: -L$(libdir) -lmono -pthread -lpthread -lm
I also updated to MacOSX10.7.sdk as I've installed the latest Xcode 4.3.  I found the following SDKs on my machine:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
The resulting output from running mkbundle is same.  Do I need to use the latest 2.10.9 beta or an older OSX SDK 10.5? 
Any other ideas on what I can try or if something looks off?  It's not clear to me it "picked up" or is using the mono.pc changes.  Also don't see a verbose or debug more to get more info.
Thanks,Eric
Date: Tue, 28 Feb 2012 07:23:43 -0500
Subject: Re: [Mono-osx] error with AOT compile on MonoMac
From: duane at wandless.net
To: ericsv at live.com
CC: troy-dawson at comcast.net; mono-osx at lists.ximian.com

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}/libincludedir=${prefix}/include/mono-2.0
sysconfdir=${prefix}/etc
Name: Mono
Description: Mono RuntimeVersion: 2.10.9Cflags: -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: DarwinNote 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.dllCompiling: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/860b590d/attachment-0001.html>


More information about the Mono-osx mailing list