Forums

Cobra 0.9.6 Not Compiling

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Cobra 0.9.6 Not Compiling

Postby Kookerus » Sat Jan 10, 2015 9:54 pm

I'm having an issue compiling 0.9.6 on Debian 7.7.7 Wheezy. The weird thing is that 0.9.4 compiles without a problem.
Output from
Code: Select all
mono --version
is:
Image
The error I get from compiling is
Code: Select all
run: xbuild Cobra.MSBuild/TestProjects/ExampleSolution/HelloWorld/HelloWorld.cobraproj /target:rebuild
** ERROR: Cannot build Cobra project file using installed Cobra.MSBuild library
Need help with the above error?
 * Make sure you ran with sudo or as root.
 * Mono 2.10.x or higher are recommended.
 * Review http://cobra-language.com/troubleshooting
 * Ask at http://cobra-language.com/discuss
 * Ask at http://cobra-language.com/irc

I'm obviously running as root, and I've got the correct version of mono. What's wrong?
Kookerus
 
Posts: 5

Re: Cobra 0.9.6 Not Compiling

Postby nerdzero » Mon Jan 12, 2015 7:19 am

Do you have xbuild installed? This is Mono's equivalent for msbuild. Try installing it and then run the cobra installer again.
Code: Select all
sudo apt-get install mono-xbuild
nerdzero
 
Posts: 286
Location: Chicago, IL

Re: Cobra 0.9.6 Not Compiling

Postby Kookerus » Mon Jan 12, 2015 4:44 pm

nerdzero wrote:Do you have xbuild installed? This is Mono's equivalent for msbuild. Try installing it and then run the cobra installer again.
Code: Select all
sudo apt-get install mono-xbuild

Yes, I have the latest version available in the Debian repos.
I upgraded my system and it still throws the same error.
Kookerus
 
Posts: 5

Re: Cobra 0.9.6 Not Compiling

Postby Kookerus » Mon Jan 12, 2015 4:57 pm

nerdzero wrote:Do you have xbuild installed? This is Mono's equivalent for msbuild. Try installing it and then run the cobra installer again.
Code: Select all
sudo apt-get install mono-xbuild

I have the latest version available in the Debian repos.
I tried again after upgrading my system, and it still throws the same error.
Kookerus
 
Posts: 5

Re: Cobra 0.9.6 Not Compiling

Postby nerdzero » Tue Jan 13, 2015 12:00 pm

Try running the same command the installer program is failing on. From ~/Downloads/Cobra-0.9.6/Source, execute

Code: Select all
xbuild Cobra.MSBuild/TestProjects/ExampleSolution/HelloWorld/HelloWorld.cobraproj /target:rebuild


What's the error message? Here's sample output when I do it from my Ubuntu 14.04 box:

Code: Select all
XBuild Engine Version 12.0
Mono, Version 3.10.1.0
Copyright (C) 2005-2013 Various Mono authors

Build started 1/13/2015 12:57:29 PM.
__________________________________________________
Project "/home/ramon/Dropbox/workspaces/personal/cobra/trunk/Source/Cobra.MSBuild/TestProjects/ExampleSolution/HelloWorld/HelloWorld.cobraproj" (rebuild target(s)):
        Target CoreClean:
                Deleting file '/home/ramon/Dropbox/workspaces/personal/cobra/trunk/Source/Cobra.MSBuild/TestProjects/ExampleSolution/HelloWorld/obj/x86/Debug/HelloWorld.exe'
                Deleting file '/home/ramon/Dropbox/workspaces/personal/cobra/trunk/Source/Cobra.MSBuild/TestProjects/ExampleSolution/HelloWorld/obj/x86/Debug/HelloWorld.exe.mdb'
                Deleting file '/home/ramon/Dropbox/workspaces/personal/cobra/trunk/Source/Cobra.MSBuild/TestProjects/ExampleSolution/HelloWorld/bin/Debug/HelloWorld.exe.mdb'
                Deleting file '/home/ramon/Dropbox/workspaces/personal/cobra/trunk/Source/Cobra.MSBuild/TestProjects/ExampleSolution/HelloWorld/bin/Debug/HelloWorld.exe'
                Deleting file '/home/ramon/Dropbox/workspaces/personal/cobra/trunk/Source/Cobra.MSBuild/TestProjects/ExampleSolution/HelloWorld/obj/x86/Debug/HelloWorld.cobraproj.FilesWrittenAbsolute.txt'
        Target PrepareForBuild:
                Configuration: Debug Platform: x86
        Target GenerateSatelliteAssemblies:
        No input files were specified for target GenerateSatelliteAssemblies, skipping.
        Target CoreCompile:
                Tool /usr/local/bin/cobra execution started with arguments: -compile -back-end:none -clr-platform:x86 -copy-core:no -correct-source:none -debug:1 -delay-sign:no -embed-run-time:no -include-traces:yes -keep-intermediate-files:no -namespace:HelloWorld -native-compiler:auto -number:decimal -out:/home/ramon/Dropbox/workspaces/personal/cobra/trunk/Source/Cobra.MSBuild/TestProjects/ExampleSolution/HelloWorld/obj/x86/Debug/HelloWorld.exe -target:exe -native-compiler-arg:"/errorreport:none" /home/ramon/Dropbox/workspaces/personal/cobra/trunk/Source/Cobra.MSBuild/TestProjects/ExampleSolution/HelloWorld/Program.cobra
        Target DeployOutputFiles:
                Copying file from '/home/ramon/Dropbox/workspaces/personal/cobra/trunk/Source/Cobra.MSBuild/TestProjects/ExampleSolution/HelloWorld/obj/x86/Debug/HelloWorld.exe.mdb' to '/home/ramon/Dropbox/workspaces/personal/cobra/trunk/Source/Cobra.MSBuild/TestProjects/ExampleSolution/HelloWorld/bin/Debug/HelloWorld.exe.mdb'
                Copying file from '/home/ramon/Dropbox/workspaces/personal/cobra/trunk/Source/Cobra.MSBuild/TestProjects/ExampleSolution/HelloWorld/obj/x86/Debug/HelloWorld.exe' to '/home/ramon/Dropbox/workspaces/personal/cobra/trunk/Source/Cobra.MSBuild/TestProjects/ExampleSolution/HelloWorld/bin/Debug/HelloWorld.exe'
