Page 1 of 2

Problems Compiling Codelite on Mac (10.6.7)

Posted: Sun Jun 26, 2011 9:34 pm
by Roey
After running:

Code: Select all

ARCH_FLAG=-arch i386
./configure
make
I get the following error:

ld: duplicate symbol wxAuiBitmapFromBits(unsigned char const*, int, int, wxColour const&)in /usr/local/lib/libwx_macu_aui-2.8.a(auilib_dockart.o) and Release_gcc_unicode/SDKObjects_cl_aui_notebook_art.o

My guess is that I shouldn't have built the wx library with aui?

Re: Problems Compiling Codelite on Mac (10.6.7)

Posted: Sun Jun 26, 2011 9:49 pm
by eranif
Roey wrote:My guess is that I shouldn't have built the wx library with aui?
Thats not the problem.

The problem is that codelite does not support building it against wxWidgets built as .a (archive)
You should only use wxWidgets built as shared libraries - any other configuration is not supported (it will definitely cause functionality errors as well)

Eran

Re: Problems Compiling Codelite on Mac (10.6.7)

Posted: Sun Jun 26, 2011 11:35 pm
by Roey
OK, so 2nd attempt and not quite there yet:

For wx2.8.12:

Code: Select all

mkdir build-codelite-debug
cd build-codelite-debug
arch_flags="-arch i386"
../configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" --enable-shared --enable-unicode --enable-debug
make
Then for codelite:

Code: Select all

export PATH=/Development/wx/wx2.8.12/build-codelite-debug:$PATH
ARCH_FLAGS="-arch i386"
./configure --enable-debug
make
But Get (full make log attached):

Code: Select all

..
ld: warning: in Debug/codelite_indexer_objects_workerthread.o, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols:
  "_main", referenced from:
      start in crt1.10.6.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [codelite_indexer] Error 1
make: *** [codelite_indexer] Error 2
Now for some reason codelite_indexer doesn't get the -m32 option, but I had a look at configure and can't quite work out why...

Thanks,

Re: Problems Compiling Codelite on Mac (10.6.7)

Posted: Mon Jun 27, 2011 9:38 am
by eranif
Roey wrote:Now for some reason codelite_indexer doesn't get the -m32 option, but I had a look at configure and can't quite work out why...
You will have to consult with DavidGH who made this change in the configure

Eran

Re: Problems Compiling Codelite on Mac (10.6.7)

Posted: Mon Jun 27, 2011 2:02 pm
by Roey
OK Thanks,
Does he check this forum regularly?

Re: Problems Compiling Codelite on Mac (10.6.7)

Posted: Mon Jun 27, 2011 2:22 pm
by eranif
Yes, however, you can get a faster reponse from him if you will join the IRC channel #codelite @ irc.freenode.net

Eran

Re: Problems Compiling Codelite on Mac (10.6.7)

Posted: Mon Jun 27, 2011 3:56 pm
by Roey
OK,

Have been chatting with DavidGH. He wasn't the one breaking configure, but this is what we reckon so far:

Since I'm using the latest Xcode, everything is built 64bit by default. Configure doesn't seem to reflect this.

If I add manually -m32 to the makefile of codelite_indexer, it builds alright and get a Mac Bundle. However, it fails to run for this error:

Code: Select all

Dyld Error Message:
  Library not loaded: ./lib/libpluginud.so
  Referenced from: /Development/codelite/Runtime/CodeLite.app/Contents/MacOS/codelite
  Reason: image not found
When I look into the bundle contents, it doesn't have libpluginud.so in it.

The bundle of the Codelite I just built has: codelite, libwxscintillaud.so, libwxshapeframeworkud.so, libwxsqlite3ud.so
The bundle of the stable Codelite in my apps has: codelite, libcodeliteu.so, libpluginu.so, libwx_macu-2.8.0.dylib, libwxscintillau.so, libwxsqlite3u.so

Still looking into this

Re: Problems Compiling Codelite on Mac (10.6.7)

Posted: Mon Jun 27, 2011 4:08 pm
by Roey
Attached the mac bundle creation - there are some errors and it does reference a few release libraries although I'm trying to build a debug version.

Re: Problems Compiling Codelite on Mac (10.6.7)

Posted: Mon Jun 27, 2011 6:26 pm
by DavidGH
Now for some reason codelite_indexer doesn't get the -m32 option, but I had a look at configure and can't quite work out why...
It seems that, for codelite_indexer and cppchecker, it never did :/

Fixed in trunk.

Regards,

David

Re: Problems Compiling Codelite on Mac (10.6.7)

Posted: Mon Jun 27, 2011 6:42 pm
by Auria
cp: /usr/local/lib/libwx_macud_richtext-2.8.0.dylib: No such file or directory
cp: /usr/local/lib/libwx_macud_aui-2.8.0.dylib: No such file or directory
cp: /usr/local/lib/libwx_macud_xrc-2.8.0.dylib: No such file or directory
cp: /usr/local/lib/libwx_macud_qa-2.8.0.dylib: No such file or directory
cp: /usr/local/lib/libwx_macud_html-2.8.0.dylib: No such file or directory
cp: /usr/local/lib/libwx_macud_adv-2.8.0.dylib: No such file or directory
cp: /usr/local/lib/libwx_macud_core-2.8.0.dylib: No such file or directory
cp: /usr/local/lib/libwx_base_carbonud_xml-2.8.0.dylib: No such file or directory
cp: /usr/local/lib/libwx_base_carbonud_net-2.8.0.dylib: No such file or directory
cp: /usr/local/lib/libwx_base_carbonud-2.8.0.dylib: No such file or directory
It seems like your wxWidgets build was configured to contain the the /usr/local/lib prefix, but you never actually installed it there