LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-10-2005, 05:58 AM   #1
Zepiroth
Member
 
Registered: May 2003
Location: Surabaya, Jawa Timur, Indonesia
Distribution: Debian x64 and Ubuntu LTS Servers
Posts: 56

Rep: Reputation: 15
Redirecting Bin, Include and Lib on newly compiled GCC (Solaris 10).


Dear Solaris Experts,

Currently I am using Solaris 10 with GCC 3.4.3.
As I have compiled GCC 4.0.2 from source,
it had been installed into /usr/local/ :

all binaries installed into /usr/local/bin
all include files installed into /usr/local/include/isc
all library files installed into /usr/local/lib/gcc/i386-pc-solaris2.10/4.0.2 and
/usr/local/lib

For compiling programs from the source, how
can I redirect the binary, include and library files
to use the newer GCC (4.0.2) ?

Is there more parameters to pass for the "./configure" command
on any compiled programs ( like postfix, apache httpd, etc ) to use
the new GCC (4.0.2) ?

I also read on some discussion, that Sun discourages placing newly compiled binaries into /usr/local. Sun strongly recommends : /opt/bin.
Will it affect the O/S stability if I still put into /usr/local ?

Any suggestion would be appreciated.
Thank you in advance.
 
Old 11-10-2005, 07:48 AM   #2
mcd2
LQ Newbie
 
Registered: May 2004
Posts: 5

Rep: Reputation: 0
Two environment parameters will need to be properly configured, PATH and LD_LIBRARY_PATH. You can set them in either your account's .profile or in /etc/profile. Probably just edit your personal .profile file.

You will need to carefully examine your default values and amend them to find the 4.02 gcc and the libraries.

Type in
#echo $PATH

If you do not see /usr/local/bin displayed, then need to add this to the search path

#PATH=${PATH}:/usr/local/bin
#export PATH

Then type in
#echo $LD_LIBRARY_PATH

If you do not see /usr/local/lib listed, need to add path to this area

#LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
#export LD_LIBRARY_PATH

Now for building packages using configure/(g)make, the utilities may latch onto /usr/bin/cc or some other compiler. Even if you adjust the PATH to search /usr/local/bin before any other directories, some configure tools look first for a cc compiler and afterwards for a gcc compiler. Many releases allow you to specify a compiler and a library path to use. You may though have to edit the Makefiles directly.

Placing gcc in /usr/local is okay - the Sunfreeware binary builds (including the gcc builds) typically are installed in /usr/local tree. You may want to examine the repository at www.sunfreeware.com. Handles sparc and x86 release binary builds of the more common packages like Apache.

One of the reasons various Unix vendors now push for installing 3rd party apps into /opt is /usr/local is usually homed under /usr filesystem and there gets to be a space issue with continual software additions. The /opt directory is usually created as a separate filesystem so if it fills up completely, hopefully not as traumatic as filling up /usr filesystem.
 
Old 11-10-2005, 04:43 PM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,785

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
One of the reasons various Unix vendors now push for installing 3rd party apps into /opt is /usr/local is usually homed under /usr filesystem and there gets to be a space issue with continual software additions.
Unix standard (SVR4) doesn't push but requires that no "local" files are installed in /usr, /opt/local is one of the location suggested for them. /usr allows only files belonging to the O/S to be there, and locally built files are not.
"man filesystem" for details.

This rule is unfortunately often broken, even by the sunfreeware site

Quote:
Will it affect the O/S stability if I still put into /usr/local ?
It won't affect the O/S, as the O/S ignores /usr/local, however, it will affect you when you'll try fancy features like sparse file-system Solaris 10 zones, as you just won't be able to write anyting in /usr/local, even as root ...
 
Old 11-20-2005, 08:17 PM   #4
Zepiroth
Member
 
Registered: May 2003
Location: Surabaya, Jawa Timur, Indonesia
Distribution: Debian x64 and Ubuntu LTS Servers
Posts: 56

Original Poster
Rep: Reputation: 15
Dear mcd2 & Jlliagre,

Thank you for the explanations.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Troubleshooting Newly Compiled Kernel binarybob0001 Linux - General 2 11-20-2005 05:06 AM
Newly Compiled Linux does not seem to Boot binarybob0001 Linux - Newbie 2 12-02-2004 08:05 PM
Newly compiled kernel behaves as if it was the old one? grayFalcon Linux - Software 4 06-03-2004 05:52 AM
Newly compiled 2.6/ Key repeating? merlinn31 Slackware 3 03-19-2004 05:15 PM
Problem with newly compiled 2.4.22 kernel Xero720 Slackware 2 09-06-2003 01:23 PM

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

All times are GMT -5. The time now is 02:32 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