TestPathApp fails after CMake Install

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: TestPathApp fails after CMake Install

Post by openBrain »

@vm4dim I trust you. :) Just I'm not skilled enough to draft a patch.
As soon as I get one, I'm happy to give it a test. ;)

My previous remark is let's say "for my own skill improvement".
Also at the end, I'd like to understand why Clang and GCC act differently. ;)
Notice that just replacing PathApp.so fixed the issue. No need to change something in libarea-native.so (but maybe this can be explained with deeper understanding).
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: TestPathApp fails after CMake Install

Post by wmayer »

Today I've built FreeCAD with gcc and I can confirm that the Path tests work when running from the build directory and it fails when running from the installed directory.

As a further test I run the installed version normally (i.e. without -t 0) and opened the unit test dialog manually. When I choose the TestPathApp and click on Start then immediately the error about Import.so is printed without running any tests beforehand.
If I switch to the Python console and type

Code: Select all

import Import
then this works. If I re-run the TestPathApp tests then they succeed without a single failure.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: TestPathApp fails after CMake Install

Post by wmayer »

I am sure this error message is received from libarea-native.so
Yes, libarea-native.so is the culprit. If you use ldd for area.so and Import.so then all shared libraries they depend can be found. But when using it for libarea-native.so then it says that Import.so cannot be found. That's quite interesting because both files lie in the same directory.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: TestPathApp fails after CMake Install

Post by wmayer »

This PR fixes the problem: https://github.com/FreeCAD/FreeCAD/pull/8328

PS: I don't remember why the RPATH option had to be disabled for several shared libraries.

git commit 7ec37c9e39 disabled it for area-native.so
See also git commit 6b89c0318, git commit 79ae0091a
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: TestPathApp fails after CMake Install

Post by openBrain »

I checked it was OK with the PR to re-enable the 20.04 build in the CI.
That's perfect.

Thanks @wmayer and @vm4dim for helping solving this. ;)
Post Reply