Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
exclude /usr/local/* from root's environment
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
rsa4046
l33t
l33t


Joined: 07 Feb 2005
Posts: 655
Location: The Big H, a bit SSW

PostPosted: Tue Jan 31, 2012 2:04 pm    Post subject: exclude /usr/local/* from root's environment Reply with quote

I compiled a newer copy of gcc (4.7 svn) that I need only as user (optimization of local source code), and did ./configure && make as user, and then make install as root. This installs gcc executables, libraries, and headers in /usr/local/bin, /usr/local/libexec, /usr/local/lib32, /usr/local/lib64, /usr/local/share, and /usr/local/include. To avoid any problems I'd like to exclude any of this /usr/local stuff from being used by root during emerge, etc. I know there are various ways of editing env variables, but would like to know the simplest way to accomplish this limitation. I thought I could do this just by limiting root's path, but this is not enough. For example, I now pick up errors like the following as root
Code:
 /sbin/ldconfig: /usr/local/lib/libstdc++.so.6.0.17-gdb.py is not an ELF file - it has the wrong magic bytes at the start.
Is this feasible, or should I have simply configured the source to use /home/user paths? I tried the toolchain overlay, but could not get any of the snapshots to compile properly.
Back to top
View user's profile Send private message
gerard27
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2349
Location: Netherlands

PostPosted: Tue Jan 31, 2012 4:24 pm    Post subject: Reply with quote

Try
Code:
gcc-config-l

If there's no star next to 4.7 portage won't use it AFAIK.
Gerard.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
dol-sen
Developer
Developer


Joined: 30 Jun 2002
Posts: 2803
Location: Richmond, BC, Canada

PostPosted: Tue Jan 31, 2012 4:40 pm    Post subject: Reply with quote

/usr/local is normally in all PATHs before the system. So short of auditting the whole thing, it is quicker to try a different path like /home/... where it can be in your environment, but not affect the rest of the system. Depending on what you are doing. Have a look at the gentoo-prefix installation docs. In a prefix install you can have an isolated yet different system within a system.
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum