Problem setting VW home directory using X11 on Intel Mac

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem setting VW home directory using X11 on Intel Mac

Rowan Bunning

I'm having a pretty basic problem setting the VisualWorks home  
directory in a clean visual.im running in X11 using the preview VM on  
a new Intel Mac. This has never been a problem for me before using  
X11 and native VMs on previous PowerPC-based machines.

Upon selecting Apply in the Settings dialog having set the home  
directory to /Developer/vw7.4.1 where VW is installed I get the error:
"Unable to set the VISUALWORKS environment variable.
If you are running on Windows 95, 98, NT or 2000 you may not have the  
proper permissions to write to the system registry. Please contact  
your system administrator."

I have been able to set the $VISUALWORKS variable successfully by  
adding "export VISUALWORKS=/Developer/vw7.4.1" to a copy of  
the .xinitrc file in my home dir but it seems that VW does not use this.

Has anyone had this problem on Mac/*NIX? Should I be checking  
permissions on a particular file somewhere?

Thanks,
Rowan.

www.softwarewithstyle.com

Reply | Threaded
Open this post in threaded view
|

Re: Problem setting VW home directory using X11 on Intel Mac

Mike Hales
I've got the same problem!  Anybody running this successfully?

Mike

Rowan Bunning wrote:

>
> I'm having a pretty basic problem setting the VisualWorks home
> directory in a clean visual.im running in X11 using the preview VM on
> a new Intel Mac. This has never been a problem for me before using X11
> and native VMs on previous PowerPC-based machines.
>
> Upon selecting Apply in the Settings dialog having set the home
> directory to /Developer/vw7.4.1 where VW is installed I get the error:
> "Unable to set the VISUALWORKS environment variable.
> If you are running on Windows 95, 98, NT or 2000 you may not have the
> proper permissions to write to the system registry. Please contact
> your system administrator."
>
> I have been able to set the $VISUALWORKS variable successfully by
> adding "export VISUALWORKS=/Developer/vw7.4.1" to a copy of the
> .xinitrc file in my home dir but it seems that VW does not use this.
>
> Has anyone had this problem on Mac/*NIX? Should I be checking
> permissions on a particular file somewhere?
>
> Thanks,
> Rowan.
>
> www.softwarewithstyle.com
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Problem setting VW home directory using X11 on Intel Mac

Mike Hales
Ok, I set a halt and stepped through the setting of the environment
variable and everything would look correct, then I would proceed and
still get the error.  So I started to think something was weird with my
environment variables.  In the readme in the
vw7.4.1nc/bin/preview/macx86x11 directory clear down at the bottom there
is this:

2. Environment variables are implemented as entries in the UserDefaults
   database.  Each user has his own UserDefaults database where, e.g.,
   the variable VISUALWORKS is stored, if set.  Because the UserDefaults
   database is only written on a clean application quit, VisualWorks
   sometimes misses this database operation.  You can set the
   define manually from a Terminal:

      user% defaults write com.cincom.vw7.3 '{ VISUALWORKS =
/<YourPathGoesHere>/vw7.3 }'

So I started monkeying with the defaults command in a terminal.  In a
terminal I did a

defaults find cincom

and it came back with a key value pair for com.cincom.vw7.4.1nc and some
horribly long mangled weird thing for the value.  So I did

defaults delete com.cincom.vw7.4.1nc

Then I just made a script to export VISUALWORKS=<my installation path>
and open the visual.app with the image as the argument and everything
worked.  I don't where along the line things got mungered, but I had the
same symptoms as Rowan.

When I installed, I installed off of the 7.4.1 june06.3 iso from the ftp
site.

Mike Hales wrote:

> I've got the same problem!  Anybody running this successfully?
>
> Mike
>
> Rowan Bunning wrote:
>>
>> I'm having a pretty basic problem setting the VisualWorks home
>> directory in a clean visual.im running in X11 using the preview VM on
>> a new Intel Mac. This has never been a problem for me before using
>> X11 and native VMs on previous PowerPC-based machines.
>>
>> Upon selecting Apply in the Settings dialog having set the home
>> directory to /Developer/vw7.4.1 where VW is installed I get the error:
>> "Unable to set the VISUALWORKS environment variable.
>> If you are running on Windows 95, 98, NT or 2000 you may not have the
>> proper permissions to write to the system registry. Please contact
>> your system administrator."
>>
>> I have been able to set the $VISUALWORKS variable successfully by
>> adding "export VISUALWORKS=/Developer/vw7.4.1" to a copy of the
>> .xinitrc file in my home dir but it seems that VW does not use this.
>>
>> Has anyone had this problem on Mac/*NIX? Should I be checking
>> permissions on a particular file somewhere?
>>
>> Thanks,
>> Rowan.
>>
>> www.softwarewithstyle.com
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Problem setting VW home directory using X11 on Intel Mac

Roel Wuyts
I had the same problem.

I deleted the entry in the defaults database, but then launching the  
image by dropping the image file on the VM (after X!! has been  
launched) cannot set the image path (even with the export set during  
login).

I could not get your solution to work either:
(1) deleted the cincom entries in UserDefaults.
(2) created a script with these commands:

export VISUALWORKS=/Applications/vw7.4.1nc
open /Applications//vw7.4.1nc/bin/preview/macx86x11/visual.app/ /
Users/rowuyts/Documents/Development/VW7.4.1/RoelTyper.im

opens up the image fine, but with the same problems as before (path  
set wrong and no way to set it from within VisualWorks). What do you  
do in your script (I guess I am messing up somewhere) ?


On 25 Jul 2006, at 16:56, Mike Hales wrote:

> Ok, I set a halt and stepped through the setting of the environment  
> variable and everything would look correct, then I would proceed  
> and still get the error.  So I started to think something was weird  
> with my environment variables.  In the readme in the vw7.4.1nc/bin/
> preview/macx86x11 directory clear down at the bottom there is this:
>
> 2. Environment variables are implemented as entries in the  
> UserDefaults
>   database.  Each user has his own UserDefaults database where, e.g.,
>   the variable VISUALWORKS is stored, if set.  Because the  
> UserDefaults
>   database is only written on a clean application quit, VisualWorks
>   sometimes misses this database operation.  You can set the
>   define manually from a Terminal:
>
>      user% defaults write com.cincom.vw7.3 '{ VISUALWORKS = /
> <YourPathGoesHere>/vw7.3 }'
>
> So I started monkeying with the defaults command in a terminal.  In  
> a terminal I did a
>
> defaults find cincom
>
> and it came back with a key value pair for com.cincom.vw7.4.1nc and  
> some horribly long mangled weird thing for the value.  So I did
>
> defaults delete com.cincom.vw7.4.1nc
>
> Then I just made a script to export VISUALWORKS=<my installation  
> path> and open the visual.app with the image as the argument and  
> everything worked.  I don't where along the line things got  
> mungered, but I had the same symptoms as Rowan.
>
> When I installed, I installed off of the 7.4.1 june06.3 iso from  
> the ftp site.
>
> Mike Hales wrote:
>> I've got the same problem!  Anybody running this successfully?
>>
>> Mike
>>
>> Rowan Bunning wrote:
>>>
>>> I'm having a pretty basic problem setting the VisualWorks home  
>>> directory in a clean visual.im running in X11 using the preview  
>>> VM on a new Intel Mac. This has never been a problem for me  
>>> before using X11 and native VMs on previous PowerPC-based machines.
>>>
>>> Upon selecting Apply in the Settings dialog having set the home  
>>> directory to /Developer/vw7.4.1 where VW is installed I get the  
>>> error:
>>> "Unable to set the VISUALWORKS environment variable.
>>> If you are running on Windows 95, 98, NT or 2000 you may not have  
>>> the proper permissions to write to the system registry. Please  
>>> contact your system administrator."
>>>
>>> I have been able to set the $VISUALWORKS variable successfully by  
>>> adding "export VISUALWORKS=/Developer/vw7.4.1" to a copy of  
>>> the .xinitrc file in my home dir but it seems that VW does not  
>>> use this.
>>>
>>> Has anyone had this problem on Mac/*NIX? Should I be checking  
>>> permissions on a particular file somewhere?
>>>
>>> Thanks,
>>> Rowan.
>>>
>>> www.softwarewithstyle.com
>>>
>>>
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Problem setting VW home directory using X11 on Intel Mac

Bob Westergaard-2
In reply to this post by Rowan Bunning

This is a known issue.  As far as I can remember about the details of the
problem it has to do with how the VM was built for intel MacOSX on X11.
Some big-endian definitions were included in the VM when they should not
have instead been little-endian.  Setting enviornment variables from the
image won't work.

I'm not sure if there is a workaround, nor am I sure when new engines will
be re-built.  I suspect the only way to truly fix the problem is to
rebuild the engine for that platform. As soon as new engine is available
folks will hear about it in the usual channels.


Reply | Threaded
Open this post in threaded view
|

Re: Problem setting VW home directory using X11 on Intel Mac

Mike Hales
In reply to this post by Roel Wuyts
Here is the script:

#!/bin/bash

export VISUALWORKS='/Users/mike/vw7.4.1nc'
cd /Users/mike/vw7.4.1nc/bin/preview/macx86x11
open -a visual.app ~/vw7.4.1nc/image/visualnc.im

I launch it from an x-terminal.  Actually I just added an entry for it
in the applications list in X, so to launch I start X then run the
script from the menu.  I just made a script for each image that I want
to launch (a vanilla visual.im or my development image).

Mike

Roel Wuyts wrote:

> I had the same problem.
>
> I deleted the entry in the defaults database, but then launching the
> image by dropping the image file on the VM (after X!! has been
> launched) cannot set the image path (even with the export set during
> login).
>
> I could not get your solution to work either:
> (1) deleted the cincom entries in UserDefaults.
> (2) created a script with these commands:
>
> export VISUALWORKS=/Applications/vw7.4.1nc
> open /Applications//vw7.4.1nc/bin/preview/macx86x11/visual.app/
> /Users/rowuyts/Documents/Development/VW7.4.1/RoelTyper.im
>
> opens up the image fine, but with the same problems as before (path
> set wrong and no way to set it from within VisualWorks). What do you
> do in your script (I guess I am messing up somewhere) ?
>
>
> On 25 Jul 2006, at 16:56, Mike Hales wrote:
>
>> Ok, I set a halt and stepped through the setting of the environment
>> variable and everything would look correct, then I would proceed and
>> still get the error.  So I started to think something was weird with
>> my environment variables.  In the readme in the
>> vw7.4.1nc/bin/preview/macx86x11 directory clear down at the bottom
>> there is this:
>>
>> 2. Environment variables are implemented as entries in the UserDefaults
>>   database.  Each user has his own UserDefaults database where, e.g.,
>>   the variable VISUALWORKS is stored, if set.  Because the UserDefaults
>>   database is only written on a clean application quit, VisualWorks
>>   sometimes misses this database operation.  You can set the
>>   define manually from a Terminal:
>>
>>      user% defaults write com.cincom.vw7.3 '{ VISUALWORKS =
>> /<YourPathGoesHere>/vw7.3 }'
>>
>> So I started monkeying with the defaults command in a terminal.  In a
>> terminal I did a
>>
>> defaults find cincom
>>
>> and it came back with a key value pair for com.cincom.vw7.4.1nc and
>> some horribly long mangled weird thing for the value.  So I did
>>
>> defaults delete com.cincom.vw7.4.1nc
>>
>> Then I just made a script to export VISUALWORKS=<my installation
>> path> and open the visual.app with the image as the argument and
>> everything worked.  I don't where along the line things got mungered,
>> but I had the same symptoms as Rowan.
>>
>> When I installed, I installed off of the 7.4.1 june06.3 iso from the
>> ftp site.
>>
>> Mike Hales wrote:
>>> I've got the same problem!  Anybody running this successfully?
>>>
>>> Mike
>>>
>>> Rowan Bunning wrote:
>>>>
>>>> I'm having a pretty basic problem setting the VisualWorks home
>>>> directory in a clean visual.im running in X11 using the preview VM
>>>> on a new Intel Mac. This has never been a problem for me before
>>>> using X11 and native VMs on previous PowerPC-based machines.
>>>>
>>>> Upon selecting Apply in the Settings dialog having set the home
>>>> directory to /Developer/vw7.4.1 where VW is installed I get the error:
>>>> "Unable to set the VISUALWORKS environment variable.
>>>> If you are running on Windows 95, 98, NT or 2000 you may not have
>>>> the proper permissions to write to the system registry. Please
>>>> contact your system administrator."
>>>>
>>>> I have been able to set the $VISUALWORKS variable successfully by
>>>> adding "export VISUALWORKS=/Developer/vw7.4.1" to a copy of the
>>>> .xinitrc file in my home dir but it seems that VW does not use this.
>>>>
>>>> Has anyone had this problem on Mac/*NIX? Should I be checking
>>>> permissions on a particular file somewhere?
>>>>
>>>> Thanks,
>>>> Rowan.
>>>>
>>>> www.softwarewithstyle.com
>>>>
>>>>
>>>
>>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Re: Problem setting VW home directory using X11 on Intel Mac

Damien Pollet
Oops, sorry for the spam Mike... why no default reply-to on this list ?

On 7/25/06, Mike Hales <[hidden email]> wrote:
> Here is the script:
>
> #!/bin/bash
>
> export VISUALWORKS='/Users/mike/vw7.4.1nc'
> cd /Users/mike/vw7.4.1nc/bin/preview/macx86x11
> open -a visual.app ~/vw7.4.1nc/image/visualnc.im

That's strange, do you really need that cd line ? I'd prefer to be
able to run an image from the working directory I like...

in vw7.4.1nc/VisualNC.command there is a (broken here due to spurious
# chars) csh script that cd's in vw7.4.1nc/image and that sets a
SOURCE_PATH env var... is this necessary too ?

--
 Damien Pollet
 type less, do more

Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Problem setting VW home directory using X11 on Intel Mac

Damien Pollet
OK I got a solution of mine:

1) edit and cleanup the plist file, mine had a "" = "" entry
you can do that using
    plutil -convert xml1 ~/Library/Preferences/com.cincom.vw7.4.1.plist
to convert it from binary to xml, then editing it. Optionally, piping
the file through pl will convert it to the old-style plist format.

I first added a VISUALWORKS key with the correct value but this has no
effect. However, cleaning the empty key/value pair made the
environment variable work, so now wy script works (I don't use the
drag-n-drop method):

#!/bin/bash

# root of the VisualWorks installation, exported for the VM
VWPREFIX="/Developer/Applications/VisualWorks"
export VISUALWORKS="$VWPREFIX/vw7.4.1nc"

# what VM executable should we use
VWVM="$VISUALWORKS/bin/preview/macx86x11/visual.app/Contents/MacOS/vwmacx86x11"

# here we go...
# DISPLAY should be set
$VWVM $*

--
 Damien Pollet
 type less, do more

Reply | Threaded
Open this post in threaded view
|

Re: Problem setting VW home directory using X11 on Intel Mac

Dave Stevenson-2
In reply to this post by Damien Pollet
$SOURCE_PATH is not used by VisualWorks in general.  It is used by the
installer, for example when restarted to add another component or two to
the installation, to see the location from which the last install was
made.

Dave

Damien Pollet wrote:

> Oops, sorry for the spam Mike... why no default reply-to on this list ?
>
> On 7/25/06, Mike Hales <[hidden email]> wrote:
>> Here is the script:
>>
>> #!/bin/bash
>>
>> export VISUALWORKS='/Users/mike/vw7.4.1nc'
>> cd /Users/mike/vw7.4.1nc/bin/preview/macx86x11
>> open -a visual.app ~/vw7.4.1nc/image/visualnc.im
>
> That's strange, do you really need that cd line ? I'd prefer to be
> able to run an image from the working directory I like...
>
> in vw7.4.1nc/VisualNC.command there is a (broken here due to spurious
> # chars) csh script that cd's in vw7.4.1nc/image and that sets a
> SOURCE_PATH env var... is this necessary too ?
>

Reply | Threaded
Open this post in threaded view
|

Re: Problem setting VW home directory using X11 on Intel Mac

Roel Wuyts
In reply to this post by Bob Westergaard-2
Setting the path from within VW for the X11 vm on OS-X not working is  
a known issue.

But before it was possible to set the path in the environment  
variable, and it would be used... This seems to be broken somehow.

On 25 Jul 2006, at 18:30, Robert Westergaard wrote:

>
> This is a known issue.  As far as I can remember about the details  
> of the
> problem it has to do with how the VM was built for intel MacOSX on  
> X11.
> Some big-endian definitions were included in the VM when they  
> should not
> have instead been little-endian.  Setting enviornment variables  
> from the
> image won't work.
>
> I'm not sure if there is a workaround, nor am I sure when new  
> engines will
> be re-built.  I suspect the only way to truly fix the problem is to
> rebuild the engine for that platform. As soon as new engine is  
> available
> folks will hear about it in the usual channels.
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Problem setting VW home directory using X11 on Intel Mac

Bob Westergaard-2


On Thu, 27 Jul 2006, Roel Wuyts wrote:

> Setting the path from within VW for the X11 vm on OS-X not working is
> a known issue.
>
> But before it was possible to set the path in the environment
> variable, and it would be used... This seems to be broken somehow.

I probably should have been more clear, so I'll try again.

The VM (in preview for 7.4.1) was not built correctly for the intel MacOSX
platform.  There was a mistake with the platform configuration definition
code that resulted in the VM including some big-endian code when it should
have been little-endian.  As a result of this, setting and reading
environment variables does not work.  I would not be surprised if there
were more problems because of this mistake.

Unfortunately, we have a few folks on vacation right now who are more
familiar with the issue so I can't give you any more concrete details.

I'm sure we'll get around to releasing a newer set of engines at some
time in the near future.

Reply | Threaded
Open this post in threaded view
|

Re: Problem setting VW home directory using X11 on Intel Mac

Roel Wuyts
Aha, I see, thanks for the explanation.

The solution with the scripts works fine at the moment though (got it  
running here as well).

--
Roel

On 27 Jul 2006, at 18:38, Robert Westergaard wrote:

>
>
> On Thu, 27 Jul 2006, Roel Wuyts wrote:
>
>> Setting the path from within VW for the X11 vm on OS-X not working is
>> a known issue.
>>
>> But before it was possible to set the path in the environment
>> variable, and it would be used... This seems to be broken somehow.
>
> I probably should have been more clear, so I'll try again.
>
> The VM (in preview for 7.4.1) was not built correctly for the intel  
> MacOSX
> platform.  There was a mistake with the platform configuration  
> definition
> code that resulted in the VM including some big-endian code when it  
> should
> have been little-endian.  As a result of this, setting and reading
> environment variables does not work.  I would not be surprised if  
> there
> were more problems because of this mistake.
>
> Unfortunately, we have a few folks on vacation right now who are more
> familiar with the issue so I can't give you any more concrete details.
>
> I'm sure we'll get around to releasing a newer set of engines at some
> time in the near future.
>

Reply | Threaded
Open this post in threaded view
|

Re: Problem setting VW home directory using X11 on Intel Mac

Roel Wuyts
In reply to this post by Damien Pollet
And here is my 2 more cents: I added a statement to open X11, and  
then used the excellent DropScript ( http://www.wsanchez.net/ 
software/ ) application to turn my script into an executable so that  
I can drop images on it to be launched.

----
#! /bin/bash
#  vw --- launch vw under X11

# open X11
open /Applications/Utilities/X11.app/

# root of the VisualWorks installation, exported for the VM
VWPREFIX="/Applications/Applications/Programming"
export VISUALWORKS="$VWPREFIX/vw7.4.1nc"

# what VM executable should we use
VWVM="$VISUALWORKS/bin/preview/macx86x11/visual.app/Contents/MacOS/
vwmacx86x11"

# here we go...
# DISPLAY should be set
$VWVM $*
----

On 26 Jul 2006, at 00:00, Damien Pollet wrote:

> OK I got a solution of mine:
>
> 1) edit and cleanup the plist file, mine had a "" = "" entry
> you can do that using
>    plutil -convert xml1 ~/Library/Preferences/com.cincom.vw7.4.1.plist
> to convert it from binary to xml, then editing it. Optionally, piping
> the file through pl will convert it to the old-style plist format.
>
> I first added a VISUALWORKS key with the correct value but this has no
> effect. However, cleaning the empty key/value pair made the
> environment variable work, so now wy script works (I don't use the
> drag-n-drop method):
>
> #!/bin/bash
>
> # root of the VisualWorks installation, exported for the VM
> VWPREFIX="/Developer/Applications/VisualWorks"
> export VISUALWORKS="$VWPREFIX/vw7.4.1nc"
>
> # what VM executable should we use
> VWVM="$VISUALWORKS/bin/preview/macx86x11/visual.app/Contents/MacOS/
> vwmacx86x11"
>
> # here we go...
> # DISPLAY should be set
> $VWVM $*
>
> --
> Damien Pollet
> type less, do more
>

Reply | Threaded
Open this post in threaded view
|

Re: Problem setting VW home directory using X11 on Intel Mac

Bob Westergaard-2
In reply to this post by Bob Westergaard-2


On Thu, 27 Jul 2006, Robert Westergaard wrote:

>
> I'm sure we'll get around to releasing a newer set of engines at some
> time in the near future.

I believe new engines that fix this problem, along with the VM using all
the CPU on socket connections (VW running hot) and another bug I can't
recall right now, will be available sometime over the next two weeks.

Please don't take that as a promise that they will be here in two weeks,
simply take it as a notice that internally we're moving forward with
releasing new engines soon.