sunstudio: line 293: [: too many arguments -- Gentoo AMD64

I've untarred the Sun Studio Express 2 download into the /opt directory -- from there everything goes where it should into /opt/sun/ ...

I've updated my environment/path to include the necessary bin directories i.e. -- /opt/sun/sunstudiomars/bin

when trying to launch sunstudio (which is nothing more than a shell script) -- I get the error in the subject line followed by:

Error: client VM not supported

Is one related to the other?

The error in the subject line occurs on the line in the shell script that contains:

if [ ! -d $USERDIR/system/Modules ]

I even tried setting a USERDIR environment variable -- and it didn't change anything.

I'm running Gentoo AMD64 with the latest kernel: 2.6.17-gentoo-r4.

Any help/ideas/suggestions would be greatly appreciated. Thanks!

[836 byte] By [Brian_Lawson] at [2007-11-26 9:37:37]
# 1

You could try running

% bash -v $(which sunstudio) > LOG 2>&1

Then look in the output to see if there are clues about

what is happening.

You could also try editing the 'sunstudio' script to add debugging

echo statements to see if some variable or command

is going wrong.

(Just some ideas)

--chris

ChrisQuenelle at 2007-7-7 0:31:26 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

> You could try running

>

> % bash -v $(which sunstudio) > LOG 2>&1

>

> Then look in the output to see if there are clues

> about

> what is happening.

>

> You could also try editing the 'sunstudio' script to

> add debugging

> echo statements to see if some variable or command

> is going wrong.

>

> (Just some ideas)

>

> --chris

Unfortunately, I'm know little to nothing about bash scripting. :| I'm not a native linux/unix user.

I can try what you've suggested -- where do I look for the output file resulting from such a command?

Thanks.

Brian_Lawson at 2007-7-7 0:31:26 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3

If you're not a unix/linux user, then understanding the output

of bash -v will be hard or impossible. (It's hard enough even

for linux/unix users)

Try editing the 'sunstudio' script and adding a line like:

echo "$USERDIR"

right before the line where the error happens.

You can also specify the "--userdir /some/other/dir" option

and see if that helps.

The user dir gets defaulted to this:

DEFAULT_USERDIR="$HOME/.sunstudio/11-$OS-$(/bin/uname -p)"

If the output of "uname -p" results in two or more words separated by spaces,

then the rest of the script will malfunction. So specifying an an alternate

userdir might fix the problem.

ChrisQuenelle at 2007-7-7 0:31:26 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4

> If you're not a unix/linux user, then understanding

> the output

> of bash -v will be hard or impossible. (It's hard

> enough even

> for linux/unix users)

>

> Try editing the 'sunstudio' script and adding a line

> like:

>

>echo "$USERDIR"

> ight before the line where the error happens.

>

> You can also specify the "--userdir /some/other/dir"

> option

> and see if that helps.

>

> The user dir gets defaulted to this:

>

> DEFAULT_USERDIR="$HOME/.sunstudio/11-$OS-$(/bin/uname

> -p)"

>

> If the output of "uname -p" results in two or more

> words separated by spaces,

> then the rest of the script will malfunction. So

> specifying an an alternate

> userdir might fix the problem.

Awesome. Thanks for the help. I'll try that as soon as I can and report back.

Brian_Lawson at 2007-7-7 0:31:26 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 5

> If the output of "uname -p" results in two or more

> words separated by spaces,

> then the rest of the script will malfunction. So

> specifying an an alternate

> userdir might fix the problem.

Well, that may be the problem then. The output of "uname -p" is:

Intel(R) Pentium(R) 4 CPU 3.80GHz

I'll see if I'm able to successfully specify an alternate userdir.

Brian_Lawson at 2007-7-7 0:31:26 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 6

Okay, so cleaning up the userdir name and eliminating all spaces from it got me past the sunstudio script error.

However, I'm still receiving the "Error: client VM not supported" error.

Any ideas on that one? I assume it has something to do with the Java VM I have installed? I have the blackdown-jdk installed as my 1.4 and the sun-jdk installed as my 1.5. However, I noticed the other day that in /etc/profile.env all of the major java env variables were set to point to the blackdown-jdk (which is 1.4). Does Sun Studio Express require Java 1.4 or 1.5?

Java on Linux right now seems to be in a state of transition. On Gentoo at least, they're keeping two VMs around -- a generation-1 and a generation-2.

Brian_Lawson at 2007-7-7 0:31:26 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 7

Try just changing your search path

export PATH

PATH=/path/to/1.5/java/bin/directory/bin:$(PATH)

I don't think we require 1.5, but I think we might require

a newer version of 1.4 than what you have. So try using

the 1.5

But I think the only variable you might need to set is PATH.

--chris

ChrisQuenelle at 2007-7-7 0:31:26 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 8

Okay, after looking around in the sunstudiomars script again -- I found the following list of available options:

Options can be:

-D prog [ core | pid] Immediately start a debug session

-E prog [ args... ] Immediately start debugging prog

-C core[:prog] Immediately start debugging core

-A pid[:prog] Immediately start debugging pid

-J<jvm-options> Pass <jvm-options> to the JVM at startup

-? Show usage information (same as --help)

-V Emit version information (same as --version)

--fontsize <size> Use <size> as the point size of the font

--locale <language[:country[:variant]]>

Use specified locale information

--nosplash Do not show splash screen at startup

--jdkhome <path> Path to Java 2 SDK installation

--userdir <path> Path of user settings directory

--open <path> Open a file in the IDE at startup

--help Show usage information (same as -?)

--version Emit version information (same as -V)

The following options pertain to changing look and feel:

--ui <ui-class> Use given UI class as the IDE's Look & Feel

--ui-classpath <path> Append <path> to the IDE's classpath

I specified the --userdir like you advised and also specified the --jdkhome path (pointing it to the Sun JDK 1.5 location) and the IDE fired right up. I haven't had a chance to mess with it much beyond that -- but that's a first big step.

Thanks for the help and the patience!

Brian_Lawson at 2007-7-7 0:31:26 > top of Java-index,Development Tools,Solaris and Linux Development Tools...