Problems Compiling Codelite on Mac (10.6.7)

Discussion about CodeLite development process and patches
Roey
CodeLite Enthusiast
Posts: 43
Joined: Fri Aug 22, 2008 1:32 am
Contact:

Problems Compiling Codelite on Mac (10.6.7)

Post 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?
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Problems Compiling Codelite on Mac (10.6.7)

Post 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
Make sure you have read the HOW TO POST thread
Roey
CodeLite Enthusiast
Posts: 43
Joined: Fri Aug 22, 2008 1:32 am
Contact:

Re: Problems Compiling Codelite on Mac (10.6.7)

Post 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,
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Problems Compiling Codelite on Mac (10.6.7)

Post 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
Make sure you have read the HOW TO POST thread
Roey
CodeLite Enthusiast
Posts: 43
Joined: Fri Aug 22, 2008 1:32 am
Contact:

Re: Problems Compiling Codelite on Mac (10.6.7)

Post by Roey »

OK Thanks,
Does he check this forum regularly?
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Problems Compiling Codelite on Mac (10.6.7)

Post by eranif »

Yes, however, you can get a faster reponse from him if you will join the IRC channel #codelite @ irc.freenode.net

Eran
Make sure you have read the HOW TO POST thread
Roey
CodeLite Enthusiast
Posts: 43
Joined: Fri Aug 22, 2008 1:32 am
Contact:

Re: Problems Compiling Codelite on Mac (10.6.7)

Post 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
Roey
CodeLite Enthusiast
Posts: 43
Joined: Fri Aug 22, 2008 1:32 am
Contact:

Re: Problems Compiling Codelite on Mac (10.6.7)

Post 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.
You do not have the required permissions to view the files attached to this post.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Problems Compiling Codelite on Mac (10.6.7)

Post 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
Auria
CodeLite Enthusiast
Posts: 26
Joined: Sat Oct 30, 2010 7:19 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Problems Compiling Codelite on Mac (10.6.7)

Post 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
Post Reply