Building with Boost >= 1.6.1


#1

Hello,

I’m running Debian Squeeze which ships with Boost 1.6.2. On the KiCAD source page it says:

KiCad 4.0.5 cannot be compiled with boost 1.61 and higher since the latter requires C++11. If you insist to use boost 1.61 and higher, you can apply this patch manually and compile with a C++11 capable compiler and its appropriate compiler switches.

I have KiCAD version 4.0.5 on all my other machines and would like to bring this one up to date. Unfortunately I’m not sufficiently up on C++ compiler stuff to know what do to accomplish “compile with a C++11 capable compiler and its appropriate compiler switches.” I’ve applied the patch with

patch -p1 < boost-1.61.patch

but not sure where to go from here.

If I run configure and make, make fails with

pcbnew/github/CMakeFiles/github_plugin.dir/build.make:62: recipe for target 
'pcbnew/github/CMakeFiles/github_plugin.dir/github_plugin.cpp.o' failed
make[2]: *** [pcbnew/github/CMakeFiles/github_plugin.dir/github_plugin.cpp.o] Error 1
CMakeFiles/Makefile2:1763: recipe for target 'pcbnew/github/CMakeFiles/github_plugin.dir/all' failed
make[1]: *** [pcbnew/github/CMakeFiles/github_plugin.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Not sure what the actual error associated with that is, but there’s lots of warnings to do with boost headers, mainly deprecated autoptrs. There are actual errors associated with some SSL stuff, which I’ve attached in a separate file, since there’s quite a lot of them. kicad-build-errors (34.7 KB)

Can someone provide advice on how I correctly compile from source on my system?


#2

FWIW you might try clang instead of gcc - IIRC clang gives better error messages.


#3

What parameters did you pass to cmake? Unless you really want the github plugin, you can disable it by passing -DBUILD_GITHUB_PLUGIN=OFF

(See http://docs.kicad-pcb.org/doxygen/md_Documentation_development_compiling.html)


#4

Standard parameters for CMAKE, as per the source page:

-DCMAKE_BUILD_TYPE=Release -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_WXPYTHON=ON

I don’t actually use the Github plugin generally, but I’d prefer to build with it as that’s the default. I’ll try it anyway and post the results.


#5

Is that just a case of passing

-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++

to cmake, or is it more involved than that?