Cant build kicad from source

I can’t seem to get kicad 4.0.7 to build on Mint 18.3 ?

./boost/thread/detail/invoke.hpp:324:100: warning: variadic templates only available with -std=c++11 or -std=gnu++11
invoke(Ret (A::*f)(Args…) volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) …args)
^
./boost/thread/detail/invoke.hpp:329:51: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <class Ret, class A, class A0, class …Args>
^
./boost/thread/detail/invoke.hpp:336:28: warning: variadic templates only available with -std=c++11 or -std=gnu++11
invoke(Ret (A::*f)(Args…) const volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) …args)
^
./boost/thread/detail/invoke.hpp:336:106: warning: variadic templates only available with -std=c++11 or -std=gnu++11
invoke(Ret (A::*f)(Args…) const volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) …args)
^
./boost/thread/detail/invoke.hpp:398:42: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <class Ret, class Fp, class …Args>
^
./boost/thread/detail/invoke.hpp:405:68: warning: variadic templates only available with -std=c++11 or -std=gnu++11
invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(Args) …args)
^
./boost/thread/detail/invoke.hpp:409:32: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <class Ret, class …Args>
^
./boost/thread/detail/invoke.hpp:411:24: warning: variadic templates only available with -std=c++11 or -std=gnu++11
invoke(Ret(*f)(Args… ), BOOST_THREAD_RV_REF(Args) …args)
^
./boost/thread/detail/invoke.hpp:411:60: warning: variadic templates only available with -std=c++11 or -std=gnu++11
invoke(Ret(*f)(Args… ), BOOST_THREAD_RV_REF(Args) …args)
^
In file included from ./boost/bind/bind.hpp:29:0,
from ./boost/bind.hpp:22,
from ./boost/thread/pthread/once_atomic.hpp:19,
from ./boost/thread/once.hpp:20,
from libs/thread/src/pthread/./once_atomic.cpp:9,
from libs/thread/src/pthread/once.cpp:8:
./boost/bind/arg.hpp: In constructor ‘boost::arg::arg(const T&)’:
./boost/bind/arg.hpp:37:22: warning: typedef ‘T_must_be_placeholder’ locally defined but not used [-Wunused-local-typedefs]
typedef char T_must_be_placeholder[ I == is_placeholder::value? 1: -1 ];
^
In file included from ./boost/thread/once.hpp:20:0,
from libs/thread/src/pthread/./once_atomic.cpp:9,
from libs/thread/src/pthread/once.cpp:8:
./boost/thread/pthread/once_atomic.hpp: At global scope:
./boost/thread/pthread/once_atomic.hpp:120:37: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template<typename Function, class …ArgTypes>
^
./boost/thread/pthread/once_atomic.hpp:121:108: warning: variadic templates only available with -std=c++11 or -std=gnu++11
inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)… args)
^
gcc.compile.c++ bin.v2/libs/thread/build/gcc-5.4.0/release/link-static/threading-multi/future.o
In file included from ./boost/thread/future_error_code.hpp:13:0,
from libs/thread/src/future.cpp:10:
./boost/system/error_code.hpp:222:36: warning: ‘boost::system::posix_category’ defined but not used [-Wunused-variable]
static const error_category & posix_category = generic_category();
^
./boost/system/error_code.hpp:223:36: warning: ‘boost::system::errno_ecat’ defined but not used [-Wunused-variable]
static const error_category & errno_ecat = generic_category();
^
./boost/system/error_code.hpp:224:36: warning: ‘boost::system::native_ecat’ defined but not used [-Wunused-variable]
static const error_category & native_ecat = system_category();
^
…skipped <pbin.v2/libs/thread/build/gcc-5.4.0/release/link-static/threading-multi>libboost_thread.a(clean) for lack of <pbin.v2/libs/thread/build/gcc-5.4.0/release/link-static/threading-multi>pthread/thread.o…
…skipped <pbin.v2/libs/thread/build/gcc-5.4.0/release/link-static/threading-multi>libboost_thread.a for lack of <pbin.v2/libs/thread/build/gcc-5.4.0/release/link-static/threading-multi>pthread/thread.o…
…skipped <p/root/kicad-4.0.7/boost_root/lib>libboost_thread.a for lack of <pbin.v2/libs/thread/build/gcc-5.4.0/release/link-static/threading-multi>libboost_thread.a…
…failed updating 2 targets…
…skipped 6 targets…
…updated 10851 targets…
CMakeFiles/boost.dir/build.make:140: recipe for target ‘…/.downloads-by-cmake/boost_1_54_0/src/boost-stamp/boost-build’ failed
make[2]: *** […/.downloads-by-cmake/boost_1_54_0/src/boost-stamp/boost-build] Error 1
CMakeFiles/Makefile2:131: recipe for target ‘CMakeFiles/boost.dir/all’ failed
make[1]: *** [CMakeFiles/boost.dir/all] Error 2
Makefile:149: recipe for target ‘all’ failed
make: *** [all] Error 2

