After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 684758 - anjuta-3.5.91 fails to configure due to ac_ct_CXX check
anjuta-3.5.91 fails to configure due to ac_ct_CXX check
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: core application
3.5.x
Other Linux
: Normal normal
: ---
Assigned To: Naba Kumar
Anjuta maintainers
: 686578 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-09-25 06:20 UTC by Alexandre Rostovtsev
Modified: 2012-10-21 15:15 UTC
See Also:
GNOME target: ---
GNOME version: 3.5/3.6


Attachments
config.log showing the failure (71.89 KB, text/plain)
2012-09-25 06:20 UTC, Alexandre Rostovtsev
  Details
proposed patch (677 bytes, patch)
2012-09-25 06:33 UTC, Alexandre Rostovtsev
rejected Details | Review

Description Alexandre Rostovtsev 2012-09-25 06:20:04 UTC
Created attachment 225124 [details]
config.log showing the failure

On my system, anjuta-3.5.91 fails to configure when detecting the system C++ compiler:

checking for x86_64-pc-linux-gnu-g++... x86_64-pc-linux-gnu-g++
checking whether we are using the GNU C++ compiler... yes
checking whether x86_64-pc-linux-gnu-g++ accepts -g... yes
checking dependency style of x86_64-pc-linux-gnu-g++... none
configure: error: C++ Compiler required to compile Anjuta

This is due to incorrectly using the AC_PROG_CXX macro. According to autoconf documentation[1], AC_PROG_CXX sets CXX to the C++ compiler. Anjuta's configure script instead checks for ac_ct_CXX, which is not guaranteed to be set.

[1] http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/C_002b_002b-Compiler.html
Comment 1 Alexandre Rostovtsev 2012-09-25 06:33:46 UTC
Created attachment 225125 [details] [review]
proposed patch
Comment 2 Sébastien Granjoux 2012-09-25 17:37:20 UTC
Thanks for reporting this bug. This is already fixed in the master version.
Comment 3 Sébastien Granjoux 2012-09-25 17:38:41 UTC
Sorry, I have commented the wrong bug this one is not fixed.
Comment 4 Sébastien Granjoux 2012-09-25 19:05:18 UTC
(In reply to comment #0)
> This is due to incorrectly using the AC_PROG_CXX macro. According to autoconf
> documentation[1], AC_PROG_CXX sets CXX to the C++ compiler. Anjuta's configure
> script instead checks for ac_ct_CXX, which is not guaranteed to be set.

Indeed ac_ct_CXX is an internal variable set by autoconf which shouldn't be used. But checking CXX is not completely right neither because it is set by default to g++ when no C++ compiler is found.

I imagine that the use of ac_ct_CXX was done to avoid this issue with CXX.
Comment 5 Sébastien Granjoux 2012-10-13 20:37:57 UTC
Review of attachment 225125 [details] [review]:

I think the goal of checking ac_ct_CXX is to check if a C++ compiler is really here. The AC_PROG_CXX set CXX to g++ by default, even if a C++ compiler is not found.
Comment 6 Sébastien Granjoux 2012-10-13 20:40:34 UTC
Thanks for your patch but I have not committed it because it doesn't really check if a C++ compiler is present.

Anyway, I have replaced the check of ac_ct_CXX which is indeed an internal variable by the use of AC_LINK_IFELSE. Please reopen the bug if it doesn't solve the issue on your system.
Comment 7 Sébastien Granjoux 2012-10-21 15:15:15 UTC
*** Bug 686578 has been marked as a duplicate of this bug. ***