After failing to compile on Windows (success but needs several hours using MSYS) I try with Ubuntu 18.04 LTS and have following output:
jv@JamesWebb:~/kidev/kicad-master$ cmake -DCMAKE_BUILD_TYPE=Release
-- KiCad install dir: </usr/local>
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY
OPENGL_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.10/Modules/FindOpenGL.cmake:369 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:625 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/jv/kidev/kicad-master/CMakeFiles/CMakeOutput.log".
jv@JamesWebb:~/kidev/kicad-master$ cmake -DCMAKE_BUILD_TYPE=Release ../../
CMake Error: The source directory "/home/jv" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
jv@JamesWebb:~/kidev/kicad-master$ sudo apt-get build-dep kicad-master
Reading package lists... Done
E: You must put some 'source' URIs in your sources.list
jv@JamesWebb:~/kidev/kicad-master$
The âŚ/âŚ/ from instructions are not accepted and without some libs seems missing.
Graphics is a Nvidia M4000 and 5.99 nighly doesnt complain with accelerated graphics. Therefore I assume OpenGL is supported. Any hints what went wrong ?
I suggest installing all dependencies with one command. First add the nightly builds ppa source repository for Ubuntu. Then run
sudo apt-get build-dep xxx
where xxx is the nightly build package name, I donât remember it.
This installs everything in one go. The master source code has the same dependencies.
EDIT: I didnât read carefully, you already used build-dep. But you have to add and activate the nightly build source repository, not just the binary repository. Actually you donât have to have the binary repository at all IIRC.
2nd EDIT: and âkicad-masterâ isnât a package name in the ppa repo, isnât it?
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 ?)
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$
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$