News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Unable to compile ClangCompletion cbplugin

Started by astrapi, March 19, 2016, 01:34:36 AM

Previous topic - Next topic

astrapi

Ok, so I think I understand some part of you say.
But what is a NOPCH patch ?

You said  you have the newer version of wxWidgets3.0.x so does that mean that your codeblocks is built with too ?
(The computer can't use an older version for a software and a new for an other does he ?)


✔ astrapi 14:47:00 ~ ▶ wx-config --libs all
-L/usr/lib/x86_64-linux-gnu -pthread   -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_stc-3.0 -lwx_gtk2u_richtext-3.0 -lwx_gtk2u_ribbon-3.0 -lwx_gtk2u_propgrid-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_gl-3.0 -lwx_gtk2u_media-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0
✔ astrapi 14:47:18 ~ ▶

Does this not mean I'm yousing wxWidgets3.0 ?

But I know that my codeblocks is using wxWidgets2.8.x :

✔ astrapi 14:47:18 ~ ▶ codeblocks -v
Starting Code::Blocks Release 16.01  rev 10760 Feb  2 2016, 03:11:29 - wx2.8.12 (Linux, unicode) - 64 bit


I'm a bit confuse... If you don't want explain me no problem, I will do what you say I understand.

You add an answere during my righting, I try to built later (if I have to, I don't understand very well sorry...)

oBFusCATed

To build the plugin you need to built it against the wx2.8.
To do so you need to install the dev/devel package for wxgtk 2.8.
Obviously you have the runtime wxgtk-2.8 packages. You just need to install the development packages.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

astrapi

Ok I'll try this in a moment ! Thanks everybody !

astrapi

#18
Arh ! I'm surely miss something...

I've install libwxgtk2.8-dev, so now I-ve got the header files, I remove the `wx-config --cflags` because I've
got the gtk3.0 install so it gives only include for it. And put by hand the flags and include that I think is needed.
(I hope this plugin is very good....)

I try to built it again... and got the same error (maybe it's normal I've just don't understand somethingsss ?)


-------------- Build: default in clanglib  wx2.8.x - Unix (compiler: GNU GCC Compiler)---------------

g++-5 -I/usr/include/codeblocks -I/usr/include/codeblocks/tinyxml -I/usr/include/codeblocks/scripting/include -I/usr/include/codeblocks/scripting/bindings -I/usr/include/codeblocks/scripting/sqplus -I/usr/include/codeblocks/wxscintilla/include -DBUILDING_PLUGIN -DNOPCH -Wextra -Wall -std=c++0x -ansi -fPIC /home/astrapi/.lib/codeBlocks -I/usr/lib/llvm-3.4/include -fmessage-length=0 -fexceptions -Winvalid-pch -pthread -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -DcbDEBUG -Wall -std=c++11 -std=c++14 -D__GXX_EXPERIMENTAL_CXX0X__ -I/usr/include/codeblocks -I/usr/include/wx-2.8/ -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8/ -I/usr/include/codeblocks/wxscintilla/include/ -c /home/astrapi/.lib/codeBlocks/ClangLib-build-tim_s/clangccsettingsdlg.cpp -o .objs/plugins/clanglib/clangccsettingsdlg.o
In file included from /home/astrapi/.lib/codeBlocks/ClangLib-build-tim_s/translationunit.h:5:0,
                 from /home/astrapi/.lib/codeBlocks/ClangLib-build-tim_s/clangproxy.h:11,
                 from /home/astrapi/.lib/codeBlocks/ClangLib-build-tim_s/clangplugin.h:9,
                 from /home/astrapi/.lib/codeBlocks/ClangLib-build-tim_s/clangccsettingsdlg.cpp:39:
/usr/include/clang-c/Documentation.h:40:3: error: conflicting declaration 'typedef struct CXComment CXComment'
} CXComment;
   ^
In file included from /home/astrapi/.lib/codeBlocks/ClangLib-build-tim_s/translationunit.h:4:0,
                 from /home/astrapi/.lib/codeBlocks/ClangLib-build-tim_s/clangproxy.h:11,
                 from /home/astrapi/.lib/codeBlocks/ClangLib-build-tim_s/clangplugin.h:9,
                 from /home/astrapi/.lib/codeBlocks/ClangLib-build-tim_s/clangccsettingsdlg.cpp:39:
/usr/lib/llvm-3.4/include/clang-c/Index.h:2149:3: note: previous declaration as 'typedef struct CXComment CXComment'
} CXComment;


What do I miss ?


oBFusCATed

It seems that you have two different versions of clang/llvm.
Is this the case?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

astrapi

#20
Maybe it is right because I built it and install it with apt-get (because the making didn't make me a .so I think)...
How can I remove something that I built ? I've make a little mess I think...

That's right I've llvm-3.4 AND 3.8 installed but the .so is 3.8, or maybe there is only clang witch is doubled but not
llvm that I only find in 3.4... If that make a sense... ( :-[ )

oBFusCATed

It depends how you've installed it.
You can use either make uninstall or rm -rf /path/where/it/is installed.
If you use the second you should be very careful what you delete!
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

astrapi

#22
I've kept the folder where is the source of llvm 3.8 but make uninstall doesn't work...
I'm a bit afraid of rm things but I'm on it

I've remove the files that I was 3.8.0 but the error remain (surely problem of lib that I didn't delete) Maybe I remove
everythink about clang and llvm and reinstall it from apt-get ?

oBFusCATed

Quote from: astrapi on March 20, 2016, 07:14:50 PM
Maybe I remove everythink about clang and llvm and reinstall it from apt-get ?
This is a good option.
Also keep in mind that you have to restart cb after you fiddle with packages that change the output of pkg-config/wx-config or llvm-config.
This is needed because cb caches the output of such tools and doesn't execute them each time.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

astrapi

#24
Haaaa very good to know that indeed, I'm on it ! Thanks ! (I feel that we are going the right way !)


I still have something I don't understand :
-------------- Build: default in clanglib  wx2.8.x - Unix (compiler: GNU GCC Compiler)---------------

g++-5 -shared -L/usr/lib .objs/plugins/clanglib/cclogger.o .objs/plugins/clanglib/clangcc.o .objs/plugins/clanglib/clangccsettingsdlg.o .objs/plugins/clanglib/clangdiagnostics.o .objs/plugins/clanglib/clangplugin.o .objs/plugins/clanglib/clangproxy.o .objs/plugins/clanglib/clangtoolbar.o .objs/plugins/clanglib/tokendatabase.o .objs/plugins/clanglib/translationunit.o .objs/plugins/clanglib/treemap.o  -o devel/clanglib.so /usr/lib/llvm-3.4/lib -Wl,--no-undefined -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -lcodeblocks    -lcodeblocks -lclang
/usr/bin/ld: ne peut pas trouver /usr/lib/llvm-3.4/lib: Format de fichier non reconnu
/usr/bin/ld: ne peut trouver -lclang
collect2: error: ld returned 1 exit status


I've reinstall clang clang-dev llvm llvm-dev

/usr/lib/llvm-3.4/lib exist, there is lot of file in it, some .so and some .a

astrapi

It's impossible to built...  :'( I just can't do it  :'( I go to sleep, I'll be back !

yvesdm3000

I also never tried against LLVM 3.4, only LLVM 3.6 (Centos5) and LLVM 3.8 (Centos7, Ubuntu 15.10 and Debian Stretch)

Yves
Clang based code completion for Code::Blocks:   [url="http://github.com/yvesdm3000/ClangLib"]http://github.com/yvesdm3000/ClangLib[/url]

astrapi

#27
So !

I've mange to built the clanglib_wxGTK30-unix.cbp from tim_s.

But I have no .cbplugin out. I've no error when I built but this when I run :



-------------- Build: use_pch in clanglib  wx3.0.x - Unix (compiler: GNU GCC Compiler)---------------

Target is up to date.
Nothing to be done (all items are up-to-date).


-------------- Run: use_pch in clanglib  wx3.0.x - Unix (compiler: GNU GCC Compiler)---------------

Checking for existence: /home/astrapi/.lib/codeBlocks/ClangLib-build-tim_s/devel30/libclanglib.so
Executing: ./codeblocks --debug-log --multiple-instance -ns -ni -v -p debug (in /home/astrapi/.lib/codeBlocks/ClangLib-build-tim_s/.)
Process terminated with status 255 (0 minute(s), 0 second(s))


But maybe it's useless because my codeblocks using wx2.8 ?

I've even sucessfully build the clanglib (unix).cbp from Clang-lib master ! (thanks to all your information) but I've
nothing happening after... I miss something... (in release I have my liblcanglib.so but no .cbplugin)

yvesdm3000

There is no .cbplugin file created as part of this build process.
You'll have to install the plugin manually by copying the libclanglib.so to

$CODEBLOCKSDIR/lib/codeblocks/plugins

and also the zipfile to
$CODEBLOCKSDIR/share/codeblocks

$CODEBLOCKSDIR is probably /usr/local for you, or wherever you've installed codeblocks.

BEWARE: I would be very much surprised that the plugin will work if you've compiled it with wxGTK3.0 and if codeblocks is compiled with wxGTK2.8

Yves
Clang based code completion for Code::Blocks:   [url="http://github.com/yvesdm3000/ClangLib"]http://github.com/yvesdm3000/ClangLib[/url]

astrapi

Okayyyyyyyy (how can I know that ?)

And it works !!!!!!!!!!! You are all so great !!!!  ;D ;D ;D ;D ;D

Thanks everybody !

I learn lot of things  :D