News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Building CodeBlocks 12.11 on Mac Os X 10.8

Started by stateless, May 13, 2013, 04:05:13 PM

Previous topic - Next topic

stateless

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
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.

Alpha

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).

stateless

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:
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

Alpha

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.

stateless

delated but with no success  ??? the .log file is the same  :(

Alpha


stateless


MortenMacFly

Quote from: stateless on May 13, 2013, 10:38:46 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

stateless

i'm running the build in a folder on the Desktop as i've done for wxWidgets... i've plenty of permissions  :(

mojca

I'm also experiencing this problem, see 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.