Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 493806 - sys-devel/gcc-4.7.3[-cxx]: .../gcc/configure: cpp: error: conftest.cpp: C++ compiler not installed on this system
Summary: sys-devel/gcc-4.7.3[-cxx]: .../gcc/configure: cpp: error: conftest.cpp: C++ c...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-10 01:20 UTC by Sylvain BERTRAND
Modified: 2017-08-12 20:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info '=sys-devel/gcc-4.7.3-r1::gentoo' (info,4.23 KB, text/plain)
2013-12-10 01:21 UTC, Sylvain BERTRAND
Details
gcc-build-logs.tar.bz2 (gcc-build-logs.tar.bz2,43.62 KB, application/x-bzip-compressed-tar)
2013-12-13 06:38 UTC, Sylvain BERTRAND
Details
binutils-2.24.log.xz (binutils-2.24.log.xz,15.60 KB, application/octet-stream)
2014-01-03 21:52 UTC, Sylvain BERTRAND
Details
procps-ng-3.3.9.log.xz (procps-ng-3.3.9.log.xz,2.70 KB, application/octet-stream)
2014-01-03 22:01 UTC, Sylvain BERTRAND
Details
dbus-1.6.18-r1.log.xz (dbus-1.6.18-r1.log.xz,2.94 KB, application/octet-stream)
2014-01-03 22:04 UTC, Sylvain BERTRAND
Details
gnutls-3.2.8.log.xz (gnutls-3.2.8.log.xz,6.82 KB, application/octet-stream)
2014-01-03 22:07 UTC, Sylvain BERTRAND
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sylvain BERTRAND 2013-12-10 01:20:35 UTC
gcc 4.7.x is the last gcc to be able to bootstrap its compilation with a basic C compiler/runtime.
But, somehow on gentoo, it seems the GNU autotools made gcc 4.7.x c++ mandadory.
Comment 1 Sylvain BERTRAND 2013-12-10 01:21:51 UTC
Created attachment 365028 [details]
emerge --info '=sys-devel/gcc-4.7.3-r1::gentoo'
Comment 2 Sylvain BERTRAND 2013-12-10 02:03:17 UTC
got troubles to upload the build log archive, pasting the crash here:
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/var/tmp/portage/sys-devel/gcc-4.7.3-r1/work/build/gcc':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
Makefile:3857: recipe for target 'configure-stage1-gcc' failed
make[2]: *** [configure-stage1-gcc] Error 1
make[2]: Leaving directory '/var/tmp/portage/sys-devel/gcc-4.7.3-r1/work/build'
Makefile:12857: recipe for target 'stage1-bubble' failed
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory '/var/tmp/portage/sys-devel/gcc-4.7.3-r1/work/build'
Makefile:13140: recipe for target 'bootstrap-lean' failed
make: *** [bootstrap-lean] Error 2
emake failed
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2013-12-10 10:29:33 UTC
Could you rephrase your statements into an actual problem, please?
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2013-12-11 02:46:44 UTC
1) Please attach the entire build log to this bug report.
2) Please attach the entire config.log to this bug report.
Comment 5 Sylvain BERTRAND 2013-12-11 18:40:45 UTC
build logs there: http://www.legeek.net/gcc-build-logs.tar.bz2
(I got uploading issue on the bugzilla with lynx)
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2013-12-12 00:49:36 UTC
(In reply to Jeroen Roovers from comment #4)
> 1) Please attach the entire build log to this bug report.
> 2) Please attach the entire config.log to this bug report.

this isn't that hard.
Comment 7 Sylvain BERTRAND 2013-12-12 13:49:55 UTC
build log and config logs are there : http://www.legeek.net/gcc-build-logs.tar.bz2
Something is missing?
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2013-12-12 17:07:29 UTC
Yes, please _attach_ [1] the entire build log to this bug report.


[1] https://bugs.gentoo.org/attachment.cgi?bugid=493806&action=enter
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2013-12-12 17:08:07 UTC
_And_ please stop changing the Summary, thanks.
Comment 10 Sylvain BERTRAND 2013-12-12 17:32:13 UTC
When I try to upload the logs, I get:
                                                                                                                                                     Internal Server Error

   The server encountered an internal error or misconfiguration and was unable to complete your request.

   Please contact the server administrator, webmaster@gentoo.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

   More information about this error may be available in the server error log.
     __________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________


    Apache Server at bugs.gentoo.org Port 443

I did file a bug on the bugzilla for this: 494052

Waiting for that other bug to be fixed, could you even try to download the logs from the site where I uploaded the logs? (wget/curl should work)
Comment 11 Sylvain BERTRAND 2013-12-13 06:38:47 UTC
Created attachment 365214 [details]
gcc-build-logs.tar.bz2

using pybugz
Comment 12 Jeroen Roovers (RETIRED) gentoo-dev 2013-12-13 15:05:12 UTC
What exactly is this /lib/cpp in:

