Debian Buster Compilation Fails

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
wmayer
Founder
Posts: 20245
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Debian Buster Compilation Fails

Post by wmayer »

I am not exactly sure what to do with this list.
The list shows you two things:
  • It shows that FreeCAD really links to the OCC libs and not to an OCE lib eventually (i.e. for a corrupted build like user1234 said)
  • It shows that the linker can find the required libraries
So, what's still possible is that the Part module needs to link to a further OCC lib. Needs to checks which OCC lib has the symbol _ZNK18Adaptor2d_HCurve2d11DynamicTypeEv ...
Is there an easy way to check if these dependencies are already installed
If they weren't installed then the build wouldn't have succeeded.
wmayer
Founder
Posts: 20245
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Debian Buster Compilation Fails

Post by wmayer »

wmayer wrote: Sat Jun 19, 2021 11:53 am Needs to checks which OCC lib has the symbol _ZNK18Adaptor2d_HCurve2d11DynamicTypeEv ...
According to https://dev.opencascade.org/doc/occt-7. ... tor2d.html the class Adaptor2d_HCurve2d is part of the Adaptor2d package that belongs to the TKG2d library. According to the output of ldd Part.so links against TKG2d.

So, what else you can check is which are the libraries FreeCAD loads at runtime. First get the process ID of the application:

Code: Select all

ps -A | grep -i freecad
With the determined ID (it's the first number of the output) use lsof to get the loaded resources.

Code: Select all

lsof -p process_ID | grep -i libTK
The listed paths of the loaded libraries must match with the paths returned by ldd.
wmayer
Founder
Posts: 20245
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Debian Buster Compilation Fails

Post by wmayer »

cd to FreeCAD's bin directory and run:

Code: Select all

LD_DEBUG=libs ./FreeCAD 2> libs.log
This shows you what the linker tries at runtime and may give a clue what happens with Part.so.
User avatar
hhassey
Posts: 246
Joined: Thu Jun 04, 2015 8:01 pm
Location: Ensenada, Mexico

Re: Debian Buster Compilation Fails

Post by hhassey »

@wmayer thanks! I could not really find anything.

Code: Select all

lsof -p process_ID | grep -i libTK
Returns nothing (I am attaching the whole not grepped output lsof.txt)

Also the result from

Code: Select all

LD_DEBUG=libs ./FreeCAD 2> libs.log
is attached


libocct-modeling-data-7.3 is installed (it contains TKG2d)
and the corresponding
liboce-modeling11 is not installed

I am totally lost, please help!
Attachments
libs.log
(144.48 KiB) Downloaded 45 times
lsof.txt
(26.92 KiB) Downloaded 54 times
user1234
Veteran
Posts: 3347
Joined: Mon Jul 11, 2016 5:08 pm

Re: Debian Buster Compilation Fails

Post by user1234 »

Hmmm .... that is really odd.

One try, but that this would be a lucky hit. Have you installed

Code: Select all

libtbb-dev
libtbb2
? Maybe OCCT needs tbb and the Package on Debian is corrupt.

Greetings
user1234
User avatar
hhassey
Posts: 246
Joined: Thu Jun 04, 2015 8:01 pm
Location: Ensenada, Mexico

Re: Debian Buster Compilation Fails

Post by hhassey »

Both libtbb-dev and libtbb2 were already installed. I know the problem is not a corrupt Debian package because I have another Debian buster system that compiles FreeCAD with no issues.
user1234
Veteran
Posts: 3347
Joined: Mon Jul 11, 2016 5:08 pm

Re: Debian Buster Compilation Fails

Post by user1234 »

Then can you upload both CMakeCache.txt files? I want a look on it for comparing.

Greetings
user1234
User avatar
hhassey
Posts: 246
Joined: Thu Jun 04, 2015 8:01 pm
Location: Ensenada, Mexico

Re: Debian Buster Compilation Fails

Post by hhassey »

Sure, this is becoming more interesting. I was so frustrated that I just

Code: Select all

rm -rf freecad-source
and started from scratch.

Compilation works to 100% but FreeCAD has the same problem as before when opening the Part WB.
I am uploading the CMakeCache.txt for both the installation that fails and another one on Debian that works.

after

Code: Select all

diff CMakeCAche_wrong.txt CMakeCache.txt
I only find this difference:

Code: Select all

! OpenCASCADE_DIR:PATH=/usr/lib/cmake/opencascade
! OpenCASCADE_DIR:PATH=OpenCASCADE_DIR-NOTFOUND 
This got me even more confused as the one that has OpenCASCADE_DIR-NOTFOUND is the one that actually works.

I am also attaching the error.txt (stderr)
Attachments
error.txt
(23.61 KiB) Downloaded 42 times
CMakeCache.txt
(72.16 KiB) Downloaded 46 times
CMakeCache_wrong.txt
(69.75 KiB) Downloaded 44 times
user1234
Veteran
Posts: 3347
Joined: Mon Jul 11, 2016 5:08 pm

Re: Debian Buster Compilation Fails

Post by user1234 »

Yes that is odd. But there more things odd. Remember as we had the jitsi meeting? As i said, i switched to Debian 11 before. I am not a expert, but as far i remember, in cmake many things changed under the hood. You seems to have cmake-3.13 (according the Debian homepage Debian 10). I have cmake-3.18. It seems that is the point where i make an fatal issue.

- first: switch the OCC Variant to Official Version
- then make a configure and look which OCCT flags cmake set automatic
- if it is set like the bad one on the screenshot, delete them and make them like the good one (set the flags per hand
- configure, control if all flags now correct, generate and compile
- good luck

Sometimes how the flags set are depended from the order of some settings are made.


Greetings
user1234
Attachments
0.png
0.png (357.29 KiB) Viewed 2622 times
wmayer
Founder
Posts: 20245
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Debian Buster Compilation Fails

Post by wmayer »

hhassey wrote: Fri Jul 02, 2021 7:50 pm This got me even more confused as the one that has OpenCASCADE_DIR-NOTFOUND is the one that actually works.
Following user1234's advises did you get it working now?
Post Reply