Express-2 issues

Hi,

After installing Express 2 on my Gentoo distros (amd64 and x86),

I noticed the following problems :

1. prod/bin/ipo (possibly other executables too) have /usr/bin/bzip2

hardcoded. On Gentoo however bzip2 is usually in /bin/bzip2,

so the best bet would be to put in executables only 'bzip2'

without any paths.

The workaround is trivial : ln -s /bin/bzip2 /usr/bin/bzip2

2. sunstudio (possibly other) scripts call 'uname -p', which on Gentoo

returns for instance : AMD Athlon(tm) 64 X2 Dual Core Processor 5200+

This value is subsequently used in the script, but variables

are unquoted, which leads to :

/app/sun/studioexpress11/sunstudiomars/bin/sunstudio: line 293: [: too many arguments

/app/sun/studioexpress11/sunstudiomars/prod/scripts/jdk_chooser: line 187: $USERDIR/cache/jdkhome.ver: ambiguous redirect

The workaround would be to : either call 'uname -m' instead or

put relevant variables in doublequotes.

3. The -xipo option seems to have problem with binutils (?). for a

trivial program, like :

/******************************/

#include <stdio.h>

#include <stdlib.h>

int k;

intmain(int argc, char **argv)

{

k = atoi(argv[1]);

printf("argv1 = %d\n", k);

return(0);

}

/*********************************/

compiled with "-xipo", attempt to link it results in :

# suncc -fast -xipo f.c

/app/sun/studioexpress11/sunstudiomars/prod/lib/crt1x.o: In function `_start':

fsr.s:(.text+0x23): undefined reference to `main'

The reason is most likely, strange symbol prefix for main :

# nm f.o

00000000 b Bbss.bss

00000000 d Ddata.data

00000000 r Drodata.rodata

00000004 C k

00000000 R .XBeuUZQTv9hF0YA.main..L16

My setup : binutils-2.17 compiled with gcc-4.1.1 / libc-2.5

[1938 byte] By [juborka] at [2007-11-26 13:01:48]
# 1

The problem with the sunstudio script calling "uname -p" seems to have been

fixed in the new sunstudio script. Try Express 3, which is available now.

I can't speak for -xipo, but it's a compiler feature, and the compilers on new

on Linux in this release. Try the new express release, I would expect the compilers

on Linux to have gotten much better.

--chris

ChrisQuenellea at 2007-7-7 17:03:51 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
>The reason is most likely, strange symbol prefix for main :>00000000 R .XBeuUZQTv9hF0YA.main..L16Please, try Express 3 and -xipo should work there.Btw, this symbol is not main. That is a local static string in function main.regards,__Fedor.
SFVa at 2007-7-7 17:03:51 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3

Express 3 gives me :

/app/sun/express-3/sunstudiomars/bin/sunstudio: line 362: [: too many arguments

Looking into the files in prod/bin, at least sunstudio and checkjava

may require changes like so (line to be inserted immediately after

initial assignment of DEFAULT_USERDIR variable):

DEFAULT_USERDIR=${DEFAULT_USERDIR//[\(\) ]/_}

juborka at 2007-7-7 17:03:51 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4

> >The reason is most likely, strange symbol prefix for

> main :

> >00000000 R .XBeuUZQTv9hF0YA.main..L16

>

> Please, try Express 3 and -xipo should work there.

> Btw, this symbol is not main. That is a local static

> string in function main.

>

> regards,

> __Fedor.

Yes. The symbol above is definitely a string constant

(as you correctly pointed out). I investigated the issue

in more detail, and ... it appears that the -xipo option to

work correctly needs /usr/bin/bunzip2 (and not

/bin/bunzip2 as is by default on Gentoo distro).

Once I did :

ln -s /bin/bunzip2 /usr/bin/bunzip2

-xipo=2 option finally works (checked on Express 3)

I'd suggest adding somewhere in the READMEs that :

/usr/bin/bunzip2 _and_ /usr/bin/bzip2 are required

for the proper operation of the compiler (and not all

distros have bzip2 stuff in /usr/bin)

Furthermore, a simple test for the files presence

in the compiler would be useful

(or better yet try /usr/bin first, and if that fails try /bin). As it

is now, if /usr/bin/bunzip2 does not exist (execve fails),

compiler driver ignores the error.

--jb

juborka at 2007-7-7 17:03:51 > top of Java-index,Development Tools,Solaris and Linux Development Tools...