compile with py3 and Qt5 on Debian Stretch

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
bernd
Posts: 8352
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: compile with py3 and Qt5 on Debian Stretch

Postby bernd » Wed Dec 19, 2018 10:03 pm

https://forum.freecadweb.org/viewtopic. ... 90#p274393 helped myself ...

eventually ...

Code: Select all

cmake                                                       \
-DCMAKE_INSTALL_PREFIX:PATH=/opt/local/FreeCAD-0.18         \
-DBUILD_QT5=ON                                              \
-DCMAKE_BUILD_TYPE="DEBUG"                                  \
-DFREECAD_BUILD_DEBIAN=ON                                   \
-DOCC_INCLUDE_DIR="/usr/include/occt"                       \
-DFREECAD_USE_OCCT_VARIANT="Official"                       \
-DPYTHON_BASENAME=".cpython-37m-x86_64-linux-gnu"           \
-DPYTHON_CONFIG_SUFFIX=".cpython-37m-x86_64-linux-gnu"      \
-DPYTHON_EXECUTABLE="/usr/bin/python3.7"                    \
../freecad

or the whole build script for a Debian Buster scratch install ... https://github.com/berndhahnebach/FreeC ... Qt5_Py3.sh
triplus
Posts: 8689
Joined: Mon Dec 12, 2011 4:45 pm

Re: compile with py3 and Qt5 on Debian Stretch

Postby triplus » Thu Dec 20, 2018 5:32 pm

wmayer wrote:
Fri Nov 30, 2018 8:55 am
bernd wrote:
Thu Nov 29, 2018 9:30 pm
I'm not really able to solve this Werner ...
kkremitzki wrote:
Tue Nov 20, 2018 10:46 pm
bernd wrote:
Tue Nov 20, 2018 10:42 pm
I havae problems with Qt5 on Debian Buster ...
Can you try adding -DPYTHON_CONFIG_SUFFIX="-python2.7.x86_64-linux-gnu" to your cmake flags?
This does not work on Python3. Means if I use 3.6 instead of 2.7 the errors do not vanish like for 2.7
Which errors?
Note, that with recent commits from Wednesday it should now work that CMake determines itself the variable PYTHON_CONFIG_SUFFIX. Therefore it reads in Shiboken2Config.cmake which internally sets PYTHON_CONFIG_SUFFIX to an inappropriate value. Afterwards from the given path of the config file CMake searches for further config files which has .cpython<PYTHON_VERSION> in its name and if it has found one it determines the correct value of PYTHON_CONFIG_SUFFIX and then re-reads Shiboken2Config.cmake.

You can check if the procedure succeeded by looking at the CMake output. You should find a line of the form: PYTHON_CONFIG_SUFFIX: ...
git commit 1dded002ca
I can confirm setting (Ubuntu 16.04):

Code: Select all

-DBUILD_QT5=1 -DPYTHON_EXECUTABLE="/usr/bin/python3"
Should suffice (CMake does the rest).
User avatar
bernd
Posts: 8352
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: compile with py3 and Qt5 on Debian Stretch

Postby bernd » Sun Dec 23, 2018 3:31 am

you are right, it is much simpler. On Debian Buster I need with all packages from Debian accept pivy for Py3:

Code: Select all

cmake  -DBUILD_QT5=1  -DPYTHON_EXECUTABLE="/usr/bin/python3"  -DOCCT_CMAKE_FALLBACK=True   ../freecad
reox
Posts: 649
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: compile with py3 and Qt5 on Debian Stretch

Postby reox » Sat Dec 29, 2018 11:24 am

I read through this thread now and I'm wondering if it would be possible to create nightly builds for debian testing or unstable with the current set of packaging?
I have pbuilder setup for some packages of mine and could try to integrate a nightly build there.
Or is there already something like this? (not the ubuntu ppa)
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: compile with py3 and Qt5 on Debian Stretch

Postby NormandC » Sat Dec 29, 2018 10:30 pm

The issue is: where to host them? A properly configured debian repository is needed. The current Releases page on GitHub isn't suited for this.
reox
Posts: 649
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: compile with py3 and Qt5 on Debian Stretch

Postby reox » Sun Dec 30, 2018 12:56 pm

