Page 1 of 1

Building CodeLite in RHEL 6

Posted: Sun Feb 23, 2014 11:26 pm
by althorz
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~

Re: Building CodeLite in RHEL 6

Posted: Sun Feb 23, 2014 11:55 pm
by DavidGH
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

Re: Building CodeLite in RHEL 6

Posted: Mon Feb 24, 2014 12:16 am
by eranif
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

Re: Building CodeLite in RHEL 6

Posted: Mon Feb 24, 2014 2:44 am
by althorz
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~

Re: Building CodeLite in RHEL 6

Posted: Mon Feb 24, 2014 2:49 am
by eranif
Thanks, git head is updated

Eran

Re: Building CodeLite in RHEL 6

Posted: Mon Feb 24, 2014 4:11 am
by althorz
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...

Re: Building CodeLite in RHEL 6

Posted: Mon Feb 24, 2014 7:13 am
by althorz
Compiled successfully and executed nicely.

Thank you for the work.

Cheers~

Re: Building CodeLite in RHEL 6

Posted: Mon Feb 24, 2014 10:33 am
by eranif
Done. Thanks
Eran