Can you build master from source? (i.e. what will shortly become 5.0rc1)
I’m not sure exactly what is going on in your case, but it looks like it is complaining about lack of c++11 support, which is required for KiCad.

1 Like

Not sure I want to try and build the latest and greatest version as I have a couple of projects I am working on at the moment that have been created with 4.0.7. I am trying to migrate to a new machine.

I am trying to follow this guide:
http://docs.kicad.org/doxygen/md_Documentation_development_compiling.html

I’ve installed wxWidgets-3.0.3 from source, all went ok.

I’ve tried lots of variations on this theme. What I am I doing wrong ? Nothing clever here:

jon-HP-Compaq-Elite-8300-SFF build # gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609

jon-HP-Compaq-Elite-8300-SFF build # g++ --version
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609

jon-HP-Compaq-Elite-8300-SFF root # cd kicad-4.0.7/
jon-HP-Compaq-Elite-8300-SFF kicad-4.0.7 # mkdir build
jon-HP-Compaq-Elite-8300-SFF kicad-4.0.7 # cd build/
jon-HP-Compaq-Elite-8300-SFF build # cmake …/
jon-HP-Compaq-Elite-8300-SFF build # make

Is this correct ?

Then it craps out, as is traditional with c++ I have no f***** idea what it is telling me or why, guess that is why I still write plain C.

Anyone ?

Maybe I’m too simple or something, but I don’t know why you have to build it yourself while it’s available as a package: https://kicad.org/download/linux-mint/

I dont add unknown repos as policy, sorry.
I built it from source on Mint17 so I just pulled the same tar file from my server and assumed it would build on the next version.

As 4.0.7 has been around for some time why is that not available in the distro itself ?

log1 (3.0 KB)
log2 (35.3 KB)

Do you need to build Boost from source? If so, is it possible to use something newer than 1.54? (but I would expect that boost is available in the mint repos to save you the trouble of building it)

Minimum Boost version for master is 1.56, not sure if that applies to 4.0 or not.

As to why it’s not in Mint’s official repos, well you’d have to ask them I guess :slight_smile:

I installed what I though was needed via apt (including boost), but for some reason something in the Makefile has pulled it in as source ?

jon-HP-Compaq-Elite-8300-SFF kicad-4.0.7 # find . |grep ‘boost’ |more
./.downloads-by-cmake/boost_1_54_0.tar.bz2

jon-HP-Compaq-Elite-8300-SFF build # dpkg -l |grep ‘boost’
ii libboost-date-time1.58.0:amd64 1.58.0+dfsg-5ubuntu3.1 amd64 set of date-time libraries based on generic programming concepts
ii libboost-dev:amd64 1.58.0.1ubuntu1 amd64 Boost C++ Libraries development files (default version)
ii libboost-filesystem1.58.0:amd64 1.58.0+dfsg-5ubuntu3.1 amd64 filesystem operations (portable paths, iteration over directories, etc) in C++
ii libboost-iostreams1.58.0:amd64 1.58.0+dfsg-5ubuntu3.1 amd64 Boost.Iostreams Library
ii libboost-system1.58.0:amd64 1.58.0+dfsg-5ubuntu3.1 amd64 Operating system (e.g. diagnostics support) library
ii libboost1.58-dev:amd64 1.58.0+dfsg-5ubuntu3.1 amd64 Boost C++ Libraries development files

Try running cmake with -DKICAD_SKIP_BOOST=ON as one of the arguments, that should tell it to use your system Boost instead of downloading it (sorry I wasn’t familiar with this until I started looking through the CMake file; this has apparently changed a lot since 4.0)

