Unable to compile kicad (possible boost error)

Hi guys

I’m trying to install kicad in a Debian Jessie 64 bits system. I downloaded the script kicad-install.sh and when I ran it I found a first error for the documentation that I solved following the instructions suggested by kubatyszko here

Then I ran into this problem:

> [100%] Building CXX object pcbnew/CMakeFiles/pcbnew_kiface.dir/__/common/base_units.cpp.o
> Linking CXX shared module _pcbnew.kiface
> /usr/bin/ld: ../../boost_root/lib/libboost_system.a(error_code.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
> ../../boost_root/lib/libboost_system.a: error adding symbols: Bad value
> collect2: error: ld returned 1 exit status
> pcbnew/CMakeFiles/pcbnew_kiface.dir/build.make:6106: recipe for target 'pcbnew/_pcbnew.kiface' failed
> make[2]: *** [pcbnew/_pcbnew.kiface] Error 1
> CMakeFiles/Makefile2:1313: recipe for target 'pcbnew/CMakeFiles/pcbnew_kiface.dir/all' failed
> make[1]: *** [pcbnew/CMakeFiles/pcbnew_kiface.dir/all] Error 2
> Makefile:137: recipe for target 'all' failed
> make: *** [all] Error 2

I tried to find any information about it. I try to compile it not using the script and just following the instructions and nothing work. Then after googling about issues similar to this one (bad value sort of error) I found information that the problem could be caused because whatever program is trying to be compiled is using libraries built for another architecture. So what I did after reading the MakeFiles and CmakeFiles was modifying the script shell file changing the line like this:

I found the option of skipping boost, which might be the one giving me issues. So i change it like this:

# CMake Options
OPTS="$OPTS -DBUILD_GITHUB_PLUGIN=ON -DKICAD_SKIP_BOOST=ON "       # needed by $

After re running the script shell I was able to install kicad. I think the problem is that somehow when the scripshell compiles boost, it does it for x86 instead of X64, and that is why I ran into errors. It would be great if someone else could check this issue. In the meantime I’m just posting here this workaround

Oh in debian I also installed this package

sudo apt-get install libboost-all-dev