Trying a master compile

To be more clear, xxx (in general) must be a deb source package name which is found in your active repositories.

for the case /kidev/kicad-master/ path is a problem I restarted using git clone and put the nightly source deb file into that directory

jv@JamesWebb:~$ git clone -b master https://git.launchpad.net/kicad
Cloning into 'kicad'...
remote: Counting objects: 203771, done.
remote: Compressing objects: 100% (33261/33261), done.
remote: Total 203771 (delta 170290), reused 203195 (delta 169997)
Receiving objects: 100% (203771/203771), 142.39 MiB | 5.90 MiB/s, done.
Resolving deltas: 100% (170290/170290), done.
jv@JamesWebb:~$ cd kicad
jv@JamesWebb:~/kicad$ ls
3d-viewer         copyright.h        helpers               LICENSE.GPLv3      pcbnew      thirdparty
AUTHORS.txt       CTestConfig.cmake  include               LICENSE.ISC        plugins     tools
bitmap2component  cvpcb              INSTALL.txt           LICENSE.MIT        qa          uncrustify.cfg
bitmaps_png       demos              kicad                 LICENSE.README     README.txt  utils
_clang-format     Documentation      libs                  new                resources
CMakeLists.txt    Doxyfile           LICENSE.AGPLv3        pagelayout_editor  scripting
CMakeModules      eeschema           LICENSE.BOOSTv1_0     patches            scripts
common            gerbview           LICENSE.CC-BY-SA-4.0  pcb_calculator     template
jv@JamesWebb:~/kicad$ ls
3d-viewer          gerbview                                                        pagelayout_editor
AUTHORS.txt        helpers                                                         patches
bitmap2component   include                                                         pcb_calculator
bitmaps_png        INSTALL.txt                                                     pcbnew
_clang-format      kicad                                                           plugins
CMakeLists.txt     kicad-nightly_202001271547+48ae188~100~ubuntu18.04.1_amd64.deb  qa
CMakeModules       libs                                                            README.txt
common             LICENSE.AGPLv3                                                  resources
copyright.h        LICENSE.BOOSTv1_0                                               scripting
CTestConfig.cmake  LICENSE.CC-BY-SA-4.0                                            scripts
cvpcb              LICENSE.GPLv3                                                   template
demos              LICENSE.ISC                                                     thirdparty
Documentation      LICENSE.MIT                                                     tools
Doxyfile           LICENSE.README                                                  uncrustify.cfg
eeschema           new                                                             utils
jv@JamesWebb:~/kicad$ sudo apt-get build-dep kicad-nightly_202001271547+48ae188~100~ubuntu18.04.1_amd64.deb
Reading package lists... Done
E: You must put some 'source' URIs in your sources.list

  • sorry I pasted wrong content into wrong formating box - now edit is finish…

No, the apt-get build-dep command has nothing to do with your cloned source code. You must give it the .deb source package name. If you install a nightly build from the ppa with package name “kicad-nightly” you give that same name to the build-dep command. It doesn’t know anything about your current working directory or your own source code. It installs the build dependencies for the debian/ubuntu package.

It works for your own build only because the ppa packages and the master branch of KiCad happen to have the same dependencies. After all, the nightly build packages have been compiled from the master branch.

Not really understanding what to do: Kicad Master requires some libraries e.g. OpenGL (with archives, headers or more) to compile. The command sudo apt-get build-dep reallycomplicatedandlongpackagename.deb means to install all dependencies for ‘packagename’ so that I can build it. Instead of this I build the master from source. It is not possible to solve the depencies by master source repository becouse doing so seems a property of the debian package (?) Thats why I put the .deb filename as a parameter to apt-get build-deb (what seems obviosly wrong ?)

Sorry, not the .deb package name but the same name you use when you install the binary application with apt-get.

Think about it this way:

Let’s pretend you don’t have the git repository cloned so that it doesn’t confuse us. Let’s say you would like to compile the ubuntu ppa package from scratch for whatever reason (for example want to apply a patch to the source code to fix something) and create a new .deb package.

For that end you need all build time dependencies. Debian based (as well as RedHat based) distros have a simple way to install those dependencies for that package. The dependencies are for the corresponding source package. But by “package” I don’t mean the .deb package file name, but the package name as you use it when you install it with apt. Use that same name for the source package.

After you have run apt-get build-dep with that package name you should have all the build time dependencies for that package installed. Not just development libraries, but all build time programs, too.

Those newly installed packages naturally fullfill the needs of the self-downloaded source code of the same application, provided that the ubuntu packager hasn’t left anything out with build time (in this case cmake) switches. If you need something else, it’s still easier to find than every and each dependency one by one.

