Forums

Error installing Cobra version 0.96 on Windows

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

Error installing Cobra version 0.96 on Windows

Postby iceman » Wed Mar 26, 2014 8:02 am

Hello

I have installed Cobra 0.94 on Windows 7 amd64 successfully some time ago.

U:\projs\>cobra -about

The Cobra Programming Language 0.9.4
on .NET CLR v4.0.30319 on Microsoft Windows NT 6.1.7601 Service Pack 1
at C:\Cobra\Cobra-0.9.4\bin\cobra.exe

Copyright (C) 2003-2014 by Cobra Language LLC. All Rights Reserved.

On the web: http://cobra-language.com/
Source: http://cobra-language.com/source
Support: http://cobra-language.com/support
License: http://www.opensource.org/licenses/mit-license.php

Usage: cobra -h


But while trying to build a Ubuntu installation I noticed that Cobra was now at 0.96. So after installing it on Ubuntu I downloaded the zip archive to update the Windows installation. I renamed the old installation directory from C:\Cobra to C:\__Cobra, just in case I need it later.

I then ran the installation script but received an error which I no longer have access to as I closed the CMD window after it recommended running the script as Administrator. I did that and I still got an Error as follows (this is the end of output):

==== Locate msbuild.exe

Found: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe

==== Build Cobra.Core library

run: cobra.exe -build-standard-library -debug -turbo -out:Cobra.Core.dll -key-fi
le:Cobra.Core\Cobra.Core.snk Cobra.Core\AssemblyAttrs.cobra
: Compilation succeeded

==== Install Cobra.Core library to the GAC

Invoking Publish.GacInstall...
Done.

==== Verifying Cobra.Core.dll installed to the GAC

run: C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe -l Cobra.Core

: Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.30729.1
: Copyright (c) Microsoft Corporation. All rights reserved.
:
: The Global Assembly Cache contains the following assemblies:
:
: Number of items = 0

** ERROR: After installing the library "Cobra.Core", it cannot be loaded.
Need help with the above error?
* Make sure you ran as a Windows Administrator.
* Install .NET or a Visual Studio product if you have not before.
* Review http://cobra-language.com/troubleshooting
* Ask at http://cobra-language.com/discuss
* Ask at http://cobra-language.com/irc



