[Osi] compiling on macOS with gcc 8

Ted Ralphs ted at lehigh.edu
Tue Dec 18 11:13:36 EST 2018


Hi Antonio,

Yeah, I put some effort into trying to figure out the compiler error with
clang and FlopC++, but it's really obscure and I ultimately failed.

The problem you're having with gcc 8 will likely be fixed once we upgrade
to a more recent version of the autotools, which is in the works. For now,
though, you can override flags, too, when you invoke the configure script.
Can you grep in config.status and see what CXXFLAGS is set to? Assuming
there is a -V there, you can try stripping it out and set CXXFLAGS manually
just as you set CXX. Let me know how it goes. I do have access to a Mac and
can try to get it working myself, but not for a few days.

Cheers,

Ted

On Tue, Dec 18, 2018 at 9:15 AM Antonio Frangioni <frangio at di.unipi.it>
wrote:

> 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://urldefense.proofpoint.com/v2/url?u=https-3A__projects.coin-2Dor.org_svn_Osi_stable_0.107&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=rnUB298ByR5BGgo6vv2b6g&m=BcpBnEbz6aXQh9UTrwCuwGc19CGGlt639jXb9NtjTjw&s=e46Pp8AVQRvJSFZ5zup7RK-ZS2zUMthr6xNjE2eJp2I&e=
>
> 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
>
>
> _______________________________________________
> Osi mailing list
> Osi at list.coin-or.org
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_mailman_listinfo_osi&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=rnUB298ByR5BGgo6vv2b6g&m=BcpBnEbz6aXQh9UTrwCuwGc19CGGlt639jXb9NtjTjw&s=x1qpW93eUczVy-Y3t3MKx-cZIQESkvlLjCIWia3MWiY&e=
>


-- 
Dr. Ted Ralphs
Professor, Industrial and Systems Engineering
Lehigh University
(610) 628-1280
ted 'at' lehigh 'dot' edu
coral.ie.lehigh.edu/~ted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/osi/attachments/20181218/152b4d5e/attachment.html>


More information about the Osi mailing list