[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with Sun Studio 12 C++
From: |
Eric Blake |
Subject: |
Re: Problem with Sun Studio 12 C++ |
Date: |
Sat, 06 Jun 2009 12:52:58 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Eric Blake on 6/6/2009 12:42 PM:
> I'm not sure why it was done, but this appears to fix it. I'm in the
> middle of testing a libtool bootstrap after (temporarily) removing my C++
> compiler; if everything still works, are there any objections to this patch?
Hmm - I noticed this while testing on cygwin with gcc but not g++;
remember, cygwin tends to be case-insensitive (you can request case
sensitivity, but not everyone does); I suspect a similar thing would
happen on MacOS:
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... CC
checking whether we are using the GNU C++ compiler... no
checking whether CC accepts -g... no
checking dependency style of CC... gcc3
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/home/eblake/libtool':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
Looking at the config.log is more telling:
configure:12281: checking for CC
configure:12297: found /usr/bin/CC
configure:12308: result: CC
configure:12335: checking for C++ compiler version
configure:12344: CC --version >&5
CC (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
...
configure:12359: checking whether we are using the GNU C++ compiler
configure:12378: CC -c conftest.cpp >&5
CC: installation problem, cannot exec 'cc1plus': No such file or directory
In my situation, CC (a C++ compiler on some platforms) is
indistinguishable from cc (a C compiler) to a case-insensitive exec(), but
gcc then pays attention to the case of argv[0] and tries to invoke the
(uninstalled) c++ helper rather than running as a C compiler, leading to
subsequent failed guesses. So the patch needs to be tweaked - when
checking for a C++ compiler, we ought to test that the compiler can
actually perform a C++-specific compilation, not just that --version or
other trivial actions work.
Any ideas for the quickest course of action here?
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkoquwoACgkQ84KuGfSFAYBmXwCgnvDSICqCvhGNTO1ptOHjlMWO
9L4An0wdF2YXNnEjvtjGTWi7nPWvxB3Y
=a/KP
-----END PGP SIGNATURE-----