2
votes

I'm trying to build a native monobjc bundle from the command line using xbuild (on OSX 10.8). I've built my Cocoa Application using Xamarin Studios and the Monobjc addin. I can successfully run "Create Monobjc Bundle" > "Export As Native Application" and get an app that is redistributable. However, when I try to run the xbuild command from the Terminal, I get the following:

    $xbuild /p:Configuration=Release TestProject.csproj /t:BundleNative
Build FAILED.
    Errors:
    /Users/Test/Documents/test/TestProject.csproj (BundleNative) ->
     /Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono/4.0/Monobjc.CocoaApplication.targets (CoreBundleNative target) ->

    /Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono/4.0/Monobjc.CocoaApplication.targets: error : clang: warning: argument unused during compilation: '-pthread'
    /Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono/4.0/Monobjc.CocoaApplication.targets: error : Error executing task EncryptFiles: Required property 'EncryptionSeed' not set.

    0 Warning(s)
    2 Error(s)

I've set the <EncryptionSeed> attribute of the csproj to some arbitrary value to see if that was the issue. But alas, I've gotten nowhere. As you can see I'm using Mono 2.10.12 (the SDK) and Monobjc 4.0.2167.11 that was installed via Xamarin. Any help would be appreciated.

UPDATE 1: I fixed the encryption seed error by installing the newest monobjc bridge via the monobjc package from the monobjc download page (5.0.2165.0), however still the error about the pthread, which occurs during the embed application step:

Compiling...
        Arguments: ' -Os -gdwarf-2  -arch i386 -mmacosx-version-min=10.8  -I"bin/Release//Embed"  -c "bin/Release//Embed/main.c" -o "bin/Release//Embed/main.o" -D_THREAD_SAFE -I/Library/Frameworks/Mono.framework/Versions/2.10.12/include/mono-2.0  '
        -pthread -L/Library/Frameworks/Mono.framework/Versions/2.10.12/lib -lmono-2.0 -lpthread  
        Linking...
        Arguments: '  -arch i386 -mmacosx-version-min=10.8  -L"bin/Release//Embed" -pthread -L/Library/Frameworks/Mono.framework/Versions/2.10.12/lib -lmono-2.0 -lpthread   -lz  -lmonobjc  -lTest_exe -lMono_Posix_dll -lMono_Security_dll -lMonobjc_AppKit_dll -lMonobjc_dll -lMonobjc_Foundation_dll -lMonobjc_ScriptingBridge_dll -lmscorlib_dll -lMSWordInterface_dll -lSystem_Configuration_dll -lSystem_Core_dll -lSystem_dll -lSystem_Runtime_Serialization_dll -lSystem_Security_dll -lSystem_Xml_dll -lmachine_config -o "bin/Release//Embed/Test" "bin/Release//Embed/main.o" '
/Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono/4.0/Monobjc.CocoaApplication.targets: error : clang: warning: argument unused during compilation: '-pthread'
        Embedding done
1

1 Answers

1
votes

The EncryptionSeed tag was introduced in the latest Monobjc MonoDevelop Addin to handle resources encryption and is only handled by Monobjc 5.0 serie.

As for the clang message, this is not quite an error. If you read the description, you will notice that this is a warning. The clang compiler is called through the Process class which allow the capture of the standard output and error streams. Unfortunately, the warnings are reported on the standard error stream: this is why the embedding task reports some errors when there are only warnings.

Please file a bug if you think the problem is a showstopper.