Done building project "/home/ramon/Dropbox/workspaces/personal/cobra/trunk/Source/Cobra.MSBuild/TestProjects/ExampleSolution/HelloWorld/HelloWorld.cobraproj".

Build succeeded.
         0 Warning(s)
         0 Error(s)

Time Elapsed 00:00:00.5735130
nerdzero
 
Posts: 286
Location: Chicago, IL

Re: Cobra 0.9.6 Not Compiling

Postby Kookerus » Tue Jan 13, 2015 12:17 pm

Output from the command is
Code: Select all
kookerus@Helis:~/Downloads/Cobra-0.9.6/Source$ xbuild Cobra.MSBuild/TestProjects/ExampleSolution/HelloWorld/HelloWorld.cobraproj /target:rebuild
XBuild Engine Version 2.10.8.1
Mono, Version 2.10.8.1
Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.

Build started 1/13/2015 2:16:15 PM.
__________________________________________________
Project "/home/kookerus/Downloads/Cobra-0.9.6/Source/Cobra.MSBuild/TestProjects/ExampleSolution/HelloWorld/HelloWorld.cobraproj" (rebuild target(s)):
   Target PrepareForBuild:
      Configuration: Debug Platform: x86
   Target CreateManifestResourceNames:
: error : Error initializing task ItemGroup: Not registered task ItemGroup.
   Task "ItemGroup" execution -- FAILED
   Done building target "CreateManifestResourceNames" in project "/home/kookerus/Downloads/Cobra-0.9.6/Source/Cobra.MSBuild/TestProjects/ExampleSolution/HelloWorld/HelloWorld.cobraproj".-- FAILED
Done building project "/home/kookerus/Downloads/Cobra-0.9.6/Source/Cobra.MSBuild/TestProjects/ExampleSolution/HelloWorld/HelloWorld.cobraproj".-- FAILED

Build FAILED.
Errors:

/home/kookerus/Downloads/Cobra-0.9.6/Source/Cobra.MSBuild/TestProjects/ExampleSolution/HelloWorld/HelloWorld.cobraproj (rebuild) ->
/usr/lib/mono/xbuild/Cobra/Cobra.targets (CreateManifestResourceNames target) ->

   : error : Error initializing task ItemGroup: Not registered task ItemGroup.

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:02.3987480
kookerus@Helis:~/Downloads/Cobra-0.9.6/Source$
Kookerus
 
Posts: 5

Re: Cobra 0.9.6 Not Compiling

Postby nerdzero » Tue Jan 13, 2015 8:12 pm

Well, I googled this part of the output:
Code: Select all
error : Error initializing task ItemGroup: Not registered task ItemGroup

and I got a lot of hits that indicate that Mono 3 or higher is required for xbuild to support this task. I'm running a source build of Mono and I remember it being a pain to get it to compile. Looks like some packages have been created since then though. Maybe try the instructions for the Debian/Ubunutu apt-repo from here: http://www.mono-project.com/docs/gettin ... all/linux/
nerdzero
 
Posts: 286
Location: Chicago, IL

Re: Cobra 0.9.6 Not Compiling

Postby Kookerus » Wed Jan 14, 2015 6:28 pm

Unfortunately, all versions past the Wheezy repos require a dist-upgrade to Jessie, and I don't feel like upgrading to a distro in testing.
Thanks for all the help though, I'll just use 0.9.4 until I can get my hands on Jessie.
Kookerus
 
Posts: 5


Return to Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron