Are you saying this is this the first time you’ve tried to compile it on the cluster?
It’s easy to determine if g++ is installed and in the PATH – just get a console on the cluster and type “g++”. However, AFAIK cluster nodes are not usually configured for software development, are they? Typically you build your code locally and then job it out to the cluster?
The problem was solved by setting environment variable CXX. But somehow a new one came. The gcc is installed in /usr/local/gcc-4.2.3. I managed to change
So now I have no problem of using clang to compile a trivial C program of 20 lines. When I tried to compile programs of spec2006, such as bzip2 or mcf, the following erros showed up.
clang spec.o blocksort.o bzip2.o bzlib.o compress.o crctable.o decompress.o huffman.o randtable.o -o bzip2
blocksort.o: In function gnu_dev_major': /usr/include/sys/sysmacros.h:44: multiple definition of gnu_dev_major’
spec.o:/usr/include/sys/sysmacros.h:44: first defined here
blocksort.o: In function gnu_dev_makedev': /usr/include/sys/sysmacros.h:56: multiple definition of gnu_dev_makedev’
spec.o:/usr/include/sys/sysmacros.h:56: first defined here
blocksort.o: In function gnu_dev_minor': /usr/include/sys/sysmacros.h:50: multiple definition of gnu_dev_minor’
spec.o:/usr/include/sys/sysmacros.h:50: first defined here
bzip2.o: In function gnu_dev_major': /usr/include/sys/sysmacros.h:44: multiple definition of gnu_dev_major’
spec.o:/usr/include/sys/sysmacros.h:44: first defined here
bzip2.o: In function gnu_dev_makedev': /usr/include/sys/sysmacros.h:56: multiple definition of gnu_dev_makedev’
spec.o:/usr/include/sys/sysmacros.h:56: first defined here
bzip2.o: In function gnu_dev_minor': /usr/include/sys/sysmacros.h:50: multiple definition of gnu_dev_minor’
spec.o:/usr/include/sys/sysmacros.h:50: first defined here
bzlib.o: In function gnu_dev_major': /usr/include/sys/sysmacros.h:44: multiple definition of gnu_dev_major’
spec.o:/usr/include/sys/sysmacros.h:44: first defined here
bzlib.o: In function gnu_dev_makedev': /usr/include/sys/sysmacros.h:56: multiple definition of gnu_dev_makedev’
spec.o:/usr/include/sys/sysmacros.h:56: first defined here
bzlib.o: In function gnu_dev_minor': /usr/include/sys/sysmacros.h:50: multiple definition of gnu_dev_minor’
spec.o:/usr/include/sys/sysmacros.h:50: first defined here
compress.o: In function gnu_dev_major': /usr/include/sys/sysmacros.h:44: multiple definition of gnu_dev_major’
spec.o:/usr/include/sys/sysmacros.h:44: first defined here
compress.o: In function gnu_dev_makedev': /usr/include/sys/sysmacros.h:56: multiple definition of gnu_dev_makedev’
spec.o:/usr/include/sys/sysmacros.h:56: first defined here
compress.o: In function gnu_dev_minor': /usr/include/sys/sysmacros.h:50: multiple definition of gnu_dev_minor’
spec.o:/usr/include/sys/sysmacros.h:50: first defined here
crctable.o: In function gnu_dev_major': /usr/include/sys/sysmacros.h:44: multiple definition of gnu_dev_major’
spec.o:/usr/include/sys/sysmacros.h:44: first defined here
crctable.o: In function gnu_dev_makedev': /usr/include/sys/sysmacros.h:56: multiple definition of gnu_dev_makedev’
spec.o:/usr/include/sys/sysmacros.h:56: first defined here
crctable.o: In function gnu_dev_minor': /usr/include/sys/sysmacros.h:50: multiple definition of gnu_dev_minor’
spec.o:/usr/include/sys/sysmacros.h:50: first defined here
decompress.o: In function gnu_dev_major': /usr/include/sys/sysmacros.h:44: multiple definition of gnu_dev_major’
spec.o:/usr/include/sys/sysmacros.h:44: first defined here
decompress.o: In function gnu_dev_makedev': /usr/include/sys/sysmacros.h:56: multiple definition of gnu_dev_makedev’
spec.o:/usr/include/sys/sysmacros.h:56: first defined here
decompress.o: In function gnu_dev_minor': /usr/include/sys/sysmacros.h:50: multiple definition of gnu_dev_minor’
spec.o:/usr/include/sys/sysmacros.h:50: first defined here
huffman.o: In function gnu_dev_major': /usr/include/sys/sysmacros.h:44: multiple definition of gnu_dev_major’
spec.o:/usr/include/sys/sysmacros.h:44: first defined here
huffman.o: In function gnu_dev_makedev': /usr/include/sys/sysmacros.h:56: multiple definition of gnu_dev_makedev’
spec.o:/usr/include/sys/sysmacros.h:56: first defined here
huffman.o: In function gnu_dev_minor': /usr/include/sys/sysmacros.h:50: multiple definition of gnu_dev_minor’
spec.o:/usr/include/sys/sysmacros.h:50: first defined here
randtable.o: In function gnu_dev_major': /usr/include/sys/sysmacros.h:44: multiple definition of gnu_dev_major’
spec.o:/usr/include/sys/sysmacros.h:44: first defined here
randtable.o: In function gnu_dev_makedev': /usr/include/sys/sysmacros.h:56: multiple definition of gnu_dev_makedev’
spec.o:/usr/include/sys/sysmacros.h:56: first defined here
randtable.o: In function gnu_dev_minor': /usr/include/sys/sysmacros.h:50: multiple definition of gnu_dev_minor’
spec.o:/usr/include/sys/sysmacros.h:50: first defined here
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake: *** [bzip2] Error 1