FreeCAD and KiCAD on Ubuntu 20.04

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Evgeniy
Posts: 477
Joined: Thu Jul 15, 2021 6:10 pm

Re: FreeCAD and KiCAD on Ubuntu 20.04

Post by Evgeniy »

Confirm to. Today i'll try to install KiCad from "Ubuntu software manager" and it wrote "Installation failed. The following packages have unmet depending". May be KiCad have dependency conflict with FreeCAD.
steve evvette
Posts: 1
Joined: Thu Jul 22, 2021 2:29 pm

Re: FreeCAD and KiCAD on Ubuntu 20.04

Post by steve evvette »

I can confirm this same behavior on my Ubuntu 20.04 system. I had to remove the FreeCAD PPA, then re-install FreeCAD 0.18.
Now I have a working FreeCAD 0.18 and KiCAD 5.1.

However - All the FreeCAD work I did with 0.19 doesn't load properly with 0.18!

I downloaded the 0.19 AppImage, and that does allow me to load files created the past
week with the PPA 0.19 program.

Any idea when this situation will be cleaned up?

Should I be using both the KiCAD PPA and FreeCAD PPA?
It hasn't been necessary to use a kiCAD PPA as apt installs kiCAD 5.1:
kicad/focal,now 5.1.5+dfsg1-2build2 amd64 [installed]

but it doesn't install FreeCAD 0.19:
freecad/focal,focal,now 0.18.4+dfsg2-1ubuntu4 all [installed]

tia,
Steve
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: FreeCAD and KiCAD on Ubuntu 20.04

Post by openBrain »

Evgeniy wrote: Wed Jul 21, 2021 5:48 pm Confirm to.
steve evvette wrote: Thu Jul 22, 2021 2:55 pm I can confirm this same behavior on my Ubuntu 20.04 system.
Guys, did you read my previous post ?
Yes, when you choose to use PPA to get more recent FreeCAD version, you will create a dependency issue with OCCT as PPA uses 7.5 while official repo is 7.3.
So as soon as you use FreeCAD PPA, all software from repo using OCCT will not be possible to install.
It won't be fixed. You have several choices :
* Upgrade your OS (eg. Ubuntu 21.04 comes with OCCT 7.5 & FreeCAD 0.19 in the repo)
* Use FreeCAD AppImage => This is safer option as it will prevent dependency issue with all repo apps
* Use other software standalone version (eg for Kicad, you can use the FlatPak)
User avatar
M4x
Veteran
Posts: 1474
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: FreeCAD and KiCAD on Ubuntu 20.04

Post by M4x »

I recommend the AppImage. And keep in mind that newer versions are usually backwards compatible but not the other way around. So you're able to open 0.18 files in 0.19 but not the other way around!
User avatar
kkremitzki
Veteran
Posts: 2511
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: FreeCAD and KiCAD on Ubuntu 20.04

Post by kkremitzki »

Indeed the FreeCAD and KiCad stable PPAs are currently not co-installable. I contacted the KiCad PPA maintainers a few days ago and they informed me they are working on updating things on their end.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
dunaden
Posts: 7
Joined: Wed Nov 18, 2020 2:43 pm

Re: FreeCAD and KiCAD on Ubuntu 20.04

Post by dunaden »

Just putting a note here for other searchers that I ran into this same issue when I was setting up a new installation of Mint 20.2 and I wanted to have both KiCad and FreeCAD loading from their PPA's. I had the same behavior where the bin for KiCad was removed during 'apt-get install freecad' from the PPA for 0.19.

For me this is extra frustrating because I don't think I can bind into the FreeCAD python libraries on a flatpak or appimage (although please someone tell me if there's a way to do so). But now I have to build my scripts around an outdated version of FreeCAD.

So I went the route of purging both packages, running 'apt-get autoremove' and then installing KiCad (5.1.10) and FreeCAD (0.18.4) and things seem to be working ok like that for now.

When anyone has an update on them becoming compatible again, I would love to know about it.
kicker
Posts: 1
Joined: Sat Oct 30, 2021 4:11 am

Re: FreeCAD and KiCAD on Ubuntu 20.04

Post by kicker »

In fact installation of kicad 5 removes/uninstall freecad,

Code: Select all

