Trying a master compile

Set KicadScripting in that file (Line 65, 69, 77) OFF but cmake reports:

jv@JamesWebb:~/kicad/build/debug$ cmake -DCMAKE_BUILD_TYPE=Release ../../
-- KiCad install dir: </usr/local>
-- Check for installed GLEW -- found
-- Boost version: 1.65.1
-- Check for installed Python Interpreter -- found
-- Python module install path: lib/python2.7/dist-packages
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named wx
CMake Error at CMakeModules/FindwxPython.cmake:52 (message):
  wxPython/Phoenix does not appear to be installed on the system
Call Stack (most recent call first):
  CMakeLists.txt:780 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/jv/kicad/build/debug/CMakeFiles/CMakeOutput.log".
jv@JamesWebb:~/kicad/build/debug$ 

Is there any copy for editing in the build dir in use ?

You should pass it on the command line rather than editing the file, like -DKICAD_SCRIPTING=OFF after the -DCMAKE_BUILD_TYPE=Release. IIRC you might also need -DKICAD_SCRIPTING_WXPYTHON=OFF

2 Likes

Wow: Make with full compile went through below one hour, install and invoking Kicad also successful. Once I have this on my laptop I can register to the Friday workshop of @Seth_h ā€¦

2 Likes

Cool! See you there :slight_smile:

Up on now, there is no luck with my laptop.
The apt tool cannot find the ppa personal archive.
See my post here:
https://ubuntuforums.org/showthread.php?t=2435974

If you just run add-apt-repository it will not enable the sources.

You need something like add-apt-repository -s ppa:js-reynaud/kicad-dev-nightly

The -s flag enables the deb-src line in the sources file it will create.
See: http://manpages.ubuntu.com/manpages/trusty/man1/add-apt-repository.1.html

Same with -s. At least the -s parameter sets the tick box in Software&Update-Other List what I did manually before. Maybe I can try Ubuntu downgrade from 19.10 to 18.04LTS to be same as on my desktop

Oh, like the person replied on the forums, the name of the package you want is kicad-nightly.
Try apt-get build-dep kicad-nightly

kicad-nightly is correct now but from where to get libglm-kicad-dev ?

The following packages have unmet dependencies:
builddeps:kicad : Depends: libglm-dev (< 0.9.9.3) but it is not going to be installed or
libglm-kicad-dev but it is not installable
E: Unable to correct problems, you have held broken packages.

What happens when you apt-get install libglm-dev?

This unpacks and installs libglm-dev version 0.9.9.3-2 what is not <0.9.9.3 why the error message about libglm-dev stays on. Probably needs a downgrade (already included in my 18.04LTS) for that version how and from where ? Libglm-kicad-dev seems alternate solution but apt is unable to locate this.

Can KiCad build anyway with glm 0.9.9.3-2? I donā€™t know why that restriction is in place in the PPA.

At least, there is no installation of the depencies possible and we have to go back to the missing OpenGL library and possibly much more depencies. Cmake stop without generating any makefile

After downgrade to 18.04LTS there is again no luck with the depencies.

jv@Artemis:~/kicad$ sudo apt-get build-dep kicad-nightly
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 builddeps:kicad-nightly : Depends: libngspice-kicad but it is not installable or
                                    libngspice0-dev but it is not installable
E: Unable to correct problems, you have held broken packages.
jv@Artemis:~/kicad$ *emphasized text*

Running ./get_libngspice_so.sh compiled and installed fine but does not help with above problem. Have no idea what the diffrence to my desktop is.

What does CMake say is missing? For some reason you might not be able to get the dependencies requested by the ppa deb-src line, but that doesnā€™t mean you canā€™t get the dependencies needed to build KiCad. I have not worked with that ppa so I donā€™t know the particulars of why it is failing, but I do know that it is entirely possible to build KiCad fully on Ubuntu 18.04. If you give CMake error output (not apt-get errors) I might be able to help there.

I have it built on Debian Stable. I think the next to last time I built it I needed to use ā€˜clangā€™? Iā€™m pretty sure this last build I had switched back to the ā€˜normalā€™ dev packages. Iā€™ve got years of tracking down dependencies though. They get added and I have no idea what remains after multiple upgrades. At one point I had a problem because my home directory had been cloned so many times it was in some obsolete format. :wink:

EDIT: For the most part I just follow the directions with the source code.

hermit@~:cat /etc/debian_version
10.2

Application: KiCad
Version: 5.1.5, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.64.0 OpenSSL/1.1.1d zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
Platform: Linux 4.19.0-6-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.67.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.64.0
Compiler: GCC 8.3.0 with C++ ABI 1013

Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=ON
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=OFF
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON

If you are using Ubuntu 18.04, then the package names for all the dependencies are given in this script: https://gitlab.com/kicad/kicad-ci/source_containers/blob/master/scripts/install-dependencies.sh#L256. Note that you do have to jump through some hoops to get the ngspice integration to work in 18.04 (same with if you want to use OCC instead of OCE, but you can use OCE just fine since it is easiest). I know that KiCad can successfully configure and build using this set of packages.

If you use the ngspice provided with the PPA on 18.04, then you should just need to add the flag -DNGSPICE_INCLUDE_DIR=/usr/share/ngspice-kicad/ngspice/include/ to your CMake configuration when building KiCad.

18.04.3
Never mind that deb packages stuff. Itā€™s usefull for ready compiled things.
For KiCad I found it most straight forward to compile directly

Application: KiCad
Version: (5.99.0-813-gec3f59fd5), release build
Libraries:
wxWidgets 3.1.3
libcurl/7.58.0 GnuTLS/3.5.18 zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 4.15.0-74-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
Build date: Jan 30 2020 12:52:49
wxWidgets: 3.1.3 (wchar_t,wx containers) GTK+ 3.22
Boost: 1.65.1
OpenCASCADE Technology: 7.3.0
Curl: 7.58.0
Compiler: GCC 9.2.1 with C++ ABI 1013

Build settings:
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=ON
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=OFF
KICAD_USE_OCC=ON
KICAD_SPICE=ON

Behaviour of cmake is completely diffrent from my desktop. The ā€¦/ā€¦/ parameter is not accepted and without no compiler is found (while gcc path works fine). Possibly becouse of not being able to run the apt-get build-dep

jv@Artemis:~/kicad$ cmake -DCMAKE_BUILD_TYPE=Debug
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:41 (project):
  No CMAKE_CXX_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred!
See also "/home/jv/kicad/CMakeFiles/CMakeOutput.log".
See also "/home/jv/kicad/CMakeFiles/CMakeError.log".
jv@Artemis:~/kicad$ gcc
gcc: fatal error: no input files
compilation terminated.
jv@Artemis:~/kicad$ 

After running the shellscript given by @imcinerney there seems some partitial success and output from apt-get build-dep changed. Do I have to run install-dependencies.sh using --use-oce=1 ?

jv@Artemis:~/kicad$ sudo apt-get build-dep kicad-nightly
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 builddeps:kicad-nightly : Depends: liboce-foundation-dev but it is not going to be installed
                           Depends: liboce-modeling-dev but it is not going to be installed
                           Depends: liboce-ocaf-lite-dev but it is not going to be installed
                           Depends: liboce-ocaf-dev but it is not going to be installed
                           Depends: liboce-visualization-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
jv@Artemis:~/kicad$ 

cmake output also changed to

jv@Artemis:~/kicad/build/debug$ cmake -DCMAKE_BUILD_TYPE=Debug ../../
-- The CXX compiler identification is GNU 7.4.0
-- 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>
-- 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
-- Performing Test COMPILER_SUPPORTS_WSUGGEST_OVERRIDE
-- Performing Test COMPILER_SUPPORTS_WSUGGEST_OVERRIDE - Success
-- Performing Test COMPILER_SUPPORTS_WVLA
-- Performing Test COMPILER_SUPPORTS_WVLA - Success
-- Performing Test COMPILER_SUPPORTS_WSHADOW
-- Performing Test COMPILER_SUPPORTS_WSHADOW - Success
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so   
-- Found GLEW: /usr/include  
-- Check for installed GLEW -- found
-- Found GLM: /usr/include (found suitable version "0.9.9.0", minimum required is "0.9.5.1") 
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.58.0") 
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'cairo'
--   Found cairo, version 1.15.10
-- Found Cairo: /usr/lib/x86_64-linux-gnu/libcairo.so (found suitable version "1.15.10", minimum required is "1.12") 
-- Checking for module 'pixman-1'
--   Found pixman-1, version 0.34.0
-- Found Pixman: /usr/lib/x86_64-linux-gnu/libpixman-1.so (found suitable version "0.34.0", minimum required is "0.30") 
-- Boost version: 1.65.1
-- Found ngspice: /usr/local/include  
CMake Error at CMakeLists.txt:675 (find_package):
  By not providing "FindOCE.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "OCE", but
  CMake did not find one.

  Could not find a package configuration file provided by "OCE" (requested
  version 0.16) with any of the following names:

    OCEConfig.cmake
    oce-config.cmake

  Add the installation prefix of "OCE" to CMAKE_PREFIX_PATH or set "OCE_DIR"
  to a directory containing one of the above files.  If "OCE" provides a
  separate development package or SDK, be sure it has been installed.


-- Configuring incomplete, errors occurred!
See also "/home/jv/kicad/CMakeFiles/CMakeOutput.log".
See also "/home/jv/kicad/CMakeFiles/CMakeError.log".
jv@Artemis:~/kicad/build/debug$