Xamarin.Android Source - Build Error

FulvioFulvio AUMember ✭✭
edited April 2016 in Xamarin.Android

I have cloned the xamarin-android git repository from:

https://github.com/xamarin/xamarin-android

I'm on Mac OSX and when I execute make prepare it successfully installs the dependencies:

Installing 'Mono.Options 4.4.0.0'.
Installing 'FSharp.Compiler.CodeDom 0.9.4'.
Installing 'Mono.Options-PCL 2.0.40'.
Installing 'Unofficial.Ionic.Zip 1.9.1.8'.
Installing 'Irony 0.9.1'.
Installing 'FSharp.Compiler.CodeDom 1.0.0.1'.
Installing 'Mono.Cecil 0.9.6.1'.
Successfully installed 'Mono.Options-PCL 2.0.40'.
Successfully installed 'FSharp.Compiler.CodeDom 0.9.4'.
Successfully installed 'Unofficial.Ionic.Zip 1.9.1.8'.
Successfully installed 'FSharp.Compiler.CodeDom 1.0.0.1'.
Successfully installed 'Mono.Options 4.4.0.0'.
Successfully installed 'Irony 0.9.1'.
Successfully installed 'Mono.Cecil 0.9.6.1'.
(cd external/Java.Interop && nuget restore)
Installing 'Mono.Options-PCL 2.0.40'.
Installing 'Mono.Options 4.4.0.0'.
Installing 'Mono.Terminal 4.2.2.0'.
Installing 'Mono.CSharp 4.0.0.143'.
Installing 'NUnit 2.6.3'.
Installing 'Mono.Cecil 0.9.6.1'.
Successfully installed 'Mono.Options-PCL 2.0.40'.
Successfully installed 'Mono.CSharp 4.0.0.143'.
Successfully installed 'Mono.Terminal 4.2.2.0'.
Successfully installed 'NUnit 2.6.3'.
Successfully installed 'Mono.Options 4.4.0.0'.
Installing 'NUnit.Runners 2.6.3'.
Successfully installed 'Mono.Cecil 0.9.6.1'.
Successfully installed 'NUnit.Runners 2.6.3'.

When I execute make I get 2 Error(s):

/Users/fulvio/Documents/TFS/xamarin-android/Xamarin.Android.sln (default targets) ->
(Build target) ->
/Users/fulvio/Documents/TFS/xamarin-android/build-tools/mono-runtimes/mono-runtimes.mdproj (default targets) ->
/Users/fulvio/Documents/TFS/xamarin-android/build-tools/mono-runtimes/mono-runtimes.targets (_Autogen target) ->

    /Users/fulvio/Documents/TFS/xamarin-android/build-tools/mono-runtimes/mono-runtimes.targets: error : Command 'NOCONFIGURE=1 ./autogen.sh' exited with code: 1.

/Users/fulvio/Documents/TFS/xamarin-android/Xamarin.Android.sln (default targets) ->
(Build target) ->
/Users/fulvio/Documents/TFS/xamarin-android/src/monodroid/monodroid.mdproj (default targets) ->
/Users/fulvio/Documents/TFS/xamarin-android/src/monodroid/monodroid.targets (_BuildRuntimes target) ->

    /Users/fulvio/Documents/TFS/xamarin-android/src/monodroid/monodroid.targets: error : Command '/Users/fulvio/android-toolchain/ndk/ndk-build CONFIGURATION=Debug V=1' exited with code: 2.

     8 Warning(s)
     2 Error(s)

If I execute the following command in the /Users/fulvio/Documents/TFS/xamarin-android/src/monodroid folder:

/Users/fulvio/android-toolchain/ndk/ndk-build CONFIGURATION=Debug V=1

I receive the following error, which is what I think is causing the original error:

[email protected]:~/Documents/TFS/xamarin-android/src/monodroid$ /Users/fulvio/android-toolchain/ndk/ndk-build CONFIGURATION=Debug V=1 rm -f ./libs/arm64-v8a/lib*.so ./libs/armeabi/lib*.so ./libs/armeabi-v7a/lib*.so ./libs/armeabi-v7a-hard/lib*.so ./libs/mips/lib*.so ./libs/mips64/lib*.so ./libs/x86/lib*.so ./libs/x86_64/lib*.so rm -f ./libs/arm64-v8a/gdbserver ./libs/armeabi/gdbserver ./libs/armeabi-v7a/gdbserver ./libs/armeabi-v7a-hard/gdbserver ./libs/mips/gdbserver ./libs/mips64/gdbserver ./libs/x86/gdbserver ./libs/x86_64/gdbserver rm -f ./libs/arm64-v8a/gdb.setup ./libs/armeabi/gdb.setup ./libs/armeabi-v7a/gdb.setup ./libs/armeabi-v7a-hard/gdb.setup ./libs/mips/gdb.setup ./libs/mips64/gdb.setup ./libs/x86/gdb.setup ./libs/x86_64/gdb.setup [armeabi-v7a] Compile thumb : monodroid <= nl.c /Users/fulvio/android-toolchain/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc -MMD -MP -MF ./obj/local/armeabi-v7a/objs/monodroid/__/__/__/external/mono/support/nl.o.d -fpic -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -Os -g -DNDEBUG -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -Ijni/../../../build-tools/mono-runtimes/obj/Debug/armeabi-v7a -Ijni/../../../build-tools/mono-runtimes/obj/Debug/armeabi-v7a/eglib -Ijni/../../../build-tools/mono-runtimes/obj/Debug/armeabi-v7a/eglib/src -Ijni/../../../external/mono/eglib/src -Ijni/zip -Ijni -DANDROID -std=c99 -DHAVE_LINUX_NETLINK_H=1 -DHAVE_LINUX_RTNETLINK_H=1 -D_REENTRANT -DPLATFORM_ANDROID -DANDROID -DLINUX -Dlinux -D__linux_ -DHAVE_CONFIG_H -DJI_DLL_EXPORT -DMONO_DLL_EXPORT -I/libmonodroid/zip -I/include -I/include/eglib -mandroid -fno-strict-aliasing -ffunction-sections -fomit-frame-pointer -funswitch-loops -finline-limit=300 -fvisibility=hidden -fstack-protector -Wa,--noexecstack -Wformat -Werror=format-security -DDEBUG=1 -Wa,--noexecstack -Wformat -Werror=format-security -isystem /Users/fulvio/android-toolchain/ndk/platforms/android-9/arch-arm/usr/include -c jni/../../../external/mono/support/nl.c -o ./obj/local/armeabi-v7a/objs/monodroid/__/__/__/external/mono/support/nl.o In file included from jni/../../../external/mono/support/nl.h:3:0, from jni/../../../external/mono/support/nl.c:14: jni/../../../external/mono/eglib/src/glib.h:22:26: fatal error: eglib-config.h: No such file or directory #include <eglib-config.h> ^ compilation terminated. make: *** [obj/local/armeabi-v7a/objs/monodroid/__/__/__/external/mono/support/nl.o] Error 1 [email protected]:~/Documents/TFS/xamarin-android/src/monodroid$

