niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » Solaris
How to use Sun C Compiler in place of gcc?
Post new topic   Reply to topic Page 1 of 1 [7 Posts] View previous topic :: View next topic
Author Message
Richard B. Gilbert
*nix forums Guru


Joined: 21 Feb 2005
Posts: 456

PostPosted: Thu Jul 20, 2006 9:43 pm    Post subject: How to use Sun C Compiler in place of gcc? Reply with 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?
Back to top
Tony Curtis
*nix forums addict


Joined: 21 Feb 2005
Posts: 99

PostPosted: Thu Jul 20, 2006 9:47 pm    Post subject: Re: How to use Sun C Compiler in place of gcc? Reply with quote

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

PostPosted: Thu Jul 20, 2006 10:28 pm    Post subject: Re: How to use Sun C Compiler in place of gcc? Reply with quote

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

PostPosted: Fri Jul 21, 2006 12:31 am    Post subject: Re: How to use Sun C Compiler in place of gcc? Reply with quote

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

PostPosted: Fri Jul 21, 2006 12:35 am    Post subject: Re: How to use Sun C Compiler in place of gcc? Reply with quote

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

PostPosted: Fri Jul 21, 2006 12:36 am    Post subject: Re: How to use Sun C Compiler in place of gcc? Reply with quote

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

PostPosted: Fri Jul 21, 2006 12:13 pm    Post subject: Re: How to use Sun C Compiler in place of gcc? Reply with quote

"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
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [7 Posts] View previous topic :: View next topic
The time now is Sat Nov 22, 2008 8:14 pm | All times are GMT
navigation Forum index » *nix » Solaris
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Anyone interested in a 4gl compiler ? Mike Aubury MySQL 1 Fri Jul 21, 2006 1:53 pm
No new posts again a newbie... :( compiler problems Thorsten Kaben C++ 18 Thu Jul 20, 2006 2:52 am
No new posts OpenSuse-10.1 supports G77 compiler for AMD 64-bit? Mazilo Suse 3 Tue Jul 18, 2006 1:21 pm
No new posts FAQ 2.3 I don't have a C compiler. How can I build my own... PerlFAQ Server Perl 0 Mon Jul 17, 2006 1:03 am
No new posts new question about old C compiler Today's Mulan C 4 Mon Jul 17, 2006 12:28 am

Loans | Internet Advertising | Mobile Phones | Free Ebooks | Debt Consolidation
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.3929s ][ Queries: 16 (0.3044s) ][ GZIP on - Debug on ]