Building Codelite on OpenIndiana/Illumos

CodeLite installation/troubleshooting forum
sleary78
CodeLite Curious
Posts: 9
Joined: Fri Oct 25, 2013 12:08 pm
Genuine User: Yes
IDE Question: C++
Contact:

Building Codelite on OpenIndiana/Illumos

Post by sleary78 » Fri Oct 25, 2013 6:02 pm

Hi,

I'm trying to build codelite on OpenIndiana (Illumos)

i have built wxWidgets 2.9.5 and installed without issue. It seems to not be very happy with the _U functions. Any help appreciated.


[ 8%] Building CXX object CodeLite/CMakeFiles/libcodelite.dir/cpp_comment_creator.cpp.o
cd /home/sleary/SVNWork/codelitegit/build-release/CodeLite && /opt/gcc/4.4.4/bin/c++ -DINSTALL_DIR=\"/usr/share/codelite\" -DNDEBUG -DPLUGINS_DIR=\"/usr/lib/codelite\" -DWXUSINGDLL -DWXUSINGDLL_WXSQLITE3 -DYY_NEVER_INTERACTIVE=1 -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D__WXGTK__ -Dlibcodelite_EXPORTS -O2 -pthreads -fPIC -isystem /usr/local/lib/wx/include/gtk2-unicode-2.9 -isystem /usr/local/include/wx-2.9 -I/home/sleary/SVNWork/codelitegit/sdk/wxsqlite3/include -I/home/sleary/SVNWork/codelitegit/sdk/codelite_indexer/network -I/home/sleary/SVNWork/codelitegit/PCH -o CMakeFiles/libcodelite.dir/cpp_comment_creator.cpp.o -c /home/sleary/SVNWork/codelitegit/CodeLite/cpp_comment_creator.cpp
/home/sleary/SVNWork/codelitegit/CodeLite/cpp_comment_creator.cpp: In member function ‘wxString CppCommentCreator::FunctionComment()’:
/home/sleary/SVNWork/codelitegit/CodeLite/cpp_comment_creator.cpp:78: error: ‘1’ cannot be used as a function
/home/sleary/SVNWork/codelitegit/CodeLite/cpp_comment_creator.cpp:88: error: ‘1’ cannot be used as a function
/home/sleary/SVNWork/codelitegit/CodeLite/cpp_comment_creator.cpp:89: error: ‘1’ cannot be used as a function
make[2]: *** [CodeLite/CMakeFiles/libcodelite.dir/cpp_comment_creator.cpp.o] Error 1
make[2]: Leaving directory `/home/sleary/SVNWork/codelitegit/build-release'
make[1]: *** [CodeLite/CMakeFiles/libcodelite.dir/all] Error 2
make[1]: Leaving directory `/home/sleary/SVNWork/codelitegit/build-release'
make: *** [all] Error 2

Some system info...

sleary@openindiana:~/SVNWork/codelitegit/build-release$ uname -a
SunOS openindiana 5.11 oi_151a8 i86pc i386 i86pc Solaris
sleary@openindiana:~/SVNWork/codelitegit/build-release$ gcc --version
gcc (Illumos gcc-4.4.4-il-3) 4.4.4
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

sleary@openindiana:~/SVNWork/codelitegit/build-release$ g++ --version
g++ (Illumos gcc-4.4.4-il-3) 4.4.4
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

sleary@openindiana:~/SVNWork/codelitegit/build-release$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-pc-solaris2.11

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

Re: Building Codelite on OpenIndiana/Illumos

Post by DavidGH » Fri Oct 25, 2013 6:25 pm

Hi,

See this thread.
(It's now also defined in the generated file lex.yy.cpp.)

Regards,

David

sleary78
CodeLite Curious
Posts: 9
Joined: Fri Oct 25, 2013 12:08 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Building Codelite on OpenIndiana/Illumos

Post by sleary78 » Fri Oct 25, 2013 7:41 pm

Awesome. Thankyou.

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

Re: Building Codelite on OpenIndiana/Illumos

Post by DavidGH » Fri Oct 25, 2013 8:53 pm

No problem.

It would be great if you could report back on how you get on. So when, in another 2 years, the remaining OpenIndiana user asks... ;)

sleary78
CodeLite Curious
Posts: 9
Joined: Fri Oct 25, 2013 12:08 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Building Codelite on OpenIndiana/Illumos

Post by sleary78 » Fri Oct 25, 2013 11:39 pm

Will do. I didnt manage to get it to work yet but i think i might need to start from scratch with the source build as things are in a bad state.

If i figure out how to produce a pkg i'll post it up somewhere.

S.

sleary78
CodeLite Curious
Posts: 9
Joined: Fri Oct 25, 2013 12:08 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Building Codelite on OpenIndiana/Illumos

Post by sleary78 » Sun Oct 27, 2013 4:20 pm

Ok so this isnt a simple deal..

First thing i did was build and install wxWidgets and libssh.

Then i checked out codelite and renamed _U and _C codelite macros to _CLU and _CLC repectively. This got me a long way (I recommend making this change to CodeLite in general because _U and _C arent safe things to have as application macros).

Next I had to add openpty implementations because this isnt standard unix (sigh). I swiped this code from qemu-char.c which does the same thing. As a hack i just copied and pasted this

I had to do a similar thing for file locks in codelite_indexer because the implementations are different on different unices.. I picked up the code from ...

http://www.perkin.org.uk/posts/solaris- ... flock.html

I had to add this define also to get this to build

I had to add semaphore.h and #define NAMED_SEMAPHORES

I also had to prebuild clang and install it. CodeLite really didnt like wxWidgets being installed in /usr/local/lib so i had to move that to /usr/lib....

I now have a working but unstable version of codelite.

Codelite assumes the existence of addr2line which isnt in every binutils distribution :(. I recommend adding a check for it or some such warning.

When i try to debug anything i get the message

"Failed to locate the configured and default terminal application required by CodeLite, please install it or check your configuration!"

But this has been configured already in the editor settings as /usr/bin/codelite_xterm ... so the message is confusing.

sleary78
CodeLite Curious
Posts: 9
Joined: Fri Oct 25, 2013 12:08 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Building Codelite on OpenIndiana/Illumos

Post by sleary78 » Sun Oct 27, 2013 4:28 pm

quick update.. addr2line needs to be set to gaddr2line. Not figured out if there is an easy way to do that yet.

sleary78
CodeLite Curious
Posts: 9
Joined: Fri Oct 25, 2013 12:08 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Building Codelite on OpenIndiana/Illumos

Post by sleary78 » Sun Oct 27, 2013 4:54 pm

bit of a hunt for addr2line and its not in codelite. Only reference i found to it is in cmake. Perhaps thats whats caused that issue? I had to rebuild cmake too as OpenIndiana ships with CMake 2.6

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

Re: Building Codelite on OpenIndiana/Illumos

Post by DavidGH » Mon Oct 28, 2013 1:45 pm

codelite_xterm is just a wrapper script for calling 'xterm', so check you have that installed.

Though, having said that:
"Failed to locate the configured and default terminal application required by CodeLite, please install it or check your configuration!"
sounds more as though it can't find the script itself...

Post Reply