compiler not work ...

Hi All,

i m using Solaris 10 (Sparc). I have installed the SunStudio 11,

After that i have try to compile and run simple helloworld program.

bash-3.00$ /opt/SUNWspro/bin/cc -g test.c

"test.c", line 5: internal compiler error: DBGGEN ERROR: FILE="../src/dbg_libdwarf.c", LINE=46, Could not load dwarf library: libdwarf.so : ld.so.1: acomp: fatal: libdwarf.so: open failed: No such file or directory [DBG_GEN 5.0.8]

cc: acomp failed for test.c

I have installed/download the studio yesterday only, May I need to apply Any Patch etc (as i found to know from this forum) ?

Also I have check there is no libdwarf.so file in my /opt/ (and in any of Subdir)

TIA

--raxit sheth

[729 byte] By [Raxit] at [2007-11-26 10:17:23]
# 1
Is there any Extra PATH/ other Env Variable need to be Exported etc ?--raxit
Raxit at 2007-7-7 2:12:06 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

Upon a successful installation libdwarf.so should reside in

/opt/SUNWspro/prod/lib/libdwarf.so

(which should be a link to libdwarf.so.1)

There is no need to set PATH/LD_LIBRARY_PATH to this dir, as compiler components automatically pick it out of there.

Looks like your install is crippled somehow.

regards,

__Fedor.

SFV at 2007-7-7 2:12:06 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3
Is it ok to use make,(instead of Studio's dmake) ?I think it should be,--Raxit
Raxit at 2007-7-7 2:12:06 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4
Fedor/otherWhat should i do ?as i already written the libdwarf.so is not generated during installation.Is Uninstall and Re-install would work okey or should i do anything else to resolve this ? Thanks for help--raxit sheth
Raxit at 2007-7-7 2:12:06 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 5

Fedor,

installtion log Studio 11_pkg_Installation.log gives the following information

I have installed following only, ( actually i dont want IDE etc, i want only compiler and linker as i am doing SSH from remote loc.)

pkginfo -l SPROlang

pkginfo -l SPROcc

pkginfo -l SPROmrcc

pkginfo -l SPROmrcom

ABOVE PACKAGES INSTALLED SUCCESSFULLY , but in LAST BELOW is the ERROR MESSAGE

root@icprg04 # pkginfo -l SPROCMISC

ERROR: information for "SPROCMISC" was not found

Thanks

--raxit sheth

Raxit at 2007-7-7 2:12:06 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 6

libdwarf is part of the compiler.

You need to install a few more packages, including the one that has

"libdwarf" in it. The easiest thing to do is to use the installer

to install all of the packages, and leave everything installed. The

next best thing is to install everything, and then try removing files and directories

that you think you don't need. (Like performance libraries, etc)

Are you concerned about disk space? Why not use the installer to

install the complete product?

--chris

ChrisQuenelle at 2007-7-7 2:12:07 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 7
Thanks Chris , it works now.i done the same,--raxit
Raxit at 2007-7-7 2:12:07 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 8
I forgot that the installer also has options in the GUI so you can choosewhich parts of the product you want to install.
ChrisQuenelle at 2007-7-7 2:12:07 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 9

Chris,

I done the same,

Now the problem i am facing is i am new to SunStudio.

I am only having telnet access (no GUI). and i am doing dev. in c/c++.

What i want is something equiv. of Valgrind/Purify to detect memory leak, also i want something like gprof tool (which can tell which func. of my code taken howmuch time/space etc) in Studio 11. (plz note i am not having GUI, X or like that, i am doing ssh/telnet)

any help/link/docs welcome,...

--raxit sheth

Raxit at 2007-7-7 2:12:07 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 10

> i want is something equiv. of Valgrind/Purify to detect memory leak

You can use dbx, the Sun Studio debugger, run-time checking (RTC) feature. There are three options available: check -leaks (detect and report memory leaks), check -memuse (record memory usage) and check -access (currently works on sparc only; detects invalid memory access, like reading from uninitialized variable, etc).

In order to use RTC, you need to turn it on *prior* to starting your app, like this:

(dbx) check -leaks

(dbx) run myapp arg1 arg2 arg3

More information on leaks detection can be found on docs.sun.com (dbx manual) or right from dbx command prompt ('help check' command).

MaximKartashev at 2007-7-7 2:12:07 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 11

You can also use the performance analyzer features from the

command line. The command line interface to dump out performance

data is called "er_print". You can read about it in the performance analyzer

manual.

The documentation is listed here:

http://developers.sun.com/prodtech/cc/documentation/ss11/index.html

ChrisQuenelle at 2007-7-7 2:12:07 > top of Java-index,Development Tools,Solaris and Linux Development Tools...