Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed GCC to a custom prefix. When it is invoked, it complains that it cannot find some of its internal binaries.

My computer's "official" GCC keeps them here:


This directory is not present in PATH.

make install created a similar hierarchy under my prefix, and the appropriate files were installed there. I could add it to PATH, but this was apparently not necessary for the official GCC to run. I would like to avoid cluttering PATH if I can.

I looked for an option to specify this directory in the configure script, but found none. There is also no mention of libexec in the GCC manual.

How does the official GCC know where its internal binaries live, and how can I give this information to my trunk build of GCC?

share|improve this question
up vote 5 down vote accepted

You can ask gcc where it will look for those binaries: (this works on FC16's gcc-4.6.3 and CentOS 5.3 gcc-4.1.3, so it should work with your 4.2)

gcc -print-search-dirs

You can set your search path via GCC_EXEC_PREFIX environment variable.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.