When compiling Code::Blocks on OS X I need to use the following workaround:
--- src/src/Makefile.in.orig +++ src/src/Makefile.in @@ -416,7 +416,7 @@ AM_CPPFLAGS = $(WX_CXXFLAGS) \ # wxAUI uses GTK+ libraries on wxGTK # codeblocks_LDFLAGS = $(WX_GTK2_LIBS) -codeblocks_LDADD = ../sdk/libcodeblocks.la \ +codeblocks_LDADD = ../sdk/.libs/libcodeblocks.dylib \ $(WX_LIBS) \ $(WX_GTK2_LIBS)
The code has been recently changed (r9132 by jenslody in June 2013; previously the Makefile used "-L../sdk -lcodeblocks" which didn't work properly), but the hardcoded library name and extension should be fixed to work properly on Mac (I'm not familiar enough with autotools to know how to fix this properly without hardcoding names).
Assigned to jenslody. Hopefully he will take care...
We use the *.la-construct in several Makefiles in our source-tree.
Is this the only place where the issue occurs ?
Does the libcodeblocks.la-file exist ?
If yes, what is the content (it's a text-file).
What is the exact error message you get ?
It was in version 13.12 (released 1.5 years ago). Or at least that was the only place where I had to make a patch of this particular type back then (there were numerous other problems reported in subsequent tickets).
I need to check how the latest version behaves.
Regarding other questions about .la files: I can test (should I test version 13.12 or the latest SVN checkout?), but from what I remember .la files are usually deleted after the build (by the package manager) even if some files are created during the build process.
See also https://trac.macports.org/ticket/38010 and https://wiki.debian.org/ReleaseGoals/LAFileRemoval
It took me a while to be able to start testing on the latest version because none of the bugs from 8 to 13 have been resolved so far, but luckily at least the code didn't diverge too much, so it wasn't so painful to use the old patches.
While working on this report, can you please also take a look at these?
https://sourceforge.net/p/codeblocks/tickets/8/
https://sourceforge.net/p/codeblocks/tickets/9/
https://sourceforge.net/p/codeblocks/tickets/10/
https://sourceforge.net/p/codeblocks/tickets/11/
https://sourceforge.net/p/codeblocks/tickets/13/
http://forums.codeblocks.org/index.php?topic=18394.0
It's a bit inconvenient to build your software when it needs so many patches and the tickets stay open "forever".
There exists a file src/sdk/libcodeblocks.la:
There is a tiny chance that I just tried to adapt the patch that I absolutely needed in earlier versions of Code::Blocks when upgrading to a newer version some time in the past. I probably thought that .la was a library (.a / .so) that needed to be renamed to .dylib on Mac anyway and didn't even test whether the new code works without modifications.
(Previously there was a defunct "-L../sdk -lcodeblocks" in the code). It might be that this patch is actually not needed at all. This would probably also explain why it works everywhere else. I did a clean rebuild without the patch, but now the build throws an error at
So I cannot tell whether it works or not without solving that new problem first.
Ok, the other problem was solved with
and after that the build succeeded.
Feel free to close this ticket as invalid and thanks a lot for pointing it out to me that I was doing the wrong thing ever since the sources were fixed a while ago.
(But you can fix that other wx-related problem by adding stdpaths.h. Or should I open a new ticket?)
Applied the (non-related) patch in SVN - thanks.
Closed this one marking it invalid.
Nag us with the other stuff in the forums, if you like... There are not much Mac devs around for C::B, unfortunately.