Build fails lack of Cario

Asked by Kevin Angus

Hi, just Git'ed the source from Git, found HOW_TO_CONTRIBUTE.txt and followed the directions installing another source tree but when I tried to build it stopped on Cario. I was looking to add layer support to DXF imports. A search found this issue reported in July.

Question information

Language:
English Edit question
Status:
Solved
For:
KiCad Edit question
Assignee:
No assignee Edit question
Solved by:
Wayne Stambaugh
Solved:
Last query:
Last reply:
Revision history for this message
Wayne Stambaugh (stambaughw) said :
#1
Revision history for this message
Kevin Angus (kangus-m) said :
#2

Scanning dependencies of target gal
[ 37%] Building CXX object common/CMakeFiles/gal.dir/draw_panel_gal.cpp.o
In file included from /home/kevin/kicad.my_contrib/common/draw_panel_gal.cpp:41:0:
/home/kevin/kicad.my_contrib/include/gal/cairo/cairo_gal.h:33:19: fatal error: cairo.h: No such file or di rectory
 #include <cairo.h>
                   ^
compilation terminated.
common/CMakeFiles/gal.dir/build.make:54: recipe for target 'common/CMakeFiles/gal.dir/draw_panel_gal.cpp.o ' failed
make[2]: *** [common/CMakeFiles/gal.dir/draw_panel_gal.cpp.o] Error 1
CMakeFiles/Makefile2:414: recipe for target 'common/CMakeFiles/gal.dir/all' failed
make[1]: *** [common/CMakeFiles/gal.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2
kevin@debian:~/kicad.my_contrib/build/release$ Scanning dependencies of target gal
-bash: Scanning: command not found
kevin@debian:~/kicad.my_contrib/build/release$ [ 37%] Building CXX object common/CMakeFiles/gal.dir/draw_panel_gal.cpp.o
-bash: [: missing `]'
kevin@debian:~/kicad.my_contrib/build/release$ In file included from /home/kevin/kicad.my_contrib/common/draw_panel_gal.cpp:41:0:
-bash: In: command not found

This is what was installed: note: the high level look at what is needed, needs the actual names to install listed somewhere.

 bzr bzrtools build-essential cmake cmake-curses-gui debhelper doxygen dpatch libx11-dev
 grep libbz2-dev libcairo2-dev libglew-dev libglm-dev libssl-dev libwxgtk3.0-dev python-dev
 python-wxgtk3.0-dev swig libglu1-mesa-dev libgl1-mesa-dev mesa-common-dev libboost-dev fakeroot

the file /usr/include/cairo/cairo.h exists on this computer.

can't build from HOW_TO_CONTRIBUTE.txt
can't build from
http://ci.kicad-pcb.org/job/kicad-doxygen/ws/Documentation/doxygen/html/md_Documentation_development_compiling.html

I must be missing several steps.

Revision history for this message
Kevin Angus (kangus-m) said :
#3

libcairo2-dev fixed the Cairo errors but I didn't fix the cmake script I'd altered while trouble shooting. I tracked that down and now I'm dying at 46% :

Linking CXX shared module _cvpcb.kiface
/usr/bin/ld: ../../../boost_root/lib/libboost_filesystem.a(path.o): relocation R_X86_64_32S against `_ZNSs4_Rep20_S_empty_rep_storageE' can not be used when making a shared object; recompile with -fPIC
../../../boost_root/lib/libboost_filesystem.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
cvpcb/CMakeFiles/cvpcb_kiface.dir/build.make:762: recipe for target 'cvpcb/_cvpc b.kiface' failed
make[2]: *** [cvpcb/_cvpcb.kiface] Error 1
CMakeFiles/Makefile2:840: recipe for target 'cvpcb/CMakeFiles/cvpcb_kiface.dir/a ll' failed
make[1]: *** [cvpcb/CMakeFiles/cvpcb_kiface.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2
kevin@debian:~/kicad.my_contrib/build/release$

Revision history for this message
Wayne Stambaugh (stambaughw) said :
#4

Install Boost C++ libraries on your system. Use the meta package that installs all of Boost rather than attempt to install each individual piece of Boost. Configure your build with -DKICAD_SKIP_BOOST=ON.

Revision history for this message
Maciej Suminski (orsonmmz) said :
#5

I advise adding '-DKICAD_SKIP_BOOST=ON` to the cmake command.

Revision history for this message
Kevin Angus (kangus-m) said :
#6

apt-get install libboost-all-dev
installed 1.55
and:
CMake Warning at CMakeLists.txt:480 (message):

  WARNING: You decided to skip building boost library.

  KiCad developers strongly advise you to build the bundled boost library, as
  it is known to work with KiCad.

  Other versions may contain bugs that may result in KiCad errors.

I hate to say it but somebody needs to walk through a newbe install, the files in the root are dated 2012 (change.log) the scripts and install guides are all different and the web documentation is from a level of 60 stories or so: bzr branch lp:repo_to_branch which failed with-> bzr branch lp:kicad
$ bzr branch lp:kicad
Permission denied (publickey).
ConnectionReset reading response for 'BzrDir.open_2.1', retrying
Permission denied (publickey).
bzr: ERROR: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist.
kevin@debian:~/test$

it worked yesterday

Another thing I noticed where is the version file? How to I know what source version I have?

I did get boost 1.6 installed on windows 10 with Visual Studio 15 but the Centos install failed with->
[Kevin@server ~]$ bzr branch lp:kicad kicad.bzr
bzr: ERROR: exceptions.TypeError: readline() takes exactly 1 argument (2 given)

Revision history for this message
Best Wayne Stambaugh (stambaughw) said :
#7

On 12/21/2015 4:31 PM, Kevin Angus wrote:
> Question #279758 on KiCad changed:
> https://answers.launchpad.net/kicad/+question/279758
>
> Kevin Angus posted a new comment:
> apt-get install libboost-all-dev
> installed 1.55
> and:
> CMake Warning at CMakeLists.txt:480 (message):
>
>
> WARNING: You decided to skip building boost library.
>
> KiCad developers strongly advise you to build the bundled boost library, as
> it is known to work with KiCad.
>
> Other versions may contain bugs that may result in KiCad errors.
>
> I hate to say it but somebody needs to walk through a newbe install, the files in the root are dated 2012 (change.log) the scripts and install guides are all different and the web documentation is from a level of 60 stories or so: bzr branch lp:repo_to_branch which failed with-> bzr branch lp:kica

Newbies really shouldn't be building from source. If you are a user,
you should be using either release or nightly builds from the kicad
website. If you are a developer, kicad has a very steep learning curve.
 It is a large project that requires a high level of development skill.

> $ bzr branch lp:kicad
> Permission denied (publickey).
> ConnectionReset reading response for 'BzrDir.open_2.1', retrying
> Permission denied (publickey).
> bzr: ERROR: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist.
> kevin@debian:~/test$
>
> it worked yesterday

It sounds like a bzr configuration error.

>
> Another thing I noticed where is the version file? How to I know what
> source version I have?

It's generated a build time from the repo information.

>
> I did get boost 1.6 installed on windows 10 with Visual Studio 15 but the Centos install failed with->

Visual studio is not supported. Use msys2/mingw32 or msys2/mingw64 on
windows.

> [Kevin@server ~]$ bzr branch lp:kicad kicad.bzr
> bzr: ERROR: exceptions.TypeError: readline() takes exactly 1 argument (2 given)
>

Revision history for this message
Kevin Angus (kangus-m) said :
#8

sudo apt-get install bzr bzrtools build-essential cmake cmake-curses-gui debhelper doxygen dpatch libx11-dev grep libbz2-dev libcairo2-dev libglew-dev libglm-dev libssl-dev libwxgtk3.0-dev python-dev python-wxgtk3.0-dev swig libglu1-mesa-dev libgl1-mesa-dev mesa-common-dev libboost-dev fakeroot libboost-all-dev

git clone https://github.com/KiCad/kicad-source-mirror kicadsrc
cd kicadsrc
mkdir -p build/release
mkdir build/debug
cd build/release

cmake -DCMAKE_BUILD_TYPE=Release \
      -DKICAD_SCRIPTING=ON \
      -DKICAD_SCRIPTING_MODULES=ON \
      -DKICAD_SKIP_BOOST=ON \
      ../../
make
sudo make install

bzr died so the retrieval of source is git
Thanks for the help!

Revision history for this message
Kevin Angus (kangus-m) said :
#9

Thanks Wayne Stambaugh, that solved my question.