The build of CB succeeds on OS X 10.6-10.8, but fails on 10.9-10.11 where the default stdlib is now libc++.
In file included from debuggergdb.cpp:10: In file included from ../../../src/include/sdk.h:17: In file included from ../../../src/include/sdk_precomp.h:13: In file included from ../../../src/include/sdk_common.h:43: ../../../src/include/prep.h:33:75: error: use of overloaded operator '==' is ambiguous (with operand types 'const std::__1::shared_ptr<GDBWatch>' and 'int') template<typename T> bool equals(T const& rhs) const { return rhs == 0; } ~~~ ^ ~ ../../../src/include/prep.h:45:99: note: in instantiation of function template specialization 'nullptr_t::equals<std::__1::shared_ptr<GDBWatch> >' requested here template<typename T> inline bool operator==(T const& lhs, const nullptr_t& rhs) { return rhs.equals(lhs); } ^ debuggergdb.cpp:504:27: note: in instantiation of function template specialization 'operator==<std::__1::shared_ptr<GDBWatch> >' requested here if (m_localsWatch == nullptr) ^
Full log is here, the easiest way to to get it with
wget https://build.macports.org/builders/buildports-elcapitan-x86_64/builds/660/steps/compile/logs/stdio/text
I mentioned this in ticket #13 (but it's a different issue).
Have you seen this message: http://forums.codeblocks.org/index.php/topic,19510.msg138971.html#msg138971 and the patch in the following one?
I didn't see it. But I tried the patch now and it didn't help.
What are the steps needed in order to reproduce the problem (I'm new to osx and macports)?
Install macports, add
/opt/local/bin
toPATH
and then run:Other relevant flags are
-d
for debug (even more verbose output;-v
means verbose of course),-k
to keep the build files even after the installation is complete,-s
to install from source (but you won't get it from binary archive anyway now that it's broken, so you don't need that flag). You can also go to a different stage withIf you want to modify code after the build breaks, this is the easiest way to go to the build tree:
and then modify the code and run
sudo port install codeblocks
again or just runsudo make
manually from the build dir.If you need help with modifying configuration flags, let me know. Here are the package sources.
Most likely you would get the same error if you would install CodeBlocks from scratch, but you would need to install all dependencies first, so using a package manager might be helpful to get at least the dependencies right. (You can theoretically also install MacPorts to a user dir, but you need to install it from source to give it the right prefix etc. But that is a lot less tested.)
Users keep asking if there is any progress on this issue. CB still cannot be compiled on any newer version of OS X.
Caveat: IANA C++ developer.
That said, this code appears to be checking whether a pointer (as opposed to the thing being pointed to) has value 0. So, why not cast it to a numeric type that is guaranteed to be large enough?
Works for me.
It's worth noting though that the trunk version only compiles on >= 10.9, but not on earlier versions. I didn't try compiling as C++11 yet, that would probably work
Since my last post I found various threads online about other issues. A couple of plugins need to be excluded or ported to FSEventsd, and plugins are being built as .so instead of .dylib, which means that they aren't loaded by CB on startup. I also noticed a bug where Quit on the application menu doesn't work properly, while File|Quit does.
I have some fixes for the autotools build, I'll see if I can commit them without causing other problems. And then we can try to fix the other issues reported.
Does anyone know how I can make an application bundle using the autotools scripts?
Trunk version of Code::Blocks should build fine on macOS now.