Page 1 of 2

[ LINUX / MAC ] codelite is moving to cmake

Posted: Thu Feb 14, 2013 10:39 am
by eranif
Hi,

This post is relevant for Linux / Windows developers who are building codelite from git

codelite is now using cmake as its primary build system.
To build codelite from git, please follow the instructions here:

Building codelite with cmake

Windows build remains the same

Eran

Re: [ LINUX / MAC ] codelite is moving to cmake

Posted: Tue Feb 26, 2013 8:09 pm
by petah
just a FYI, I know the cmake transition is still in progress.

see attached error on Debian Wheezy x64 with no root-installed wx.

-DWX_CONFIG isn't getting picked up in ./sdk/wxsqlite3/CMakeLists.txt and possibly more places. It fetches any installed wx instead.

I started looking at cmake's find_package syntax but found no quick fix (huge cmake cache beats my poor cmake-fu).

thx!

-- p

Re: [ LINUX / MAC ] codelite is moving to cmake

Posted: Tue Feb 26, 2013 8:34 pm
by eranif
I am aware of this bug.
I removed the WX_CONFIG option from the cmake build since the only way to make it work is to hack cmake wxWidgets support, which I don't want to do...

I updated the documentation about this, check the tip at the end of the page that explains how to use a different wx-config tool

http://codelite.org/Developers/Linux

Eran

Re: [ LINUX / MAC ] codelite is moving to cmake

Posted: Tue Feb 26, 2013 8:50 pm
by petah
ok thx.

btw I'm not sure if I get the DMAKE_DEB comment:

"When set, a new make target is created, package. By running make package cmake will generate a .deb file for installation "

Assuming cmake produces the makefie which will produce the deb, would something like this make more sense?

"When set, a new make target is created by cmake, called package. Running make package thereafter will generate a .deb file for installation".

thx!

-- p

Re: [ LINUX / MAC ] codelite is moving to cmake

Posted: Tue Feb 26, 2013 10:19 pm
by eranif
You are correct, fixed

Eran

Re: [ LINUX / MAC ] codelite is moving to cmake

Posted: Wed Jun 26, 2013 2:36 pm
by evstevemd
Is there a way to tell it to use monolithic version instead of multilib?

Code: Select all

/usr/bin/ld: cannot find -lwx_gtk2u_aui-2.9
/usr/bin/ld: cannot find -lwx_gtk2u_propgrid-2.9
/usr/bin/ld: cannot find -lwx_gtk2u_stc-2.9
collect2: error: ld returned 1 exit status
make[2]: *** [lib_debug/libplugin.so] Error 1
make[1]: *** [Plugin/CMakeFiles/plugin.dir/all] Error 2
make: *** [all] Error 2

Re: [ LINUX / MAC ] codelite is moving to cmake

Posted: Fri Jun 28, 2013 12:10 am
by evstevemd
Installed wxWidgets libraries from codelite repos and tried to recompile and here is what I get

Code: Select all

[ 29%] Building CXX object Plugin/CMakeFiles/plugin.dir/tagsmanagementconf.cpp.o
Linking CXX shared library ../lib/libplugin.so
/usr/bin/ld: cannot find -lwx_gtk2u_aui-2.9
/usr/bin/ld: cannot find -lwx_gtk2u_propgrid-2.9
/usr/bin/ld: cannot find -lwx_gtk2u_stc-2.9
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libplugin.so] Error 1
make[1]: *** [Plugin/CMakeFiles/plugin.dir/all] Error 2
make: *** [all] Error 2
I just did

Code: Select all

cmake .
And then just

Code: Select all

make

Re: [ LINUX / MAC ] codelite is moving to cmake

Posted: Fri Jun 28, 2013 8:03 am
by eranif
Looks like that your wx-config is still the old one

The output of codelite's repo wxWidgets should be like this:

Code: Select all

eran@eran-linux:~$ wx-config --libs
-L/usr/lib/x86_64-linux-gnu -pthread   -lwx_gtk2u_unofficial_xrc-2.9 -lwx_gtk2u_unofficial_webview-2.9 -lwx_gtk2u_unofficial_html-2.9 -lwx_gtk2u_unofficial_qa-2.9 -lwx_gtk2u_unofficial_adv-2.9 -lwx_gtk2u_unofficial_core-2.9 -lwx_baseu_unofficial_xml-2.9 -lwx_baseu_unofficial_net-2.9 -lwx_baseu_unofficial-2.9
Note that our wx build contains the 'unofficial' string
You should use update-alternatives command to make sure that your wx-config is pointing to the correct wx-config (for me its /usr/lib/wx/config/gtk2-unicode-2.9-unofficial )
evstevemd wrote:I just did
CODE: SELECT ALL
cmake .

And then just
CODE: SELECT ALL
make
When using cmake, its advised not to pollute the source tree, but rather build in a subdirectory

A typical build should be (assuming you are in the codelite source tree root folder):

Code: Select all

mkdir build-release
cd build-release
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
make -j4
You can read more about this here:
http://codelite.org/Developers/Linux#toc3

Eran

Re: [ LINUX / MAC ] codelite is moving to cmake

Posted: Fri Jun 28, 2013 9:17 am
by evstevemd
Thanks Eran.
My CodeLite repos installation is quiet unstable and crashing (no error just telling me it crashed and running under debugger fails) and so I wanted to check the git version if have the issue fixed (I can run debug version and see the issue).
So this post comes as saver!

Re: [ LINUX / MAC ] codelite is moving to cmake

Posted: Sat Mar 07, 2015 8:11 pm
by eranif
miniboy wrote:Failed to locate gdb! at '/usr/bin/gdb '

/usr/bin/gdb has been installed successfully
But why are you hijacking the announcement thread and change its title??

This bug was already fixed see here for workaround:

https://github.com/eranif/codelite/issues/670