SOLVED: Compiling V5 RCs on Debian

I wish Debian was more on top of this…

Hello,
Thank you at all developers for this V5!
I’m a debian user and I will happy to try this. What is the best way ? There is ppa for Ubuntu, I has to compile it?

Thanks

Yes - at this point you will need to. I tried a few times (admittedly, I am not much into programming) and failed each time. I’m sure its all me. But at this point, you will need to do that.

Unless the Debian maintainer does the RC’s (and I don’t believe they do) you wont see 5.0 for a long time in STABLE.

Thanks for the quick reply,
I’d already done it, few years ago with freecad, but now they have appimage, a great thing!

I’ll try it at my work this week.

By the way for the v4.0.7 I’m already on backports.

It would be super helpful of any other Debian user that did compile the most recent, if they took the time to document what they did for those of us that would prefer not to get that involved with compiling, learning the ins and out of compiling and programming but need to beneficent from the newest features in KiCad.

I know that’s asking a bunch but I’m posting this with the hopes that someone has done just that.
The bits here on the KiCad site are good, but its the deeper dive when the compile fails that folks like myself just don’t know what to deal with.

In any event, I’m extremely happy there is movement on this and that, I am quite grateful for :slight_smile:

1 Like

I am not a Debian user, but I am willing to help out if I can with compiling questions – if anyone wants to try following the compiling instructions on the KiCad site and runs into trouble, please post here or PM me and I will see if I can help.

3 Likes

One thing that comes to mind - I think (and I don’t know for certain) compiling KiCad 5 requires libssl1.0.0
I noticed that that lib is not available (probably due to vulnerabilities and/or outdated ssl AND assuming it is indeed SSL 1.0) in STABLE (Stretch). If libssl1.0.0 is indeed used (and assuming it really is SSL 1.0) wouldn’t that in and of itself compromise the system? And if the previous is true, why is SSL 1.0 being used?

Again, this is just assumptions on my part and I very well could be wrong about libssl1.0.0 as it could just be SSL 3.0 but the naming convention may be just cosmetic. Can someone answer there as I am curious :slight_smile:

Hi,
Probably it’s better to create a new topic for debian install?
I’ll work on tomorrow.

1 Like

On debian stable the current package is : https://packages.debian.org/stretch/libssl1.0.2

1 Like

I compiled nightly on Debian stable a few months back. I just look at the error. It is usually something missing. I don’t program but I did have a fair amount of dev libs installs so it wasn’t too painful. Nothing out of the ordinary at that time.

1 Like

I’m trying to compile but witch package have you installed for OCE?
the oce-draw normally work because it’s 0.17 (>= 0.16 here)

1 Like

oce-draw is not even installed on my system. I think you have the right idea. Start another thread and post the error log. Like I said earlier though, I didn’t have to install anything that wasn’t in the normal repository that I can remember.

1 Like

I’m doing some experimenting on a virtual machine right now. KiCad takes d*** long time to compile so it will be ready or failed tomorrow morning. Up to this moment here are some notes:

Read the last section in https://kicad.org/download/debian/ and install those dependencies. I tried another route so I’m not sure is these are up to date.

An easy way to install dependencies on Debian and all derivatives is apt build-dep. Make sure you have the source repository enabled, not just the binary repository. Then run “sudo apt build-dep kicad”. It installs all build-time dependencies for the kicad version which is in the used repository, including build tools. I did this on a minimal clean desktop (lxde) install and it installed over 2.5Gb of stuff.

Unfortunately there’s no nightly builds for Debian. There are for Ubuntu, and building is really easy there after enabling the nightly build PPA (with src) and using build-dep. The latest kicad source has a bit different build dependencies than 4.0.x, so build-dep doesn’t work out of the box. Hopefully the website instructions have those missing packages, at least boost and oce are in that list. I disabled oce in cmake configuration so I didn’t need that.

For configuration I recommend cmake-gui (“apt install cmake-gui”, run “cmake-gui”). Give the source and build destination directories. Click “Configure” once. Enable and disable what you want. You have to disable ngspice (see the web page). I also had to remove the lines where there should have been the ngspice related directories. Now you have to click “Configure” maybe a couple more times until there are no red lines. That’s a bit strange, but that’s how it works. When there’s no red or errors left, click Generate. If you run into errors, you have to install some more -dev packages.

Now you can exit and you’re ready to run make and “sudo make install”.

P.S. Right now it’s in 61%. See you later…

1 Like

Outstanding! I am making progress, THANK YOU!
So the spice lib - did you comment out the lines that reflect spice in cmakelists.txt or did you set it one within the file to OFF ?

UPDATE: I installed ngspice that is within STABLE, all cmake issues appear to be satisfied and I’m in the “make” process.

UPDATE 2: 34% … I got a good feeling about this, especially that it seems like its working and I have very little knowledge of what Im doing, lol

Aarrgghh - fail… Anyone care to lend some guidance? My take; I probably should have removed the refs to spice?

[ 69%] Building CXX object eeschema/CMakeFiles/eeschema_kiface.dir/__/common/page_info.cpp.o
make[2]: *** No rule to make target ‘/usr/lib/x86_64-linux-gnu/libngspice.so’, needed by ‘eeschema/_eeschema.kiface’. Stop.
CMakeFiles/Makefile2:928: recipe for target ‘eeschema/CMakeFiles/eeschema_kiface.dir/all’ failed
make[1]: *** [eeschema/CMakeFiles/eeschema_kiface.dir/all] Error 2
Makefile:149: recipe for target ‘all’ failed
make: *** [all] Error 2

UPDATE: Commented out the line for spice in /kicad/CMakeLists.txt - error persists.
At this point maybe I need to comment out spice in /kicad/eeschema/CMakeFiles ???

Try commenting it out in eeschema CMakeFile – maybe this is a bug? I think this line should be conditional on KICAD_SPICE but it doesn’t look like that’s the case.
${NGSPICE_LIBRARY} on line 319

1 Like

Working on it :slight_smile:
I hope folks here don’t mind the play-by-play on this. I kinda hope it shows other that know as little as I do about compiling might find this somewhat enlightening :slight_smile:

100% built!

As I told in the previous post, I removed the lines which had the ngspice library locations. So there were two things to do:

  1. Disable ngspice, set it to OFF, unmark it. In cmake-gui GUI it’s “NGSPICE” and a checkbox.

  2. Remove the “NGSPICE_INCLUDE_DIR” and “NGSPICE_LIBRARY” lines altogether with “Remove entry” button or delete them from a file, otherwise they led to cmake errors for me.

I just installed it with “make install” (as root) and I can run it!

1 Like

Outstanding! Mine is at 95% and I went the same route as you (except the cmake-gui) so I should have the expected results also.
I humbly thank all that contributed to this thread. I never would have been able to pull this off on my own.
Thank you!!!

Cheers
Chris

Hi,
I’ve build Kicad on Debian stable with the libngspice.
I’ve install libngspice from the ubuntu ppa : here

After I’ve install dependencies from the download/debian page as said eelik at post 13

After, I’ve follow kicad compile instructions here.

Now I need to download news libraries repos and test it.

I don’t know how to create packages for debian, but if someone can help me, I while be happy to try.

Have a good day.