LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 02-23-2011, 12:34 PM   #1
mahmoodn
Member
 
Registered: May 2010
Posts: 427

Rep: Reputation: 16
error in making a file in solaris


Hi,
During my compilation in solaris 10, I get these errors:
Code:
cc: couldn't run `sparc-sun-solaris2.10-gcc--g': No such file or directory
cc: couldn't run `sparc-sun-solaris2.10-gcc--g': No such file or directory
Any idea about them?
 
Old 02-24-2011, 06:42 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Have you installed the (Sun/Oracle Solaris) Studio compiler ?
What "cc" command are you using ?
 
Old 02-24-2011, 06:49 AM   #3
mahmoodn
Member
 
Registered: May 2010
Posts: 427

Original Poster
Rep: Reputation: 16
I don't think I have sun studio compiler. How can I check that?
I have these:
Code:
bash-3.00# cc -v
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
Configured with: /sfw10/builds/build/sfw10-patch/usr/src/cmd/gcc/gcc-3.4.3/confi
gure --prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as --with-ld=/usr
/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++ --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)

bash-3.00# gcc -v
Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/l
d --enable-shared --enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.6

bash-3.00# g++ -v
Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/l
d --enable-shared --enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.6
I also looked at the config file I use and found these:
Code:
# adjust for where you have installed your compiler (or leave commented 
# out if you've got it on your PATH)
# SPECLANG = /opt/SUNWspro/bin/

CVERBOSE   = -V
CXXVERBOSE = -verbose=version
FCVERBOSE  = -V

# Note: for the most part, the -g/g0 flags used below do not prevent
# optimization, so their usage is probably a good idea, at least at
# first.  The stlport4 library is essential: you won't get 447.dealII to
# compile without it.
C_GENFLAGS   = -g 
CXX_GENFLAGS = -g0 -library=stlport4
F_GENFLAGS   = -g 

CC  = ${SPECLANG}cc  ${CVERBOSE}   ${C_GENFLAGS}
CXX = ${SPECLANG}CC  ${CXXVERBOSE} ${CXX_GENFLAGS}
FC  = ${SPECLANG}f90 ${FCVERBOSE}  ${F_GENFLAGS}
 
Old 02-24-2011, 07:14 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
I would expect "cc: not found" or perhaps "/usr/ucb/cc: language optional software package not installed" as it seems you only have gcc installed but not cc calling gcc under the hood.
What says:
Code:
type cc
?
 
Old 02-24-2011, 07:22 AM   #5
mahmoodn
Member
 
Registered: May 2010
Posts: 427

Original Poster
Rep: Reputation: 16
You are right. Actually the cc was not found but based on http://www.unix.com/302334766-post7.html, I created a symbolic link. Here is the output of "type cc"
Code:
bash-3.00# type cc
cc is /usr/local/bin/cc
 
Old 02-24-2011, 07:36 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Then you could have read the reply to the post you linked, reply which I happen to be the author. Linking cc to gcc is likely the root cause of the confusing error messages and behavior you are getting.
 
Old 02-24-2011, 07:38 AM   #7
mahmoodn
Member
 
Registered: May 2010
Posts: 427

Original Poster
Rep: Reputation: 16
So you are saying I should install sun studio? is that all?
 
Old 02-24-2011, 08:58 AM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Not necessarily. I have no idea about what you are trying to compile and how as you didn't provide any details about it. I'm only telling the symlink you create is more than likely confusing the script/makefile/whatever you use.

If it supports gcc, you might have better removing the link and setting the CC variable to gcc.

Code:
export CC=gcc
...
If it doesn't support gcc, the easier way would be to install cc.
 
Old 02-24-2011, 09:01 AM   #9
mahmoodn
Member
 
Registered: May 2010
Posts: 427

Original Poster
Rep: Reputation: 16
I am trying to compile SPEC CPU2006. It uses a config file for building that I paste part (related to compiler) of it in post #3.
How can I install cc? there is no package named "cc".
 
Old 02-24-2011, 09:33 AM   #10
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
SPECLANG in your script is definitely expecting a path to the Studio compiler.

The latest version is downloadable from here:

http://www.oracle.com/technetwork/se...ads/index.html
 
Old 02-24-2011, 01:47 PM   #11
mahmoodn
Member
 
Registered: May 2010
Posts: 427

Original Poster
Rep: Reputation: 16
Is it possible to install sun studio without X?
 
Old 02-24-2011, 02:54 PM   #12
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
You certainly can install a Solaris package from the CLI, if this is what you are asking.
 
Old 02-25-2011, 10:09 AM   #13
mahmoodn
Member
 
Registered: May 2010
Posts: 427

Original Poster
Rep: Reputation: 16
It says:
Code:
bash-3.00# ./SolarisStudio12.2-solaris-sparc-pkg-ML.sh 
Configuring the installer...
Searching for JVM on the system...
Extracting installation data (can take a while, please wait)...
Running the installer wizard...
Java Accessibility Bridge for GNOME loaded.


No X11 DISPLAY variable was set, but this program performed an operation which requires it.
bash-3.00#
Is that installed or aborted?
 
Old 02-25-2011, 10:20 AM   #14
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Try this:
Quote:
./SolarisStudio12.2-solaris-sparc-pkg-ML.sh --non-interactive
 
Old 02-26-2011, 01:07 AM   #15
mahmoodn
Member
 
Registered: May 2010
Posts: 427

Original Poster
Rep: Reputation: 16
Thanks a lot. Installation was successful with --non-interactive
After installation cc was in /usr/bin and when I compile the benchmark it does not complain about cc


Last edited by mahmoodn; 02-26-2011 at 01:38 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem while making .trb file from C source file fabrarhussain Linux - Newbie 1 07-22-2010 02:48 AM
application compiled on solaris 10 throwing error when executed on solaris 9 ash_bit2k2 Solaris / OpenSolaris 2 06-18-2010 07:14 AM
‘struct input_dev’ has no member named ‘private’<--error message when making file the_ultimate_samurai Programming 4 05-05-2009 10:30 AM
Windows and FC3 and Solaris---and only Solaris boot error message zillah Linux - Laptop and Netbook 1 07-07-2005 10:17 PM
Making space for Solaris 8 to 9 Upgrade itsjustme Solaris / OpenSolaris 2 11-03-2003 05:14 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 11:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration