[Osi] compiling on macOS with gcc 8

Antonio Frangioni frangio at di.unipi.it
Tue Dec 18 09:15:15 EST 2018


Hi.

I was trying to compile OSI on my Mac (running macOS High Sierra 10.13.6), but using GNU g++ rather than Apple's clang++. The rationale has actually to do with the fact that FlopC++ does compile under GNU g++, but it does not under clang++ and it hasn't for years for some obscure reason none has ever fixed.

I have g++-8 as provided by Homebrew.

Last year, when I had g++-7, I was able to by configuring it as

./configure ... \
            CC="/usr/local/bin/gcc-7" \
            CXX="/usr/local/bin/g++-7"
            CPP="/usr/local/bin/g++-7 -E"

Hence, I was hopeful to be able to do that again now by configuring it as

./configure ... \
            CC="/usr/local/bin/gcc-8" \
            CXX="/usr/local/bin/g++-8"
            CPP="/usr/local/bin/g++-8 -E"

Unfortunately, this does not work. I get

checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.

and config.log says

configure:2041: /usr/local/bin/gcc-8 -V </dev/null >&5
gcc-8: error: unrecognized command line option '-V'

I SVN'd the source with

svn co https://projects.coin-or.org/svn/Osi/stable/0.107

so I guess this is the latest ./configure available. However, there must be something wrong with the way ./configure handles the "-V" option that g++-8 no longer has.

Any idea about how to fix this?

	Thank you in advance

	  Antonio

----------------------------------------------------------------------
Youth is friendship, LEGO, SF, assembler, love, and mobile suits 




More information about the Osi mailing list