jon-HP-Compaq-Elite-8300-SFF kicad-4.0.7 # rm -rf build
jon-HP-Compaq-Elite-8300-SFF kicad-4.0.7 # mkdir build
jon-HP-Compaq-Elite-8300-SFF kicad-4.0.7 # cd build/
jon-HP-Compaq-Elite-8300-SFF build # cmake -DKICAD_SKIP_BOOST=ON …/
– The C compiler identification is GNU 5.4.0
– The CXX compiler identification is GNU 5.4.0
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Kicad install dir: </usr/local>
– Performing Test GXX_HAS_VISIBILITY_FLAG
– Performing Test GXX_HAS_VISIBILITY_FLAG - Success
– Performing Test GXX_HAS_VISIBILITY_INLINES_FLAG
– Performing Test GXX_HAS_VISIBILITY_INLINES_FLAG - Success
– Looking for malloc.h
– Looking for malloc.h - found
– Looking for iso646.h
– Looking for iso646.h - found
– Looking for stdint.h
– Looking for stdint.h - found
– Looking for strcasecmp
– Looking for strcasecmp - found
– Looking for strncasecmp
– Looking for strncasecmp - found
– Looking for strtok_r
– Looking for strtok_r - found
– Looking for malloc
– Looking for malloc - found
– Looking for math.h
– Looking for math.h - found
– Looking for C++ include cmath
– Looking for C++ include cmath - found
– Looking for asinh
– Looking for asinh - found
– Looking for acosh
– Looking for acosh - found
– Looking for atanh
– Looking for atanh - found
– Performing Test HAVE_CMATH_ISINF
– Performing Test HAVE_CMATH_ISINF - Success
– Looking for clock_gettime in rt
– Looking for clock_gettime in rt - found
– Looking for gettimeofday
– Looking for gettimeofday - found
– Looking for getc_unlocked
– Looking for getc_unlocked - found
– Found wxWidgets: -L/usr/local/lib;-pthread;;;-lwx_gtk2u_gl-3.0;-lwx_gtk2u_aui-3.0;-lwx_gtk2u_adv-3.0;-lwx_gtk2u_html-3.0;-lwx_gtk2u_core-3.0;-lwx_baseu_net-3.0;-lwx_baseu-3.0;-lwx_baseu_xml-3.0;-lwx_gtk2u_stc-3.0 (found suitable version “3.0.3”, minimum required is “3.0.0”)
– Check for installed OpenGL – found
– Found Glew: /usr/lib/x86_64-linux-gnu/libGLEW.so
– Check for installed GLEW – found
– Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version “7.47.0”)
– Found PkgConfig: /usr/bin/pkg-config (found version “0.29.1”)
– Checking for module ‘cairo’
– Found cairo, version 1.14.6
– Found CAIRO: /usr/lib/x86_64-linux-gnu/libcairo.so
– Check for installed Cairo – found
– Looking for pthread.h
– Looking for pthread.h - found
– Looking for pthread_create
– Looking for pthread_create - found
– Found Threads: TRUE
CMake Error at /usr/share/cmake-3.5/Modules/FindBoost.cmake:1677 (message):
Unable to find the requested Boost libraries.

Boost version: 1.58.0

Boost include path: /usr/include

Could not find the following Boost libraries:

      boost_context
      boost_date_time
      boost_filesystem
      boost_iostreams
      boost_locale
      boost_program_options
      boost_regex
      boost_system
      boost_thread

Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
Call Stack (most recent call first):
CMakeLists.txt:587 (find_package)

CMake Error at CMakeLists.txt:591 (message):
Boost 1.54+ libraries are required.

– Configuring incomplete, errors occurred!
See also “/root/kicad-4.0.7/build/CMakeFiles/CMakeOutput.log”.

CMakeOutput.log (60.7 KB)

apt-get install libboost-all-dev ?

That pulled in a chunky set of packages !

Looks promising, build is at 51%, this will take a while.

Did I miss a package or has something changed in the Debian/Ubuntu/Mint packages? I did what I did for the previous Mint version, using the same tar file, but the magic did not happen this time round.

Thanks for the help :slight_smile:

No problem! I don’t know what the deal is with Mint 17 vs 18, but I’m guessing that something changed in Mint 18 that makes Boost 1.54 no longer build (it looks like in KiCad 4.0.7, by default the CMake script will build 1.54). The Boost 1.58 packages you had installed already weren’t the full Boost library set, and so it was missing some things KiCad needs. libbboost-all-dev is just a shortcut around installing the individual Boost libraries that CMake was complaining about.

Might be worth updating the build document.

Maybe just stick “apt-get install libboost-all-dev” as a suggestion for Mint 18 in the “Known Issues” section.

http://docs.kicad.org/doxygen/md_Documentation_development_compiling.html

Build is at 82% now, fingers crossed.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.