configure: error: in `/var/tmp/portage/sys-devel/gcc-4.7.3-r1/work/build/gcc':
configure: WARNING: C++ preprocessor "/lib/cpp" fails sanity check
Comment 13 Sylvain BERTRAND 2013-12-13 17:37:08 UTC
/lib/cpp is setup by gcc-config
Comment 14 SpanKY gentoo-dev 2013-12-16 06:30:28 UTC
looks like you're using USE=-cxx.  i think they've changed gcc-4.7.x+ so that you need a C++ compiler now.  so probably to be expected.
Comment 15 Sylvain BERTRAND 2013-12-17 13:33:34 UTC
4.7.x can bootstrap using C only. gcc 4.8+ needs a c++ compiler and runtime. See the gcc website.
Comment 16 Ryan Hill (RETIRED) gentoo-dev 2013-12-18 01:04:26 UTC
We use --disable-build-with-cxx --disable-build-poststage1-with-cxx when we build with USE="-cxx".  So once you've built a 4.7 compiler with -cxx you can't use it to build a USE="cxx" version...

We could either always pass the first option, or just always require a C++ compiler as 4.8 does.
Comment 17 Ryan Hill (RETIRED) gentoo-dev 2013-12-23 21:00:40 UTC
Eh, first option doesn't work.
Comment 18 Sylvain BERTRAND 2014-01-03 21:52:47 UTC
Created attachment 366896 [details]
binutils-2.24.log.xz

binutils broken the same way
Comment 19 Sylvain BERTRAND 2014-01-03 22:01:31 UTC
Created attachment 366900 [details]
procps-ng-3.3.9.log.xz

procps broken the same way
Comment 20 Sylvain BERTRAND 2014-01-03 22:04:10 UTC
Created attachment 366902 [details]
dbus-1.6.18-r1.log.xz

dbus broken the same way
Comment 21 Sylvain BERTRAND 2014-01-03 22:07:19 UTC
Created attachment 366904 [details]
gnutls-3.2.8.log.xz

gnutls broken the same way
Comment 22 SpanKY gentoo-dev 2014-01-04 03:27:53 UTC
Comment on attachment 366896 [details]
binutils-2.24.log.xz

you should file bugs for each package.  the toolchain doesn't maintain these packages.
Comment 23 Ryan Hill (RETIRED) gentoo-dev 2014-01-04 04:10:02 UTC
Half the packages in the tree are going to fail until he builds a C++ compiler.  They aren't package bugs.
Comment 24 Ryan Hill (RETIRED) gentoo-dev 2014-01-04 04:34:12 UTC
Er, I take that back, they could be using epunt_cxx.
Comment 25 SpanKY gentoo-dev 2014-01-04 13:24:12 UTC
(In reply to Ryan Hill from comment #24)

assuming the package doesn't actually use any C++ code, that is correct
Comment 26 Sylvain BERTRAND 2014-01-04 13:43:00 UTC
Since the issue is similar with procps, I tested procps-3.3.9.tar.xz (small and easy compared to gcc). procps 3.3.9 configured and compiled fine. Then, indeed, it seems to be something dealing the re-autotooling of the software package (epunt_cxx?).
Comment 27 Sylvain BERTRAND 2014-01-27 13:07:30 UTC
ping?
Comment 28 SpanKY gentoo-dev 2014-01-28 00:45:53 UTC
what are you pinging exactly ?  USE=-cxx isn't a priority for us especially since it is no longer feasible with gcc-4.8+.
Comment 29 Sylvain BERTRAND 2014-01-29 09:55:44 UTC
Yep, gcc guys are doing sh*t. But gcc-4.7 is the starting point to compile a c++ only gcc (from 4.8).
Then -cxx for gcc 4.7 should work forever. And it seems to be an autotooling issue, which can expect another C compiler.
Sorry for the ping nevertheless.
Comment 30 SpanKY gentoo-dev 2014-01-31 04:06:07 UTC
(In reply to Sylvain BERTRAND from comment #29)

you can try calling epunt_cxx in toolchain.eclass.  see if that helps.
Comment 31 Sylvain BERTRAND 2014-02-03 10:05:47 UTC
This information is for me? Because I'm not a portage dev.
Comment 32 Ryan Hill (RETIRED) gentoo-dev 2014-02-04 03:58:57 UTC
I tried but it doesn't apply.  The code should only be warning, not failing, but i think something in our env is causing it to fall through.  It's on my list but yeah, low priority right now, sorry.
Comment 33 Sylvain BERTRAND 2014-03-24 11:17:44 UTC
Just to make a little update to this bug at the day of writing.

I have the following packages which fail:
dev-libs/expat-2.1.0-r4
sys-devel/flex-2.5.38-r1
sys-devel/binutils-2.24-r2
sys-devel/gcc-4.7.3-r1
sys-process/procps-3.3.9-r1
sys-apps/dbus-1.8.0

BTW, what is the proper way to submit a toolchain request for
the open64 C/c++ compiler (we have already tinycc)?
Comment 34 SpanKY gentoo-dev 2014-03-26 06:10:22 UTC
(In reply to Sylvain BERTRAND from comment #33)

if gcc is no longer making USE=cxx optional, then we're going to let the rest of the tree rot.  many of the failures are configure time only and don't actually impact the output of the build (which is what `epunt_cxx` solves), so tracking them behind USE=cxx is a waste of developer time.

if you want to request a new package, then just file a new bug for it.  but chances are no one will work on it as people tend to scratch their own itch rather than go and look for new work ;).
Comment 35 Sylvain BERTRAND 2014-03-26 12:53:40 UTC
gcc is not making USE=cxx optional. It's still optional. You are mixing the c++
compiler with the implementation/bootstrap language of the compiler.

To Compile a gcc, you must chain compile gccs from gcc 4.7 till you reach the
version you targetting: those are the official instructions, which translate in
"gcc 4.7 will be here forever" (it's the starting point of the compilation
chain).

Ok, I'll open in the near futur some bugs for requests about additionnal toolchains:
open64 (we have already tinycc).
Comment 36 Sylvain BERTRAND 2014-06-23 15:37:36 UTC
As of today, the near core packages with the bug from the GNU autotool usage forcing a c++ compiler for a C coded project are:

----

These are the packages that would be merged, in order:

Calculating dependencies  ... done!
[ebuild     U  ] dev-libs/expat-2.1.0-r4 [2.1.0-r3] USE="unicode -examples -static-libs" 0 kB
[ebuild     U  ] dev-libs/libffi-3.1-r3 [3.0.13-r1] USE="-debug -pax_kernel -static-libs {-test}" 0 kB
[ebuild     U  ] sys-devel/flex-2.5.39-r1 [2.5.37] USE="-nls -static {-test}" 0 kB
[ebuild     U  ] sys-devel/binutils-2.24-r3 [2.23.2] USE="zlib -cxx -multislot -multitarget -nls -static-libs {-test} -vanilla" 0 kB
[ebuild     U  ] sys-devel/gcc-4.7.4:4.7 [4.7.3:4.7] USE="nptl (-altivec) -awt% -cxx -doc (-fixed-point) -fortran -gcj -go -graphite (-hardened) (-libssp) -mudflap (-multilib) (-multislot) -nls -nopie -nossp -objc -objc++ -objc-gc -openmp -regression-test -vanilla (-gtk%) (-lto%)" 0 kB
[ebuild     U  ] sys-process/procps-3.3.9-r1 [3.3.8] USE="ncurses unicode -nls (-selinux) -static-libs -systemd% {-test%}" 0 kB
[ebuild     U  ] sys-apps/dbus-1.8.4 [1.6.12] USE="-X -debug -doc (-selinux) -static-libs -systemd {-test}" 0 kB

Total: 7 packages (7 upgrades), Size of downloads: 0 kB
Comment 37 Sylvain BERTRAND 2014-08-15 16:06:03 UTC
This is an update on the broken packages:

These are the packages that would be merged, in order:

Calculating dependencies  ... done!
[ebuild     U  ] dev-libs/expat-2.1.0-r4 [2.1.0-r3] USE="unicode -examples -static-libs" 0 KiB
[ebuild     U  ] dev-libs/libffi-3.1-r3 [3.0.13-r1] USE="-debug -pax_kernel -static-libs {-test}" 916 KiB
[ebuild     U  ] sys-devel/flex-2.5.39-r1 [2.5.37] USE="-nls -static {-test}" 1 316 KiB
[ebuild     U  ] sys-devel/binutils-2.24-r3 [2.23.2] USE="zlib -cxx -multislot -multitarget -nls -static-libs {-test} -vanilla" 22 202 KiB
[ebuild     U  ] sys-devel/gcc-4.7.4:4.7 [4.7.3:4.7] USE="nptl (-altivec) -awt% -cxx -doc (-fixed-point) -fortran -gcj -go -graphite (-hardened) (-libssp) -mudflap (-multilib) (-multislot) -nls -nopie -nossp -objc -objc++ -objc-gc -openmp -regression-test -vanilla (-gtk%) (-lto%)" 81 050 KiB
[ebuild     U  ] sys-process/procps-3.3.9-r1 [3.3.8] USE="ncurses unicode -nls (-selinux) -static-libs -systemd% {-test%}" 548 KiB

Total: 6 packages (6 upgrades), Size of downloads: 106 030 KiB
Comment 38 Andreas K. Hüttel archtester gentoo-dev 2017-08-12 20:33:57 UTC
All versions below 4.9 are now package.masked.