Sorry again. I never used apt nor launchpad and also git is new for me. Seems the deb file is useless for apt-get build-dep because limited to the binaries while the depency detection requires to scan source from the ppa package to build depency tree (?) Therefore I have to find out the correct ppa:js-reynaud… nightly address as the correct parameter for apt-get build-deb. This ppa is not distribution dependend and launchpad generates the nightly distribution dependend binaries from that. I tried following:

jv@JamesWebb:~/kicad$ sudo add-apt-repository ppa:js-reynaud/kicad-dev-nightly
 KiCad nightly packages (master branch)

* provide separation between stable and daily build packages (like Freecad does)
* Allow installation of KiCad stable and daily on the same machine
* This version can be unstable (dev branch of KiCad)

KiCad now need boost >= 1.59. Xenial is no more compatible.
 More info: https://launchpad.net/~js-reynaud/+archive/ubuntu/kicad-dev-nightly
Press [ENTER] to continue or Ctrl-c to cancel adding it.

Hit:1 http://ppa.launchpad.net/js-reynaud/kicad-dev-nightly/ubuntu bionic InRelease
Hit:2 http://de.archive.ubuntu.com/ubuntu bionic InRelease                                                             
Hit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease                                                      
Hit:4 http://de.archive.ubuntu.com/ubuntu bionic-updates InRelease       
Get:5 http://ppa.launchpad.net/js-reynaud/ppa-kicad/ubuntu bionic InRelease [15,4 kB]
Hit:6 http://de.archive.ubuntu.com/ubuntu bionic-backports InRelease                
Ign:7 http://ppa.launchpad.net/terry.guo/gcc-arm-embedded/ubuntu bionic InRelease   
Err:8 http://ppa.launchpad.net/terry.guo/gcc-arm-embedded/ubuntu bionic Release
  404  Not Found [IP: 91.189.95.83 80]
Get:9 http://ppa.launchpad.net/js-reynaud/ppa-kicad/ubuntu bionic/main i386 Packages [7.744 B]
Reading package lists... Done       
E: The repository 'http://ppa.launchpad.net/terry.guo/gcc-arm-embedded/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
jv@JamesWebb:~/kicad$ sudo apt-get update
Hit:1 http://ppa.launchpad.net/js-reynaud/kicad-dev-nightly/ubuntu bionic InRelease
Hit:2 http://de.archive.ubuntu.com/ubuntu bionic InRelease                                                             
Hit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease                                                      
Hit:4 http://ppa.launchpad.net/js-reynaud/ppa-kicad/ubuntu bionic InRelease
Hit:5 http://de.archive.ubuntu.com/ubuntu bionic-updates InRelease       
Hit:6 http://de.archive.ubuntu.com/ubuntu bionic-backports InRelease          
Ign:7 http://ppa.launchpad.net/terry.guo/gcc-arm-embedded/ubuntu bionic InRelease
Err:8 http://ppa.launchpad.net/terry.guo/gcc-arm-embedded/ubuntu bionic Release
  404  Not Found [IP: 91.189.95.83 80]
Reading package lists... Done                     
E: The repository 'http://ppa.launchpad.net/terry.guo/gcc-arm-embedded/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
jv@JamesWebb:~/kicad$ sudo apt-get build-dep kicad
Reading package lists... Done
E: You must put some 'source' URIs in your sources.list
jv@JamesWebb:~/kicad$ sudo apt-get build-dep kicad-dev-nightly
Reading package lists... Done
E: You must put some 'source' URIs in your sources.list
jv@JamesWebb:~/kicad$ 

2 Likes


For whatever reason I had to start Software&Updates->OtherSoftware->Edit and enable the box on the ppa Source Code line entry. Depency tree now seems to build and install fine and OpenGL is no more missed by cmake.

Unfortunately there is another problem with libngspice. As I wont touch the simulation it should be feasible to compile without that. How is the cmake command line with disable switch?

jv@JamesWebb:~/kicad/build/debug$ cmake -DCMAKE_BUILD_TYPE=Debug KICAD_SPICE=OFF ../../
-- KiCad install dir: </usr/local>
-- Check for installed GLEW -- found
-- Boost version: 1.65.1

*** NGSPICE library missing ***
Most of ngspice packages do not provide the required libngspice library.
You can either compile ngspice configured with --with-ngshared parameter
or run a script that does the job for you:
  cd ./scripting/build_tools
  chmod +x get_libngspice_so.sh
  ./get_libngspice_so.sh
  sudo ./get_libngspice_so.sh install

CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find ngspice (missing: NGSPICE_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  CMakeModules/Findngspice.cmake:63 (find_package_handle_standard_args)
  CMakeLists.txt:668 (find_package)

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

IIRC you have to unset these three:
KICAD_SPICE
NGSPICE_INCLUDE_DIR
NGSPICE_LIBRARY

pip install wxPython fails possibly for any problems with GTK.
What to unset to compile without scripting ?

The CMakeLists.txt at the root has all the relevant flags:

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