Building CodeLite in RHEL 6

CodeLite installation/troubleshooting forum
althorz
CodeLite Curious
Posts: 4
Joined: Sun Feb 23, 2014 11:10 pm
Genuine User: Yes
IDE Question: C++
Contact:

Building CodeLite in RHEL 6

Post by althorz » Sun Feb 23, 2014 11:26 pm

Hi,

I'm facing some issue when building codelite in RHEL 6.

- codelite 5.4
- trying to compile/build codelite in RHEL 6
- RHEL 6 (2.6.32-431.5.1.el6.x86_64)
- gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)

Code: Select all

In file included from /root/src/codelite/codelite/CodeLite/compiler_command_line_parser.cpp:1:
/root/src/codelite/codelite/CodeLite/compiler_command_line_parser.h:28: error: ISO C++ forbids declaration of âwxFileNameâ with no type
/root/src/codelite/codelite/CodeLite/compiler_command_line_parser.h:28: error: expected â,â or â...â before â&â token
/root/src/codelite/codelite/CodeLite/compiler_command_line_parser.cpp: In constructor âCompilerCommandLineParser::CompilerCommandLineParser(const wxString&, const wxString&)â:
/root/src/codelite/codelite/CodeLite/compiler_command_line_parser.cpp:168: error: no matching function for call to âCompilerCommandLineParser::AddIncludesFromFile(wxFileName&)â
/root/src/codelite/codelite/CodeLite/compiler_command_line_parser.h:28: note: candidates are: void CompilerCommandLineParser::AddIncludesFromFile(int)
/root/src/codelite/codelite/CodeLite/compiler_command_line_parser.cpp: At global scope:
/root/src/codelite/codelite/CodeLite/compiler_command_line_parser.cpp:272: error: prototype for âvoid CompilerCommandLineParser::AddIncludesFromFile(const wxFileName&)â does not match any in class âCompilerCommandLineParserâ
/root/src/codelite/codelite/CodeLite/compiler_command_line_parser.h:28: error: candidate is: void CompilerCommandLineParser::AddIncludesFromFile(int)
I suspect it to be an issue with not able to get the header file in wx/string.h but I'm not sure how to test it with cmake. I've compiled and installed wxWidgets with no error and use -DWITH_WXPATH=<dir of wxWidgets>/bin for cmake command.

Code: Select all

wx-config --cppflags
-I/apps/wxWidgets/lib/wx/include/gtk2-unicode-3.0 -I/apps/wxWidgets/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__

Code: Select all

wx-config --cflags
-I/apps/wxWidgets/lib/wx/include/gtk2-unicode-3.0 -I/apps/wxWidgets/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread
Any advises are appreciated. [Other than replacing RHEL with Ubuntu/Fedora variant :D ]

Cheers~

DavidGH
CodeLite Plugin
Posts: 635
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Building CodeLite in RHEL 6

Post by DavidGH » Sun Feb 23, 2014 11:55 pm

Hi,

My first instinct is to suggest you try building as a normal user under $HOME, if that's possible, rather than in /root/ (presumably as superuser).

Otherwise, is that error more-or-less the first thing that happens when you start building, or have lots of other bits of the build already succeeded? If the latter, there can't be anything too wrong with your system or wx installation.

FWIW, I know people have succeeded with CL 5.4 on CentOS...

Regards,

David

User avatar
eranif
CodeLite Plugin
Posts: 6055
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Building CodeLite in RHEL 6

Post by eranif » Mon Feb 24, 2014 12:16 am

DavidGH wrote:FWIW, I know people have succeeded with CL 5.4 on CentOS
He is building head
I can tell by the error he got - its a function I added 2 days ago...
Now, since I build with PCH I miss this kind of errors - it should be fixed in git head

Eran
Make sure you have read the HOW TO POST thread

althorz
CodeLite Curious
Posts: 4
Joined: Sun Feb 23, 2014 11:10 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Building CodeLite in RHEL 6

Post by althorz » Mon Feb 24, 2014 2:44 am

Hi,

Thank! The issue is fixed with the added header. But I got another error in the same file:

Code: Select all

[  6%] Building CXX object CodeLite/CMakeFiles/libcodelite.dir/compiler_command_line_parser.cpp.o
/root/src/codelite/codelite/CodeLite/compiler_command_line_parser.cpp: In member function âvoid CompilerCommandLineParser::AddIncludesFromFile(const wxFileName&)â:
/root/src/codelite/codelite/CodeLite/compiler_command_line_parser.cpp:274: error: variable âwxFFile fpâ has initializer but incomplete type
make[2]: *** [CodeLite/CMakeFiles/libcodelite.dir/compiler_command_line_parser.cpp.o] Error 1
make[1]: *** [CodeLite/CMakeFiles/libcodelite.dir/all] Error 2
make: *** [all] Error 2
The offending line should be:

Code: Select all

    wxFFile fp( includeFile.GetFullPath(), "rb" );
I've added the line:

Code: Select all

#include <wx/ffile.h>
in compiler_command_line_parser.h as you have done before and it seems to be compiling.

Will update if I see some errors again.

Cheers~

User avatar
eranif
CodeLite Plugin
Posts: 6055
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Building CodeLite in RHEL 6

Post by eranif » Mon Feb 24, 2014 2:49 am

Thanks, git head is updated

Eran
Make sure you have read the HOW TO POST thread

althorz
CodeLite Curious
Posts: 4
Joined: Sun Feb 23, 2014 11:10 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Building CodeLite in RHEL 6

Post by althorz » Mon Feb 24, 2014 4:11 am

Update:

In Plugin/compilation_database.h add:

Code: Select all

#include <wx/dir.h>
In Plugin/DiffSideBySidePanel.h add:

Code: Select all

#include <wx/menu.h>
Still compiling...

althorz
CodeLite Curious
Posts: 4
Joined: Sun Feb 23, 2014 11:10 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Building CodeLite in RHEL 6

Post by althorz » Mon Feb 24, 2014 7:13 am

Compiled successfully and executed nicely.

Thank you for the work.

Cheers~

User avatar
eranif
CodeLite Plugin
Posts: 6055
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Building CodeLite in RHEL 6

Post by eranif » Mon Feb 24, 2014 10:33 am

Done. Thanks
Eran
Make sure you have read the HOW TO POST thread

Post Reply