sudo apt install kicad
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  calculix-ccx freecad-common freecad-runtime gdal-data ibverbs-providers
  javascript-common libaec0 libarmadillo9 libarpack2 libboost-program-options1.71.0
  libboost-regex1.71.0 libcaf-openmpi-3 libcfitsio8 libcharls2 libclang1-10
  libcoarrays-openmpi-dev libcoin80c libdap25 libdapclient6v5 libepsilon1 libevent-dev
  libevent-extra-2.1-7 libevent-openssl-2.1-7 libfabric1 libfreexl1 libfyba0 libgdal26
  libgeos-3.8.0 libgeos-c1v5 libgeotiff5 libgl2ps1.4 libhdf4-0-alt libhdf5-103
  libhdf5-openmpi-103 libhwloc-dev libhwloc-plugins libhwloc15 libibverbs-dev libibverbs1
  libjs-jquery libjs-jquery-ui libjsoncpp1 libkmlbase1 libkmldom1 libkmlengine1 libllvm10
  libmedc11 libminizip1 libnetcdf-c++4 libnetcdf15 libnl-3-dev libnl-route-3-dev
  libnuma-dev libogdi4.1 libopengl0 libopenmpi-dev libopenmpi3 libpmix2 libpq5 libproj15
  libpsm-infinipath1 libpsm2-2 libpyside2-py3-5.14 libqhull7 librdmacm1
  libshiboken2-py3-5.14 libsoqt520 libspatialite7 libspnav0 libspooles2.2 libsuperlu5
  libsz2 liburiparser1 libvtk7.1p libxerces-c3.2 libzipios++0v5 odbcinst odbcinst1debian2
  openmpi-bin openmpi-common proj-bin proj-data python-matplotlib-data python3-cycler
  python3-kiwisolver python3-matplotlib python3-pivy python3-pyparsing
  python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtopengl
  python3-pyside2.qtsvg python3-pyside2.qtuitools python3-pyside2.qtwidgets
  python3-pyside2.qtxml shiboken2
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libocct-data-exchange-7.5 libocct-foundation-7.5 libocct-modeling-algorithms-7.5
  libocct-modeling-data-7.5 libocct-ocaf-7.5 libocct-visualization-7.5
Suggested packages:
  kicad-locale-ko | kicad-locale-ru | kicad-locale-pl | kicad-locale-pt | kicad-locale-ja
  | kicad-locale-id | kicad-locale-ca | kicad-locale-it | kicad-locale-el
  | kicad-locale-zh | kicad-locale-de | kicad-locale-sl | kicad-locale-cs
  | kicad-locale-bg | kicad-locale-sv | kicad-locale-lt | kicad-locale-fi
  | kicad-locale-fr | kicad-locale-hu | kicad-locale-nl | kicad-locale-es
  | kicad-locale-sk
The following packages will be REMOVED:
  freecad freecad-python3 libfreecad-python3-0.18 libocct-data-exchange-7.3
  libocct-foundation-7.3 libocct-modeling-algorithms-7.3 libocct-modeling-data-7.3
  libocct-ocaf-7.3 libocct-visualization-7.3
The following NEW packages will be installed:
  libocct-data-exchange-7.5 libocct-foundation-7.5 libocct-modeling-algorithms-7.5
  libocct-modeling-data-7.5 libocct-ocaf-7.5 libocct-visualization-7.5
The following packages will be upgraded:
  kicad
1 upgraded, 6 newly installed, 9 to remove and 0 not upgraded.
Need to get 42.8 MB of archives.
After this operation, 69.5 MB disk space will be freed.
Do you want to continue? [Y/n]
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD and KiCAD on Ubuntu 20.04

Post by wmayer »

kicker wrote: Sat Oct 30, 2021 4:14 am In fact installation of kicad 5 removes/uninstall freecad,
This is because KiCAD seems to depend on OCCT 7.5 while the installed FreeCAD depends on OCCT 7.3. The problem is that the runtime libraries of two different OCCT versions cannot coexist underneath /usr/.

However when looking at the Ubuntu page then OCCT 7.3 is the official version for 20.04. Have you installed KiCAD from Launchpad? If yes you should check if you find a FreeCAD version there that also depends on OCCT 7.5.

For the future it might be good to support it to have several runtime versions of OCCT installed on a system. At the moment this is not possible because in the filename of the shared libraries only the major version number (i.e. 7) is added. If the minor version number were included then it would work. Therefore in the file occt_toolkit.cmake this changed is needed:

Code: Select all

   set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}"
-                                                    SOVERSION     "${OCC_VERSION_MAJOR}"
+                                                    SOVERSION     "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}"
                                                     VERSION       "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}")
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: FreeCAD and KiCAD on Ubuntu 20.04

Post by openBrain »

wmayer wrote: Sat Oct 30, 2021 7:06 am Have you installed KiCAD from Launchpad? If yes you should check if you find a FreeCAD version there that also depends on OCCT 7.5.
As using apt, I guess user is installing from their PPA.
It should work also installing FreeCAD from PPA as it also uses OCCT 7.5, but this solution would still break any other software from the official repo using OCC.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD and KiCAD on Ubuntu 20.04

Post by wmayer »

It should work also installing FreeCAD from PPA as it also uses OCCT 7.5, but this solution would still break any other software from the official repo using OCC.
True but fortunately there are not so many packages that depend on OCCT.
Post Reply