Brad Q
Posts: 102
Joined: Mon Aug 12, 2019 12:10 am

Shiboken coding question

Sun Mar 29, 2020 4:46 pm

So I have been putzing around with building FreeCAD on Buster with QT5(too much time, too little money). I ran into an issue with cmake not being able to find one of the Shiboken files that existed where it was supposed to be. IF I ran it as it was originally (see below # line) it would truncate off "arm-linux-gnueabihf" and fail. When I hard coded it (line below #line) it works fine. I tried putting "" around the suffix and it had no effect. So what am I missing? I do not like hard coding things like this unless I absolutely have to.

Thanks

Code: Select all

if (NOT PYTHON_CONFIG_SUFFIX)
    message(STATUS "Shiboken2Config: Using default python: -python2.7.arm-linux-gnueabihf")
    SET(PYTHON_CONFIG_SUFFIX -python2.7.arm-linux-gnueabihf)
endif()
#include("/usr/lib/arm-linux-gnueabihf/cmake/Shiboken2-5.11.2/Shiboken2Config${PYTHON_CONFIG_SUFFIX}.cmake")
include("/usr/lib/arm-linux-gnueabihf/cmake/Shiboken2-5.11.2/Shiboken2Config-python2.7.arm-linux-gnueabihf.cmake")
From:/usr/lib/arm-linux-gnueabihf/cmake/Shiboken2-5.11.2/Shiboken2Config.cmake as installed from the repo.

Brad Q
Posts: 102
Joined: Mon Aug 12, 2019 12:10 am

Re: Shiboken coding question

Tue Apr 07, 2020 2:48 pm

So is the answer so obvious no one has bothered to reply or is it that nobody else can see why it is not working either?

fruitoftheloom
Posts: 23911
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Shiboken coding question

Tue Apr 07, 2020 5:06 pm

Brad Q wrote:
Tue Apr 07, 2020 2:48 pm
So is the answer so obvious no one has bothered to reply or is it that nobody else can see why it is not working either?

There is already a long post regards FreeCad:

https://www.raspberrypi.org/forums/view ... 6&t=244151


Plus:

https://www.raspberrypi.org/forums/sear ... ds=Freecad
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot) RaspiOS64 ARM64
Asus ChromeBox 3 Celeron is my other computer...

Brad Q
Posts: 102
Joined: Mon Aug 12, 2019 12:10 am

Re: Shiboken coding question

Tue Apr 07, 2020 5:18 pm

Yeah, I know. If you look at the thread I am one of the posters. I have FreeCAD running via Python2.7/QT4. Python 3.7 has an issue with coin3d(required by FreeCAD), so Python 3.7 is out. BUT there are QT5 packages for Python2.7. Which is where I was at when I ran into this error. Regardless of whether or not FreeCAD will work with the Python2.7/QT5 combination, the issue still stands. It is a programming issue and should not depend on just FreeCAD, but on anything compiling against Shiboken/QT5.


Edit: As alex pointed out below I had this exactly backwards. It is QT5 not Python3.7 that has the issue with Coin.
Last edited by Brad Q on Mon Apr 13, 2020 2:24 pm, edited 1 time in total.

-alex-
Posts: 8
Joined: Mon Apr 13, 2020 12:50 pm

Re: Shiboken coding question

Mon Apr 13, 2020 1:19 pm

Brad Q wrote:
Tue Apr 07, 2020 5:18 pm
Python 3.7 has an issue with coin3d(required by FreeCAD), so Python 3.7 is out.
Hi Brad, why such statement? Please have a look at https://forum.freecadweb.org/viewtopic. ... 80#p340741
AFAIK for now, Freecad compiled on RPI4-Raspbian buster with:
- PY2/Qt4: works
- PY3/Qt4: works with minor troubles
- PY3/Qt5: crash with segfault issue
So, it seems that suspected issue concerns Qt5 with Coin3D.

Brad Q
Posts: 102
Joined: Mon Aug 12, 2019 12:10 am

Re: Shiboken coding question

Mon Apr 13, 2020 2:27 pm

Alex, thanks for catching that. I had it exactly backwards.

However, it still leaves the question of why the above line(first post) works when hard coded but not when variable coded(as it was originally)?

Return to “Advanced users”