This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

COMPILER_PATH question


Hi all,

I'm experiencing a weird behavior and would appreciate some guidance.

We are using gcc v 4.4.6 (plus necessary packages to support c++
compilation) installed in a non-standard location due to company
policy. When I first logged into the test box, I can compile and link
a test c++ program without any problem. However, as soon as I source
our project specific resource file, the same code fails to compile
with the following error:

> gcc test.cc -o myout -lstdc++
gcc: error trying to exec 'cc1plus': execvp: No such file or directory

After some digging around, it appears that the issue is caused by a
different value in COMPILER_PATH as returned by running echo "" | gcc
- -xc -v -E.

Before sourcing our environment file, I got:
COMPILER_PATH=/swdepot/2012-Q2/37178099/SDK/usr/bin/../libexec/gcc/x86_64-redhat-linux/4.4.6/:/swdepot/2012-Q2/37178099/SDK/usr/bin/../libexec/gcc/:/usr/libexec/gcc/x86_64-redhat-linux/4.4.6/:/usr/libexec/gcc/x86_64-redhat-linux/

After sourcing:
COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/4.4.6/:/usr/libexec/gcc/x86_64-redhat-linux/

After sourcing out environment file, somehow gcc would no longer look
for compilers under /swdepot/.... location where gcc toolchains are
installed. But interestingly, the same is not true for for either
LIBRARY_PATH or include path, where before/after both still include
locations where gcc is installed.

Our environment file does not set anything for COMPILER_PATH, and the
only major differences I can see when comparing the before/after
environments is some difference in PATH and LD_LIBRARY_PATH.

My questions:
1. What would affect gcc's ability to deduce COMPILER_PATH?
2. If it's something in my PATH or LD_LIBRARY_PATH value, what could
be the culprit?
3. Any other environment variable I should look out for?

Thanks,
Chih


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]