Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Various emerge problems solved with CPATH=""
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
codohundo
n00b
n00b


Joined: 29 Mar 2005
Posts: 10

PostPosted: Sat Feb 04, 2006 7:43 pm    Post subject: Various emerge problems solved with CPATH="" Reply with quote

I was experiencing problems emerging just about everything, the errors are all different, I recall that one was could not find fork, one was _PATH_WTMP not set, and so on, it turns out that most if not all of these problems where solved by clearing the CPATH ie

Code:

CPATH="" emerge -u world


I was hoping this post could serve more than one purpose, first I have posted a solution to a class of problems that I couldn't find much help for on the forums (one post did lead me down this path but it didn't indicate that this might be the root of all my problems.) Second, I was hoping people could post specific problems to which this was the solution, so searchinig on any one of the problems might lead you to this as a potential solution. Finally, I was wondering if some of the more advanced users could explain why adding to the CPATH could bugger up things. I could understand if clobbering the cpath messed things up, but simply adding to it? I realize this changes the search order, but I don't see that causing the number and variety of problems that I was experiencing. Finally could someone suggest a proper course of action to fix this in the future, if CPATH needs to be clear, or at least not contain what I had in it /usr/local/include I think, then should I wrap the executables that need it in a script, this isn't very clean, any thoughts?

codohundo
Back to top
View user's profile Send private message
akiross
Veteran
Veteran


Joined: 02 Mar 2003
Posts: 1170
Location: Mostly on google.

PostPosted: Sat Jun 02, 2007 11:24 am    Post subject: Reply with quote

Yeah, i know this is an old post, but it was helpful to me. So i just don't discard this userful thread :)
(oh well, if you want to put this in "tips" "tricks" or whatever)

Quote:
CPATH specifies a list of directories to be searched as if specified with -I, but after any paths given with -I
options on the command line. This environment variable is used regardless of which language is being preprocessed.


As you see, cpath is used to specify the include directories where gcc search. It may happen that some packages don't specify their include directories and just leave the paths "as-is" (e.g. as system default paths). So, specifiying a non-empty cpath may cause wrong look-up of header files, causing undeclared like error messages.
_________________
Libera scienza in libero stato.
Horizon of Events
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Wed Oct 31, 2007 6:03 am    Post subject: Reply with quote

Moved from Portage & Programming to Documentation, Tips & Tricks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks 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