Sun Studio 12 iropt problem

Hi, I am using Sun Studio 12 C++ compiler on my 64-bit Gentoo with AMD Turion64. So far everything seems to work fine except of IPO. Any attempt to compile even a simple code with -xipo > 0 causes this error:

compiler(iropt) error:Unexpected File IO error when reading IR.

/opt/sunstudio12/prod/bin/ipo: Error inside /usr/local/sunstudio12/prod/bin/iropt

It happens during the linking phase. strace shows that iropt dies just like this. I guess this is problem of incompatibility between linker in RH and Gentoo (the same options work fine on RH 32-bit and 64-bit). Any ideas how to deal with this problem (except of not using IPO)?

Thanks!

[675 byte] By [rzolaua] at [2007-11-27 6:30:31]
# 1

To be able to fix this bug we need to be able to reproduce it.

Can you please send us the source code that causes the problem and

the exact commands to reproduce.

You can either do it through bugs.sun.com (preferred)

or you can send the .tar.gz and the instructions to the

<nick of this post>@sun.com address (less preferred)

horsha at 2007-7-12 17:55:03 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

I had similar problems with express-2/3.

The 'ipo' executable had /usr/bin/b[un]zip2 hardcoded,

while on Gentoo they are in /bin directory.

To my knowledge, the problem still persists

in Studio-12.

The workaround was/is simple :

ln -s /bin/bzip2 /usr/bin/bzip2

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

Alternatively, you may want to binary edit

file: [install_dir]/sunstudio12/prod/bin/ipo

and correct the hardcoded strings at

offsets : 68097 and 68186

See also :

http://forum.java.sun.com/thread.jspa?threadID=5117308&tstart=60

--

jb

juborka at 2007-7-12 17:55:03 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3
Unfortunately this is not a bzip2 problem (I checked before posting here). The problem seems to be related to ld I think. ipo calls iropt and this one crashes (because is not able to load some dynamic module?).
rzolaua at 2007-7-12 17:55:03 > top of Java-index,Development Tools,Solaris and Linux Development Tools...