Summary: | Misleading error message when building gcc without C++ compiler installed | ||
---|---|---|---|
Product: | gcc | Reporter: | Steve Jarvis <sajarvis> |
Component: | other | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | NEW --- | ||
Severity: | normal | CC: | rjones, wilson |
Priority: | P3 | ||
Version: | unknown | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2019-05-02 00:00:00 | |
Attachments: | Full output during make. |
Description
Steve Jarvis
2014-10-11 01:05:38 UTC
*** Bug 63516 has been marked as a duplicate of this bug. *** Just got the same issue, solved installing c++. I was building gcc on Fedora 21. Can confirm this happens also on Fedora 23. Installing gcc-c++ fixes it. Also occurred on CentOS 7, solved by installing gcc-c++. The issue is likely that CXX environment variable is set to a non-existent location. Verify where it point to: ``` echo $CXX ``` same on Debian 3.16 `apt-get install g++` fixed the problem. before installing: CXX was undefined Confirmed. Except that current sources now say configure: error: uint64_t or int64_t not found We have a configure check to verify that the C compiler works. We are missing one for the C++ compiler. In configure we have $as_echo_n "checking whether the C compiler works... " >&6; } and there is no equivalent for the C++ compiler. I filed an autoconf bug http://savannah.gnu.org/support/index.php?109676 The problem here is that autoconf only verifies that the first AC_PROG_X compiler is working. And since we include AC_PROG_CC before AC_PROG_CXX, only the C compiler is tested to see if it works. But since we are using the C++ compiler for all of the configure checks, and for the build, we really should be verifying that the C++ compiler works. We can work around the autoconf problem by putting AC_PROG_CXX before AC_PROG_CC. This will verify that the C++ compiler works, but will stop verifying that the C compiler works, which is probably OK. |