When I use HTCondor to submit a shell script which contains something like gcc code.c -o code.o
, the error file says that error trying to exec 'cc1': execvp: No such file or directory
.
However, when I just type gcc code.c -o code.o
in the shell on the execute machine, everything works fine.
Anyone knows the reason? I am working on ubuntu-16.04.2-server-amd64.
There may be environment variables defined in the HTCondor environment that set gcc off to search for cc1
(which is an internal compiler executable) in the wrong place, such as GCC_EXEC_PREFIX
and COMPILER_PATH
, or, gcc may be missing from the PATH
in HTCondor (see here regarding influential GCC env. variables).
I would suggest the following troubleshooting procedure:
which gcc
).PATH
in HTCondor - or append it to the begining of that PATH
(export PATH=/path/to/gcc:$PATH
).GCC_EXEC_PREFIX
and COMPILER_PATH
are not set in the HTCondor environment.GCC_EXEC_PREFIX
to the location of gcc in the HTCondor script.Edit:
As per your findings, adding the getenv = true
command to condor_submit
(doc) resolves the issue:
getenv = (True | False)
If getenv is set to True, then condor_submit will copy all of the user's current shell environment variables at the time of job submission into the job ClassAd. The job will therefore execute with the same set of environment variables that the user had at submit time.