Code::Blocks Forums

User forums => Help => Topic started by: stateless on May 13, 2013, 04:05:13 pm

Title: Building CodeBlocks 12.11 on Mac Os X 10.8
Post by: stateless on May 13, 2013, 04:05:13 pm
Hi everyone,
I'm trying to build CodeBlocks 12.11 from SVN on Mac Os X Mountain Lion (10.8.3) but i'm receiving this error during the configuration
Code
checking for g++... g++
checking whether the C++ compiler works... no
configure: error: in `/Users/Rock/Desktop/Codeblocks/trunk':
configure: error: C++ compiler cannot create executables
can anyone tell me why g++ should not work?  ??? it worked for wxWidget...

Thank you.
Title: Re: Building CodeBlocks 12.11 on Mac Os X 10.8
Post by: Alpha on May 13, 2013, 04:30:59 pm
I do not use Mac, but to dig deeper into your problem, you could try seeing if configure dumped a log of the exact test that failed.  You could also test if configure can be executed with increased verbosity (ex. try: --verbose).
Title: Re: Building CodeBlocks 12.11 on Mac Os X 10.8
Post by: stateless on May 13, 2013, 04:43:51 pm
Thank you for your answer,
./configure --verbose produce the same output as ./configure but here it is a part of the .log file where you can see the failure of the g++ test:
Code
configure:3668: checking whether the C++ compiler works
configure:3690: g++ -O2 -ffast-math -DCB_AUTOCONF   -Wl,--no-undefined conftest.cpp  >&5
ld: unknown option: --no-undefined
collect2: ld returned 1 exit status
configure:3694: $? = 1
configure:3732: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "codeblocks"
| #define PACKAGE_TARNAME "codeblocks"
| #define PACKAGE_VERSION "12.11svn8909"
| #define PACKAGE_STRING "codeblocks 12.11svn8909"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "codeblocks"
| #define VERSION "12.11svn8909"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3737: error: in `/Users/Rocco/Desktop/Codeblocks/trunk':
configure:3739: error: C++ compiler cannot create executables
See `config.log' for more details
Title: Re: Building CodeBlocks 12.11 on Mac Os X 10.8
Post by: Alpha on May 13, 2013, 04:53:30 pm
As a hot patch, delete all occurrences of -Wl,--no-undefined in the file acinclude.m4.

Someone with more autoconf knowledge (jens?) should figure out how to properly disable this, when necessary.
Title: Re: Building CodeBlocks 12.11 on Mac Os X 10.8
Post by: stateless on May 13, 2013, 05:08:23 pm
delated but with no success  ??? the .log file is the same  :(
Title: Re: Building CodeBlocks 12.11 on Mac Os X 10.8
Post by: Alpha on May 13, 2013, 10:36:14 pm
Did you clean and call bootstrap again?
Title: Re: Building CodeBlocks 12.11 on Mac Os X 10.8
Post by: stateless on May 13, 2013, 10:38:46 pm
yep, the error still the same
Title: Re: Building CodeBlocks 12.11 on Mac Os X 10.8
Post by: MortenMacFly on May 13, 2013, 11:09:07 pm
yep, the error still the same
Maybe the reason is as simple as that your compiler really cannot create executables in the folder where you run the build. Did you ensure you are in a user-space, have checked out the C::B sources as this user and have full write permissions to all these folders?

Autotools rarely fail for such - so I would trust the error message and look for the reason accordingly.
Title: Re: Building CodeBlocks 12.11 on Mac Os X 10.8
Post by: stateless on May 13, 2013, 11:13:51 pm
i'm running the build in a folder on the Desktop as i've done for wxWidgets... i've plenty of permissions  :(
Title: Re: Building CodeBlocks 12.11 on Mac Os X 10.8
Post by: mojca on October 02, 2013, 09:55:45 am
I'm also experiencing this problem, see http://developer.berlios.de/bugs/?func=detailbug&bug_id=19110&group_id=5358 (http://developer.berlios.de/bugs/?func=detailbug&bug_id=19110&group_id=5358), but only when compiling from trunk. I don't have the problem with the released version (12.11).

During the whole compilation this is only a problem three times, so you can also manually change the compile commands. This flag is present all over the place, in particular in all the *.cbp files. I don't know of a sane way to get rid of all these. (I tried if replacing --no-undefined with -no-undefined would help, but it didn't.)

But even if I get past that, I run into problems with malloc, so I'm unable to finish compilation from trunk. I got the version 12.11 to compile with MacPorts however.