I use reprepro (https://packages.debian.org/stretch/reprepro) for this.
I could build and host them on my machine, but that depends on the traffic.

Isnt it possible to build also debian packages on build.opensuse.org? In this case you could simply build it there. It looks like the appimages are already build there.
wmayer
Site Admin
Posts: 14813
Joined: Thu Feb 19, 2009 10:32 am

Re: compile with py3 and Qt5 on Debian Stretch

Postby wmayer » Sun Dec 30, 2018 1:24 pm

NormandC wrote:
Sat Dec 29, 2018 10:30 pm
The issue is: where to host them? A properly configured debian repository is needed. The current Releases page on GitHub isn't suited for this.
Basically it doesn't matter where to host the files. The only important thing is to provide the required directory structure and files. I remember that several years ago someone succeeded to have the repository on dropbox.
reox
Posts: 649
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: compile with py3 and Qt5 on Debian Stretch

Postby reox » Sat Jan 05, 2019 7:21 pm

Dugh... :oops: I remembered just now, that I already wrote a script to build the latest freecad version using the stuff from the ppa: https://gist.github.com/reox/522922a1a6 ... edd484f48f
better look on your own gist :lol:

I'm currently testing this on my pbuilder machine

edit: But this does not build fully...

Code: Select all

make[1]: Leaving directory '/home/vmmanage/packages/FreeCAD/obj-x86_64-linux-gnu'
   dh_install -O--buildsystem=cmake -O--parallel
dh_install: Compatibility levels before 9 are deprecated (level 7 in use)
dh_install: Cannot find (any matches for) "usr/lib/freecad-daily/lib" (tried in ., debian/tmp)

dh_install: freecad-daily missing files: usr/lib/freecad-daily/lib
dh_install: missing files, aborting
make: *** [debian/rules:8: binary] Error 25
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2

Code: Select all

$ ls -al debian/freecad-daily/usr/lib/freecad-daily/
total 16
drwxr-xr-x  4 root root 4096 Jan  6 00:28 .
drwxr-xr-x  3 root root 4096 Jan  6 00:28 ..
drwxr-xr-x  2 root root 4096 Jan  6 00:27 bin
drwxr-xr-x 35 root root 4096 Jan  6 00:27 Mod
fandres
Posts: 5
Joined: Sun Feb 25, 2018 7:24 pm

Re: compile with py3 and Qt5 on Debian Stretch

Postby fandres » Thu Aug 29, 2019 2:57 am

I have also not managed to compile freecad in a debited cluster :(. I have the following errors:

CMake Error at cMake/FindOpenCasCade.cmake:95 (file):
file STRINGS file "/usr/include/occt/Standard_Version.hxx" cannot be read.
Call Stack (most recent call first):
CMakeLists.txt:668 (find_package)


CMake Error at cMake/FindOpenCasCade.cmake:98 (string):
string sub-command REGEX, mode MATCH needs at least 5 arguments total to
command.
Call Stack (most recent call first):
CMakeLists.txt:668 (find_package)


CMake Error at cMake/FindOpenCasCade.cmake:99 (file):
file STRINGS file "/usr/include/occt/Standard_Version.hxx" cannot be read.
Call Stack (most recent call first):
CMakeLists.txt:668 (find_package)


CMake Error at cMake/FindOpenCasCade.cmake:102 (string):
string sub-command REGEX, mode MATCH needs at least 5 arguments total to
command.
Call Stack (most recent call first):
CMakeLists.txt:668 (find_package)


CMake Error at cMake/FindOpenCasCade.cmake:103 (file):
file STRINGS file "/usr/include/occt/Standard_Version.hxx" cannot be read.
Call Stack (most recent call first):
CMakeLists.txt:668 (find_package)


CMake Error at cMake/FindOpenCasCade.cmake:106 (string):
string sub-command REGEX, mode MATCH needs at least 5 arguments total to
command.
Call Stack (most recent call first):
CMakeLists.txt:668 (find_package)
fandres
Posts: 5
Joined: Sun Feb 25, 2018 7:24 pm

Re: compile with py3 and Qt5 on Debian Stretch

Postby fandres » Thu Aug 29, 2019 4:02 am

I have already compiled it, my directories were dirty.