LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 05-31-2008, 11:13 PM   #1
wrapster
Member
 
Registered: May 2008
Posts: 155

Rep: Reputation: 30
How to add new paths to $PATH


Hi all,
I downloaded a tarball of coreutils ....
extracted only to find out that i had to build it...
But when i executed ./configure, this is what i got
Code:
checking build system type... i386-pc-solaris2.11
checking host system type... i386-pc-solaris2.11
configure: autobuild project... GNU coreutils
configure: autobuild revision... 6.4
configure: autobuild hostname... Harivayu
configure: autobuild timestamp... 20080531-213259
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
Upon reading the final few lines i found out that C compiler was not being detected...
this is not possible as gcc and c are both in /usr/sfw/bin/
But when i echoed $PATH...
this destination was not set...
So i wanted to know how to edit $PATH so that i can specify pathsfor gcc and c and make it stay in $PATH over reboots....
I also searched for .bashrc but this not present in solaris (b83)so do i have to write my own .bashrc file,if so how do i do it?

thanks

Last edited by wrapster; 05-31-2008 at 11:15 PM.
 
Old 05-31-2008, 11:43 PM   #2
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 683

Rep: Reputation: 63
You can either create a .bashrc or add it to your .profile.

Just add the line
PATH=$PATH:/usr/sfw/bin
 
Old 05-31-2008, 11:59 PM   #3
eggixyz
Member
 
Registered: Apr 2008
Posts: 310

Rep: Reputation: 30
Hey There,

In your case, also, I'd recommend using a c flag on the command line, so you get gcc when you want it and cc when you want it (since they're both in the same directory)

Quote:
./configure CC=gcc
for example.

Best wishes,

Mike
 
Old 06-01-2008, 12:54 AM   #4
wrapster
Member
 
Registered: May 2008
Posts: 155

Original Poster
Rep: Reputation: 30
Hi ,
It does work...
i shall use the cc=gcc method only ,for convenience...
Thanks a lot
 
Old 06-01-2008, 02:28 AM   #5
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
Note that there is no need to download ang compile coreutils given the fact they are already bundled with Solaris Express.

And by the way instead of using a shell specific file you can edit /etc/default/login and modify the PATH variable to set the PATH globally.

Last edited by jlliagre; 06-01-2008 at 04:34 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
How to add paths to sbin, bin/bash, bin sh for users gopi.d Fedora 3 12-07-2007 12:47 AM
Do you add to the path line or make a new path in /etc/profile? M$ISBS Linux - Newbie 2 12-13-2006 02:14 PM
Add path to @INC deus1 Linux - Software 0 07-27-2005 07:52 AM
how do you alter/ add to paths set on startup? PaleViper Linux - Newbie 4 10-08-2004 01:55 PM
Automatically resolving WINDOWS paths to pre-configured Linux paths gazzy Linux - General 1 09-05-2003 10:15 PM

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

All times are GMT -5. The time now is 03:54 PM.

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