The problem it seems is that the eglib-config.h file is missing.

Posts

  • FulvioFulvio AUMember ✭✭
    edited April 2016

    EDIT: I noticed that the xamarin-macios source mentioned using --recursive when cloning the repository. So I tried that with the xamarin-android repository and was able to get further than before, although I still receive the following error:

    See attached image: http://i.imgur.com/JXmlDpx.gif

                Target _GenerateBinding:
                Skipping target "_GenerateBinding" because its outputs are up-to-date.
    : error : Error building target _GenerateBinding: Not registered task XmlPeek.
            Done building project "/Users/fulvio/Documents/TFS/xamarin-android/src/Mono.Android/Mono.Android.csproj".-- FAILED
        Task "MSBuild" execution -- FAILED
        Done building target "Build" in project "/Users/fulvio/Documents/TFS/xamarin-android/Xamarin.Android.sln".-- FAILED
    Done building project "/Users/fulvio/Documents/TFS/xamarin-android/Xamarin.Android.sln".-- FAILED
    
    Build FAILED.
    
    Warnings:
    
    /Users/fulvio/Documents/TFS/xamarin-android/external/Java.Interop/src/Xamarin.Android.NamingCustomAttributes/Xamarin.Android.NamingCustomAttributes.shproj:  warning : Could not find project file /Library/Frameworks/Mono.framework/External/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.Common.Default.props, to import. Ignoring.
    /Users/fulvio/Documents/TFS/xamarin-android/external/Java.Interop/src/Xamarin.Android.NamingCustomAttributes/Xamarin.Android.NamingCustomAttributes.shproj:  warning : Could not find project file /Library/Frameworks/Mono.framework/External/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.Common.props, to import. Ignoring.
    /Users/fulvio/Documents/TFS/xamarin-android/external/Java.Interop/src/Xamarin.Android.NamingCustomAttributes/Xamarin.Android.NamingCustomAttributes.shproj:  warning : Could not find project file /Library/Frameworks/Mono.framework/External/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.CSharp.targets, to import. Ignoring.
    /Users/fulvio/Documents/TFS/xamarin-android/external/Java.Interop/src/Java.Interop.Tools.TypeNameMappings/Java.Interop.Tools.TypeNameMappings.shproj:  warning : Could not find project file /Library/Frameworks/Mono.framework/External/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.Common.Default.props, to import. Ignoring.
    /Users/fulvio/Documents/TFS/xamarin-android/external/Java.Interop/src/Java.Interop.Tools.TypeNameMappings/Java.Interop.Tools.TypeNameMappings.shproj:  warning : Could not find project file /Library/Frameworks/Mono.framework/External/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.Common.props, to import. Ignoring.
    /Users/fulvio/Documents/TFS/xamarin-android/external/Java.Interop/src/Java.Interop.Tools.TypeNameMappings/Java.Interop.Tools.TypeNameMappings.shproj:  warning : Could not find project file /Library/Frameworks/Mono.framework/External/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.CSharp.targets, to import. Ignoring.
    
    /Users/fulvio/Documents/TFS/xamarin-android/Xamarin.Android.sln (default targets) ->
    (Build target) ->
    
        /Users/fulvio/Documents/TFS/xamarin-android/Xamarin.Android.sln:  warning : The project configuration for project 'Xamarin.Android.NamingCustomAttributes' corresponding to the solution configuration 'Debug|AnyCPU' was not found.
        /Users/fulvio/Documents/TFS/xamarin-android/Xamarin.Android.sln:  warning : The project configuration for project 'Java.Interop.Tools.TypeNameMappings' corresponding to the solution configuration 'Debug|AnyCPU' was not found.
    
    Errors:
    
    /Users/fulvio/Documents/TFS/xamarin-android/Xamarin.Android.sln (default targets) ->
    (Build target) ->
    /Users/fulvio/Documents/TFS/xamarin-android/src/Mono.Android/Mono.Android.csproj (default targets) ->
    
        : error : Error building target _GenerateBinding: Not registered task XmlPeek.
    
         8 Warning(s)
         1 Error(s)
    
    Time Elapsed 00:00:04.9646510
    make: *** [all] Error 1
    [email protected]:~/Documents/TFS/xamarin-android$ 
    
    
  • FulvioFulvio AUMember ✭✭

    Fixed by installing mono >= 4.4.0 . Mono added a working implementation of XmlPeek to mono in 4.4.0 .

Sign In or Register to comment.