Bug #19136 2013-09-29 20:44

mojca

wrong linking order of codeblocks library

I'm experiencing the problem on Mac, but I suspect that this happens on other platforms as well.

If the codeblocks library (libcodeblocks.*) is already installed, that one might be used instead of the one that has just been compiled. This might lead to problems in case that the installed library is different (in my case I had problems when switching from wxWidgets 2.8 to 2.9 or when the installed version was for x86_64 and I tried to install binaries for i386; there might be problems when upgrading from an older version etc.).

I made a temporary workaround in MacPorts, but a different/better patch is needed.

See https://trac.macports.org/ticket/40531 for a bit more information and the complete log from a failed build.

Category
 
Group
Platform:All
Status
Open
Close date
 
Assigned to
 
tpetrov 2013-10-01 23:40

This has recently (6 months) been fixed in trunk for linux, I don't know if it has started to magically work on OSX, but if you've not tried latest trunk, please try it.

mojca 2013-10-02 08:00

I would like to try it, but I don't know how.

I'm stuck at the following two issues:

- http://developer.berlios.de/bugs/?func=detailbug&bug_id=19110&group_id=5358

- http://developer.berlios.de/bugs/?func=detailbug&bug_id=19114&group_id=5358

I can somehow circumvent the first one by manually changing compile commands as they fail, but I don't know what to do about the failing malloc.

mojca 2013-10-02 08:01

Alternatively if you can point me to the revision where it was fixed I can try to backport the change and test it on 12.11 which at least compiles fine.

mojca 2014-04-04 10:08

I'm now trying to build version 13.12.

Yes, the functionality changed indeed, but it was only fixed for linux in the same way that I fixed it earlier for mac.

I now need to apply the following patch to make it work:

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

So the bottomline is that on linux the library would be "sdk/libcodeblocks.la" while on Mac it's "sdk/.libs/libcodeblocks.dylib".

There must be some trivial patch replacing ".la" with an extension, something similar to $(EXEEXT) and $(OBJEXT). Plus the difference in path where the libraries end up. I don't know where that difference comes from.

I've seen AC_LTDL_SHLIBEXT being used at some places, but I would need to check.