OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0000969OMNeT++Installer / Productizingpublic2016-11-25 14:542017-02-01 13:57
asantos 
rhornig 
normalminoralways
resolvedno change required 
x86_64GNU/Linux?
5.0 
5.1pre3 
0000969: CXX environment variable being ignored with configure
We have our own environment of compiler where GCC is installed in network filesystem. The configure script on Linux x86_64 is broken for the CXX variable:

$ CXX=$(which g++) CC=$(which gcc) ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
configure: -----------------------------------------------
configure: reading configure.user for your custom settings
configure: -----------------------------------------------
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /afs/qqq/bin/gcc accepts -g... yes
checking for /afs/qqq/bin/gcc option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether /afs/qqq/bin/g++ accepts -g... yes
checking for /afs/qqq/bin/g++... not found
configure: error: No C++ compiler found -- one is required to build OMNeT++/OMNEST, and also for model development.

Replacing CXX with tmp_CXX works fine.

$ tmp_CXX=$(which g++) CC=$(which gcc) ./configure

1. Download Omnet++ 5.0, unzip into desired location
2. Call configure script with custom CXX enviromnemt variable
3. The configure script complains about missing compiler.
No tags attached.
Issue History
2016-11-25 14:54asantosNew Issue
2017-02-01 13:57rhornigNote Added: 0001280
2017-02-01 13:57rhornigStatusnew => resolved
2017-02-01 13:57rhornigFixed in Version => 5.1pre3
2017-02-01 13:57rhornigResolutionopen => no change required
2017-02-01 13:57rhornigAssigned To => rhornig

Notes
(0001280)
rhornig   
2017-02-01 13:57   
This is true, however ./configure is not meant to accept all variables from environment variables or command line options.

You should instead set your preferred compiler inside configure.user by setting the CC and CXX variables there.