| Author |
Message |
Richard B. Gilbert *nix forums Guru
Joined: 21 Feb 2005
Posts: 456
|
Posted: Thu Jul 20, 2006 9:43 pm Post subject:
How to use Sun C Compiler in place of gcc?
|
|
|
The subject says almost all!
I'd like to use the Sun C compiler to build the NTP distribution from
http://www.ntp.org
When I put "export CC=/opt/SUNWspro/cc" before the
"./configure ..."
I get an error telling me that the compiler "cannot create executables"
Obviously I'm missing something, but what? |
|
| Back to top |
|
 |
Tony Curtis *nix forums addict
Joined: 21 Feb 2005
Posts: 99
|
Posted: Thu Jul 20, 2006 9:47 pm Post subject:
Re: How to use Sun C Compiler in place of gcc?
|
|
|
| Quote: | On Thu, 20 Jul 2006 17:43:03 -0400,
"Richard B. Gilbert" <rgilbert88@comcast.net> said:
The subject says almost all! I'd like to use the Sun C
compiler to build the NTP distribution from
http://www.ntp.org
When I put "export CC=/opt/SUNWspro/cc" before the
"./configure ..." I get an error telling me that the
compiler "cannot create executables"
Obviously I'm missing something, but what?
|
There's no such file as /opt/SUNWspro/cc
(it's in the bin directory)
hth
t |
|
| Back to top |
|
 |
Dave Uhring *nix forums Guru
Joined: 02 Mar 2005
Posts: 973
|
Posted: Thu Jul 20, 2006 10:28 pm Post subject:
Re: How to use Sun C Compiler in place of gcc?
|
|
|
On Thu, 20 Jul 2006 17:43:03 -0400, Richard B. Gilbert wrote:
| Quote: | The subject says almost all!
I'd like to use the Sun C compiler to build the NTP distribution from
http://www.ntp.org
When I put "export CC=/opt/SUNWspro/cc" before the
"./configure ..."
I get an error telling me that the compiler "cannot create executables"
Obviously I'm missing something, but what?
|
From ~/.bashrc:
export CC=/opt/SUNWspro/bin/cc
export CXX=/opt/SUNWspro/bin/CC
export CFLAGS='-xtarget=ultra -xarch=v8plusa -xO5 -I/usr/sfw/include'
export LDFLAGS='-L/usr/sfw/lib -R/usr/sfw/lib -L/opt/sfw/lib -R/opt/sfw/lib -L/usr/openwin/lib -R/usr/openwin/lib' |
|
| Back to top |
|
 |
Richard B. Gilbert *nix forums Guru
Joined: 21 Feb 2005
Posts: 456
|
Posted: Fri Jul 21, 2006 12:31 am Post subject:
Re: How to use Sun C Compiler in place of gcc?
|
|
|
Tony Curtis wrote:
| Quote: | On Thu, 20 Jul 2006 17:43:03 -0400,
"Richard B. Gilbert" <rgilbert88@comcast.net> said:
The subject says almost all! I'd like to use the Sun C
compiler to build the NTP distribution from
http://www.ntp.org
When I put "export CC=/opt/SUNWspro/cc" before the
"./configure ..." I get an error telling me that the
compiler "cannot create executables"
Obviously I'm missing something, but what?
There's no such file as /opt/SUNWspro/cc
(it's in the bin directory)
hth
t
|
There is NO cc in /bin!!
There is a cc in /opt/SUNWspro.
There is also a cc in /usr/ucb/bin which, when executed, says
"/usr/ucb/cc: language optional software package not installed" |
|
| Back to top |
|
 |
Tony Curtis *nix forums addict
Joined: 21 Feb 2005
Posts: 99
|
Posted: Fri Jul 21, 2006 12:35 am Post subject:
Re: How to use Sun C Compiler in place of gcc?
|
|
|
| Quote: | On Thu, 20 Jul 2006 20:31:07 -0400,
"Richard B. Gilbert" <rgilbert88@comcast.net> said:
Tony Curtis wrote:
On Thu, 20 Jul 2006 17:43:03 -0400, "Richard
B. Gilbert" <rgilbert88@comcast.net> said:
The subject says almost all! I'd like to use the Sun
C compiler to build the NTP distribution from
http://www.ntp.org
When I put "export CC=/opt/SUNWspro/cc" before the
"./configure ..." I get an error telling me that the
compiler "cannot create executables"
Obviously I'm missing something, but what?
There's no such file as /opt/SUNWspro/cc (it's in the
bin directory) hth t
There is NO cc in /bin!!
|
That's right, but I never claimed there was.
| Quote: | There is a cc in /opt/SUNWspro.
|
There's a cc *under* /opt/SUNWspro.
| Quote: | There is also a cc in /usr/ucb/bin which, when executed,
says "/usr/ucb/cc: language optional software package
not installed"
|
Stay away from that one...
hth
t |
|
| Back to top |
|
 |
Richard B. Gilbert *nix forums Guru
Joined: 21 Feb 2005
Posts: 456
|
Posted: Fri Jul 21, 2006 12:36 am Post subject:
Re: How to use Sun C Compiler in place of gcc?
|
|
|
Dave Uhring wrote:
| Quote: | On Thu, 20 Jul 2006 17:43:03 -0400, Richard B. Gilbert wrote:
The subject says almost all!
I'd like to use the Sun C compiler to build the NTP distribution from
http://www.ntp.org
When I put "export CC=/opt/SUNWspro/cc" before the
"./configure ..."
I get an error telling me that the compiler "cannot create executables"
Obviously I'm missing something, but what?
From ~/.bashrc:
export CC=/opt/SUNWspro/bin/cc
export CXX=/opt/SUNWspro/bin/CC
export CFLAGS='-xtarget=ultra -xarch=v8plusa -xO5 -I/usr/sfw/include'
export LDFLAGS='-L/usr/sfw/lib -R/usr/sfw/lib -L/opt/sfw/lib -R/opt/sfw/lib -L/usr/openwin/lib -R/usr/openwin/lib'
|
Thanks! That got it. I left out the "/bin" in "/opt/SUNWspro/bin/cc".
I also didn't have the CFLAGS settings. |
|
| Back to top |
|
 |
Casper H.S. Dik *nix forums Guru
Joined: 20 Feb 2005
Posts: 1634
|
Posted: Fri Jul 21, 2006 12:13 pm Post subject:
Re: How to use Sun C Compiler in place of gcc?
|
|
|
"Richard B. Gilbert" <rgilbert88@comcast.net> writes:
| Quote: | The subject says almost all!
I'd like to use the Sun C compiler to build the NTP distribution from
http://www.ntp.org
When I put "export CC=/opt/SUNWspro/cc" before the
"./configure ..."
I get an error telling me that the compiler "cannot create executables"
|
It's certainly not /opt/SUNWspro/cc; perhaps /opt/SUNWspro/bin/cc?
You may also want to include /opt/SUNWspro/bin in $PATH.
Casper |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|