Page 1 of 1

[Solved] Building codelite on CentOS

Posted: Thu Jan 22, 2015 1:38 am
by russianfool
So... Codelite doesn't officially support CentOS 6.5, but that's what I'm stuck with, and am trying to build it from source. Additionally, the machine does not have access to a direct line to the outside world, so it's stuck with whatever RPMs and source code I can throw up onto it. I've tried to install as many dependencies as I can (usually building from source), but haven't been able to get libhunspell-dev installed (as far as I can tell). I do have the hunspell.x86_64 package installed, and wxWidget stuff is all sorted.

These are the errors I get during compilation:

Code: Select all

[ 52%] Building CXX object SpellChecker/CMakeFiles/SpellCheck.dir/IHunSpell.cpp.o
/Users/my_user/codelite/SpellChecker/IHunSpell.cpp: In member function 'void IHunSpell::CheckCppSpelling(const wxString&)':
/Users/my_user/codelite/SpellChecker/IHunSpell.cpp:176: error: no matching function for call to 'make_pair(posLen&, IHunSpell::<anonymous enum>)'
/Users/my_user/codelite/SpellChecker/IHunSpell.cpp:185: error: no matching function for call to 'make_pair(posLen&, IHunSpell::<anonymous enum>)'
/Users/my_user/codelite/SpellChecker/IHunSpell.cpp:194: error: no matching function for call to 'make_pair(posLen&, IHunSpell::<anonymous enum>)'
/Users/my_user/codelite/SpellChecker/IHunSpell.cpp:203: error: no matching function for call to 'make_pair(posLen&, IHunSpell::<anonymous enum>)'
/Users/my_user/codelite/SpellChecker/IHunSpell.cpp:212: error: no matching function for call to 'make_pair(posLen&, IHunSpell::<anonymous enum>)'
make[2]: *** [SpellChecker/CMakeFiles/SpellCheck.dir/IHunSpell.cpp.o] Error 1
make[1]: *** [SpellChecker/CMakeFiles/SpellCheck.dir/all] Error 2
make: *** [all] Error 2
Now, this is probably a dependency issue since it can't find the correct headers (or, potentially, a compiler issue if <anonymous enum>s are a C++11 thing).

The closest RPM I can find to try and remedy this is (http://rpmfind.net//linux/RPM/centos/6. ... .i686.html). I have also built and installed hunspell1.3.3 from source, but, once again, I'm not sure if that installs the shared library properly or if this error relates to it.

However, this obviously doesn't work since this is not the dev package. So I come to you guys for advice; is there anything I can try to remedy this issue?

Cheers, and thank you so much for the help.

Re: Building codelite on CentOS

Posted: Thu Jan 22, 2015 2:01 am
by eranif
Your best bet is to disable the spellchecker plugin, open the file CMakeLists.txt from the root folder of codelite sources:
and remove this line:

Code: Select all

add_subdirectory(SpellChecker)

After saving the file, re-run cmake and build codelite again

Eran

Re: Building codelite on CentOS

Posted: Thu Jan 22, 2015 2:33 am
by russianfool
Hi Eran,
I was looking for where to do that. Totally works! Thanks. The next error is a bit harder though, and since it's part of the editor...

Code: Select all

[ 65%] Building CXX object LiteEditor/CMakeFiles/codelite.dir/FilesModifiedDlg.cpp.o
/Users/my_user/codelite/LiteEditor/FilesModifiedDlg.cpp: In member function 'virtual void FilesModifiedDlg::OnChoose(wxCommandEvent&)':
/Users/my_user/codelite/LiteEditor/FilesModifiedDlg.cpp:40: error: no matching function for call to 'FilesModifiedDlg::CallAfter(void (wxDialog::*)(int), FilesModifiedDlgBase::<anonymous enum>)'
/Users/my_user/codelite/LiteEditor/FilesModifiedDlg.cpp: In member function 'virtual void FilesModifiedDlg::OnLoad(wxCommandEvent&)':
/Users/my_user/codelite/LiteEditor/FilesModifiedDlg.cpp:46: error: no matching function for call to 'FilesModifiedDlg::CallAfter(void (wxDialog::*)(int), FilesModifiedDlgBase::<anonymous enum>)'
/Users/my_user/codelite/LiteEditor/FilesModifiedDlg.cpp: In member function 'virtual void FilesModifiedDlg::OnIgnore(wxCommandEvent&)':
/Users/my_user/codelite/LiteEditor/FilesModifiedDlg.cpp:52: error: no matching function for call to 'FilesModifiedDlg::CallAfter(void (wxDialog::*)(int), FilesModifiedDlgBase::<anonymous enum>)'
make[2]: *** [LiteEditor/CMakeFiles/codelite.dir/FilesModifiedDlg.cpp.o] Error 1
make[1]: *** [LiteEditor/CMakeFiles/codelite.dir/all] Error 2
make: *** [all] Error 2
I think I've found the problem though, since it seems to be yelling about more or less the same thing every time... I have gcc 4.4.7 installed, and unnamed fields in templates are only supported past 4.5 by default. Well shit.

Re: Building codelite on CentOS

Posted: Thu Jan 22, 2015 2:41 am
by eranif
You need to upgrade your gcc :P

Eran

Re: Building codelite on CentOS

Posted: Thu Jan 22, 2015 2:50 am
by russianfool
Well, the gcc included with that version of CentOS is a little old, so yum install gcc is out of the question (it happily tells me that gcc is up to date).

Building gcc 4.8 from source, see you in like... 5 hours. http://www.gnu.org/software/gsrc/

Re: Building codelite on CentOS

Posted: Thu Jan 22, 2015 9:24 am
by russianfool
I... well, I'm stuck at a last hurdle. I've built gcc 4.9.1 on the machine (newest branch from the bazar for GSRC), archived all the dependencies, transferred it over to the machine, compiled and installed, set up the proper linking for the libraries.

I've also had to disable lldb support (no big, I like gdb enough), and PHP support (again, no big, since this isn't what my target is).

It's getting stuck at:

Code: Select all

Linking CXX executable ../bin/codelite
/Users/my_user/codelite/build-release/lib/libplugin.so: undefined reference to `wxCommandEvent::Clone() const'
collect2: error: ld returned 1 exit status
This is apparently a known issue in gcc 4.9.1 (https://forums.wxwidgets.org/viewtopic.php?f=19&t=40001). GAAAAAAHHHHH. So now I'm back to square one and have to recompile either gcc 4.8 or gcc 4.9.3.

I think I might go crazy before I get this working.

Re: Building codelite on CentOS

Posted: Thu Jan 22, 2015 4:33 pm
by eranif
I would suggest to use gcc 4.9.3 if possible

Eran

Re: Building codelite on CentOS

Posted: Thu Jan 22, 2015 10:04 pm
by russianfool
I would love to, but gsrc only has 4.9.1 as the latest (4.9.3 isn't in it yet), and building it all the way from source is more of a pain (3 dependencies that you need to build as well) if it'll compile regardless.

Re: Building codelite on CentOS

Posted: Fri Jan 23, 2015 12:36 am
by russianfool
YEAAAAAAAAAAAH. Alright, so everything worked out. Rebuilt gcc 4.8.3, compiled with it, no errors or problems.

Well, had to point my local libstdc++ libraries at the updated ones for gcc 4.8.3, but after that... woo! Time to try it out and see if I like it. Something tells me I should have probably gone and done that first on another machine.