I tried to use the "ldr64 setwow" tip found in the troubleshooting guide (as I remember faintly I had to use it for the 0.94 version-- or at least I investigated it before-- and then run the install script but I still got the same error. I have since ran "ldr64 set64" to switch back.

What am I doing wrong?

Thanks


PS I renamed the old Cobra installation to reactivate it and it is still running fine.
iceman
 
Posts: 4

Re: Error installing Cobra version 0.96 on Windows

Postby Charles » Wed Mar 26, 2014 2:11 pm

You probably don't have to rename the \Cobra directory, because Cobra actually installs the specific version under that.

Regarding your problems, the thing that really stands out is the mismatch in version numbers:

Code: Select all
Found: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
...
run: C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe -l Cobra.Core
: Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.30729.1


Looks like it finds msbuild from .NET 4 but then only finds the GAC from .NET 3.5.

I'm curious what your 0.9.4 cobra says for "cobra -about". This will report the .NET runtime which should be either 2.x or 4.x (.NET 3.0 and 3.5 and just libraries that run on the 2.x run-time).

I'm also curious about the output for:
Code: Select all
cd \Windows
dir msbuild.exe /s
cd \Program Files
dir gacutil.exe /s


With the above information, we may be able to improve the installer to work right, or at least detect the situation and give an informative message.

Ideas for getting 0.9.6 on your system:

-- Install the .NET SDK and the install from the SDK prompt.
-- Or, same thing, but install a recent Visual Studio Express.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Error installing Cobra version 0.96 on Windows

Postby iceman » Wed Mar 26, 2014 3:15 pm

Hello Charles,

The output of "Cobra --about" for version 0.94 is in my first post above. As for the other output you were interested in seeing, here it is:


MSBUILD
Code: Select all
C:\Windows>dir msbuild.exe /s
 
 Directory of C:\Windows\assembly\GAC_32\MSBuild\3.5.0.0__b03f5f7f11d50a3a

06/10/2009  11:14 PM            87,888 MSBuild.exe
               1 File(s)         87,888 bytes

 Directory of C:\Windows\assembly\GAC_64\MSBuild\3.5.0.0__b03f5f7f11d50a3a

11/05/2010  03:53 AM            83,792 MSBuild.exe
               1 File(s)         83,792 bytes

 Directory of C:\Windows\Microsoft.NET\Framework\v2.0.50727

11/05/2010  03:57 AM            69,632 MSBuild.exe
               1 File(s)         69,632 bytes

 Directory of C:\Windows\Microsoft.NET\Framework\v3.5

06/10/2009  11:14 PM            87,888 MSBuild.exe
               1 File(s)         87,888 bytes

 Directory of C:\Windows\Microsoft.NET\Framework\v4.0.30319

09/11/2013  10:33 PM           267,336 MSBuild.exe
               1 File(s)        267,336 bytes

 Directory of C:\Windows\Microsoft.NET\Framework64\v2.0.50727

11/05/2010  03:56 AM            65,536 MSBuild.exe
               1 File(s)         65,536 bytes

 Directory of C:\Windows\Microsoft.NET\Framework64\v3.5

11/05/2010  03:53 AM            83,792 MSBuild.exe
               1 File(s)         83,792 bytes

 Directory of C:\Windows\Microsoft.NET\Framework64\v4.0.30319

09/11/2013  07:39 PM           263,240 MSBuild.exe
               1 File(s)        263,240 bytes

 Directory of C:\Windows\winsxs\amd64_msbuild_b03f5f7f11d50a3a_3.5.7600.16385_no
ne_e85b8cfa614685bd

06/10/2009  10:31 PM            83,776 MSBuild.exe
               1 File(s)         83,776 bytes

 Directory of C:\Windows\winsxs\amd64_msbuild_b03f5f7f11d50a3a_3.5.7601.17514_no
ne_ea8ca0c25e350957

11/05/2010  03:53 AM            83,792 MSBuild.exe
               1 File(s)         83,792 bytes

 Directory of C:\Windows\winsxs\amd64_msbuild_b03f5f7f11d50a3a_6.1.7600.16385_no
ne_0e0d302b5908105b

06/10/2009  10:39 PM            65,536 MSBuild.exe
               1 File(s)         65,536 bytes

 Directory of C:\Windows\winsxs\amd64_msbuild_b03f5f7f11d50a3a_6.1.7601.17514_no
ne_0de23daf595f5711

11/05/2010  03:56 AM            65,536 MSBuild.exe
               1 File(s)         65,536 bytes

 Directory of C:\Windows\winsxs\x86_msbuild_b03f5f7f11d50a3a_3.5.7600.16385_none
_8c3cf176a8e91487

06/10/2009  11:14 PM            87,888 MSBuild.exe
               1 File(s)         87,888 bytes

 Directory of C:\Windows\winsxs\x86_msbuild_b03f5f7f11d50a3a_6.1.7600.16385_none
_55ba67026d843961

06/10/2009  11:23 PM            69,632 MSBuild.exe
               1 File(s)         69,632 bytes

 Directory of C:\Windows\winsxs\x86_msbuild_b03f5f7f11d50a3a_6.1.7601.17514_none
_558f74866ddb8017

11/05/2010  03:57 AM            69,632 MSBuild.exe
               1 File(s)         69,632 bytes

     Total Files Listed:
              15 File(s)      1,534,896 bytes



GACUTIL
Code: Select all
C:\Windows>cd \Program Files

C:\Program Files>dir gacutil.exe /s

 Directory of C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin

07/29/2008  01:59 PM           106,496 gacutil.exe
               1 File(s)        106,496 bytes

 Directory of C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64

07/29/2008  02:09 PM           113,664 gacutil.exe
               1 File(s)        113,664 bytes

 Directory of C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin

05/13/2010  08:54 PM           103,248 gacutil.exe
               1 File(s)        103,248 bytes

 Directory of C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools

03/18/2010  05:51 PM            90,960 gacutil.exe
               1 File(s)         90,960 bytes

 Directory of C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools\x
64

03/19/2010  04:16 AM           105,808 gacutil.exe
               1 File(s)        105,808 bytes

 Directory of C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\x64

05/13/2010  10:52 PM           110,416 gacutil.exe
               1 File(s)        110,416 bytes

     Total Files Listed:
               6 File(s)        630,592 bytes
               



I think I may have the .NET and Windows SDKs installed and I do have Visual Studio Express 2010 installed as well, if that makes a difference. Given how many of these exist and the how long ago they were installed, I have to say that I could be mistaken concerning the .NET SDK being on the system. Is there a test or output from some program(s) you suggest I run to make sure that the system meets the installation requirements of Cobra 0.96?

I say that also because I am curious as to why Cobra 0.94 found enough resources (of SDK, etc.) to get itself installed but Cobra 0.96 couldn't.

Regards
iceman
 
Posts: 4

Re: Error installing Cobra version 0.96 on Windows

Postby Charles » Wed Mar 26, 2014 11:14 pm

So it's interesting that you have a newer gacutil from your directory listing:
C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin

Than what the installer picked up:
run: C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe -l Cobra.Core

Looking in CobraWorkspace/Source/InstallFromWorkSpace.cobra, I see these directories:
# ...
dirs = [
# Windows 8.1 SDK
r'\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64',
r'\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools',

r'Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools', # VS 2012
r'\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools', # VS2012
r'Microsoft SDKs\Windows\v6.0A\bin', # VS 2008
r'Microsoft.NET\SDK\v2.0\bin', # VS 2005 / SDK .NET 2.0
r'Microsoft Visual Studio 8\SDK\v2.0\Bin',
]

Obviously 7.1 is missing. Looking at the comments, that would obviously correspond to VS2010 which is congruent with your comments.

So I think you should be able to get the installer working by adding the path in there or installing VS 2012 or installing .NET SDK 4.5. Your choice. Let us know how it goes.

In the future, it might not hurt for us to add command line options for the location of gacutil and msbuild.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Error installing Cobra version 0.96 on Windows

Postby iceman » Thu Mar 27, 2014 3:46 am

Okay. So I have tried the first option: adding the VS2010's binary path to the installation script, as suggested. That unfortunately didn't work. I even deleted the previously compiled Cobra files and the unzipped archive contents to start with a clean slate; still a no go.

So that leaves me with the other two options, which require relatively more time and effort. I'll report back when I have news.

Thanks

Code: Select all
Compiling installation program...

The Cobra Programming Language
Install From Workspace

Working...

==== Print Platform Description

Platform:          Microsoft Windows NT 6.1.7601 Service Pack 1
WMI Op Sys Ver:    Caption=Microsoft Windows 7 Professional ; CSDVersion=Service
 Pack 1
Cmd Op Sys Ver:    Microsoft Windows [Version 6.1.7601]
Virtual Machine:   .NET
CLR Version:       v4.0.30319
Env Command Line:  "InstallFromWorkspace"
Env Current Dir:   J:\projs\lab\Cobra\Source
Env OS Version:    Microsoft Windows NT 6.1.7601 Service Pack 1
Env System Dir:    C:\Windows\system32
Env Version:       4.0.30319.18444
.NET Dirs:         v4.0.30319 ; v3.5 ; v3.0 ; v2.0.50727 ; v1.1.4322 ; v1.0.3705


==== Verify running as admin user

==== Verify installation directory

found dir: C:\Cobra

==== Verify running in workspace

Verified.

==== Locate and test Cobra Snapshot compiler

run: Snapshot\cobra.exe -about
   : The Cobra Programming Language svn:3030 (post 0.9.4) / 2013-08-16
   : on .NET CLR v4.0.30319 on Microsoft Windows NT 6.1.7601 Service Pack 1
   : at J:\projs\lab\Cobra\Source\Snapshot\cobra.exe
   :
   : Copyright (C) 2003-2014 by Cobra Language LLC.  All Rights Reserved.
   :
   : On the web:  http://cobra-language.com/
   : Source:      http://cobra-language.com/source
   : Support:     http://cobra-language.com/support
   : License:     http://www.opensource.org/licenses/mit-license.php
   :
   : Usage:       cobra -h

==== Build new Cobra compiler

run: Snapshot\cobra.exe -compile -turbo -ert:yes cobra.cobra -files:files-to-com
pile.text
   : Compilation succeeded

==== Retrieve Cobra base version number

run: cobra.exe -version
   : Cobra 0.9.6 on .NET CLR v4.0.30319 on Microsoft Windows NT 6.1.7601 Service
 Pack 1

base version: 0.9.6

==== Locate gacutil.exe

Searching for gacutil...
checking: C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 To
ols\x64\gacutil.exe
checking: C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 To
ols\gacutil.exe
checking: C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tool
s\gacutil.exe
checking: C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tool
s\gacutil.exe
checking: C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\gacutil.exe
Found: C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\gacutil.exe

==== Locate msbuild.exe

Found: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe

==== Build Cobra.Core library

run: cobra.exe -build-standard-library -debug -turbo -out:Cobra.Core.dll -key-fi
le:Cobra.Core\Cobra.Core.snk  Cobra.Core\AssemblyAttrs.cobra
   : Compilation succeeded

==== Install Cobra.Core library to the GAC

Invoking Publish.GacInstall...
Done.

==== Verifying Cobra.Core.dll installed to the GAC

run: C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\gacutil.exe -l Cobra.Core
   : Microsoft (R) .NET Global Assembly Cache Utility.  Version 3.5.30729.1
   : Copyright (c) Microsoft Corporation.  All rights reserved.
   :
   : The Global Assembly Cache contains the following assemblies:
   :
   : Number of items = 0

** ERROR: After installing the library "Cobra.Core", it cannot be loaded.
Need help with the above error?
 * Make sure you ran as a Windows Administrator.
 * Install .NET or a Visual Studio product if you have not before.
 * Review http://cobra-language.com/troubleshooting
 * Ask at http://cobra-language.com/discuss
 * Ask at http://cobra-language.com/irc
iceman
 
Posts: 4

Re: Error installing Cobra version 0.96 on Windows

Postby iceman » Thu Mar 27, 2014 7:49 am

Success!

Code: Select all
J:\projs\lab>cobra --about

The Cobra Programming Language 0.9.6
on .NET CLR v4.0.30319 on Microsoft Windows NT 6.1.7601 Service Pack 1
at C:\Cobra\Cobra-0.9.6\bin\cobra.exe

Copyright (C) 2003-2014 by Cobra Language LLC.  All Rights Reserved.

On the web:  http://cobra-language.com/
Source:      http://cobra-language.com/source
Support:     http://cobra-language.com/support
License:     http://www.opensource.org/licenses/mit-license.php

Usage:       cobra -h


I didn't have to install anything new. It seems that the path to VS2010's gacutil.exe needed tweaking. Apparently this

Code: Select all
r'\Program Files\Microsoft SDKs\Windows\v7.1\Bin',    # VS 2010


does not work. But this does:

Code: Select all
r'\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools\x64', # VS2010
r'\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools', # VS2010


At any rate, I hope someone will benefit from this.

Regards
iceman
 
Posts: 4

Re: Error installing Cobra version 0.96 on Windows

Postby Charles » Thu Mar 27, 2014 8:56 am

Thanks for reporting back. I'll add those paths to the installer though currently the .NET requirement has jumped to 4.5 which was released August 2012. (We could always roll back to 4.0 though some effort is required.)
Charles
 
Posts: 2515
Location: Los Angeles, CA


Return to Discussion

Who is online

Users browsing this forum: No registered users and 68 guests

cron