Ubuntu 18.04 -- KiCAD 5.1.12 in unresolvable conflict with FreeCAD

For a while, I could not upgrade from 5.1.10 to 5.1.12, getting an error about some liboce package. Until it occurred to me to try removing those liboce (and check if that triggers removal of something else) and then try reinstalling it…

Turns out removing liboce triggered removal of freecad (and it also triggered upgrade of kicad, which had been flagged as kept back). So, did that, but now I cannot install FreeCAD:

[···]$ sudo apt install freecad
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 resolve the situation:

The following packages have unmet dependencies:
 freecad : Depends: liboce-foundation11 but it is not going to be installed
           Depends: liboce-modeling11 but it is not going to be installed
           Depends: liboce-ocaf-lite11 but it is not going to be installed
           Depends: liboce-ocaf11 but it is not going to be installed
           Depends: liboce-visualization11 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

KiCAD version info (after the upgrade) shows as:

Application: KiCad
Version: 5.1.12-84ad8e8a86~92~ubuntu18.04.1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.58.0 OpenSSL/1.1.1 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 5.4.0-90-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.22
    Boost: 1.65.1
    OpenCASCADE Technology: 7.5.2
    Curl: 7.58.0
    Compiler: GCC 7.5.0 with C++ ABI 1011

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=ON
    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

The conflict looks like it’s with the OCC/OCE library, which is the 3d library that both Freecad and Kicad use. The freecad package depends on OCE, which is an unmaintained fork of OCC.

Which version of freecad is it trying to install? The fact that it’s relying on OCE suggests it’s a very old version of Freecad. I think newer releases of freecad use OCC.

There was recently some juggling on the Kicad side to get both Kicad and Freecad packages using the same version of OCC so they could be installed side-by-side.

I’m not sure what the Freecad packaging situation is on Ubuntu but you may need to install Freecad from the Freecad PPA to get a modern version of Freecad that works with OCC 7.5. Perhaps someone who uses Ubuntu can help here.

Going to the FreeCAD PPA solved the issue indeed! Thanks!

1 Like

I ran into compiling problems on Debian similar to this. Until I uninstalled the OCE libraries the system didn’t report the newer OCC as an option. Since Ubuntu is Debian based I’d say just keep an eye open in the future.