Compile w/Py3 & Qt5 for Dummies

Having trouble installing or compiling FreeCAD? Get help here.
wandererfan
Posts: 2246
Joined: Tue Nov 06, 2012 5:42 pm

Re: Compile w/Py3 & Qt5 for Dummies

Postby wandererfan » Sat Dec 01, 2018 12:40 pm

kkremitzki wrote:
Sat Dec 01, 2018 4:25 am
Where do you see the second one?
2 here:
occt-misc-twice.png
occt-misc-twice.png (68.79 KiB) Viewed 334 times
But just 1 here:
occt-misc-synaptic.png
occt-misc-synaptic.png (94.8 KiB) Viewed 334 times
User avatar
sgrogan
Posts: 4677
Joined: Wed Oct 22, 2014 5:02 pm

Re: Compile w/Py3 & Qt5 for Dummies

Postby sgrogan » Sat Dec 01, 2018 5:36 pm

wandererfan wrote:
Sat Dec 01, 2018 12:40 pm
2 here:
Strange :? There is only one on the daily PPA itself: https://launchpad.net/~freecad-maintain ... /+packages
The cmake stuff is indeed in the misc package.
kkremitzki wrote:
Sat Dec 01, 2018 4:25 am
Where do you see the second one?
Would you consider a convenience package that includes all the non-runtime stuff?
User avatar
kkremitzki
Posts: 1227
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: Compile w/Py3 & Qt5 for Dummies

Postby kkremitzki » Sat Dec 01, 2018 6:09 pm

sgrogan wrote:
Sat Dec 01, 2018 5:36 pm
kkremitzki wrote:
Sat Dec 01, 2018 4:25 am
Where do you see the second one?
Would you consider a convenience package that includes all the non-runtime stuff?
Can you be more specific on what should be in there? Are you wanting something like a metapackage that installs all the -dev packages? I had considered something like that but there's advice against doing that since it can cause people to do a "lazy" declaration of dependencies instead of depending on only the specific OCCT packages/features they need.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
sgrogan
Posts: 4677
Joined: Wed Oct 22, 2014 5:02 pm

Re: Compile w/Py3 & Qt5 for Dummies

Postby sgrogan » Sat Dec 01, 2018 6:31 pm

kkremitzki wrote:
Sat Dec 01, 2018 6:09 pm
Can you be more specific on what should be in there? Are you wanting something like a metapackage that installs all the -dev packages? I had considered something like that but there's advice against doing that since it can cause people to do a "lazy" declaration of dependencies instead of depending on only the specific OCCT packages/features they need.
Exactly. FreeCAD ends up needing all/most of OCCT. Good point however, libboost is a good example (they do offer a meta-package) see the PPA control file https://git.launchpad.net/~freecad-main ... build-occt
If it had been me, I might have specified lib-boost-all :(
qurn
Posts: 19
Joined: Wed Oct 10, 2018 4:49 pm

Re: Compile w/Py3 & Qt5 for Dummies

Postby qurn » Sun Dec 02, 2018 5:43 pm

wandererfan wrote:
Thu Nov 29, 2018 7:32 pm
[*]run "make - jX" where X is the number of cores to use
Little correction: With 4 cores it should be make -j3.
And a little side note: With this option the error-warning don't have to be at the end of the terminal output. The different threads print out when ever one is ready to print.

I tried to make a step-by-step guide to compile with py3 and qt5 on a fresh arch-linux installation, but it's really hard. I am able to build it, but i always end up replacing some packages. E.g coin/coin-hg python-pivy/python-pivy-git and i think soqt-hg can not be installed like it is now (the package is last time updated 2015). If i have a working skript i'll post it.

Does someone know which packages of the following are appreciated?
python-pivy/python-pivy-git
coin/coin-hg
soqt/soqt-hg
the hg stands for compatible with Open Inventor.
wmayer
Site Admin
Posts: 13612
Joined: Thu Feb 19, 2009 10:32 am

Re: Compile w/Py3 & Qt5 for Dummies

Postby wmayer » Sun Dec 02, 2018 8:06 pm

soqt/soqt-hg
SoQt is not needed any more for a long time now. I think v0.14 was the very last version where we used it.
User avatar
kkremitzki
Posts: 1227
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: Compile w/Py3 & Qt5 for Dummies

Postby kkremitzki » Sun Dec 02, 2018 8:41 pm

Although FreeCAD doesn't depend on SoQt directly, it's still a transitive dependency by way of Pivy.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
NormandC
Posts: 17813
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Compile w/Py3 & Qt5 for Dummies

Postby NormandC » Tue Jan 08, 2019 12:33 pm

wandererfan wrote:
Thu Nov 29, 2018 7:32 pm
Make a build dir, then in cmakeGui:
  • (...)
  • update Boost_Python36_Library* (eg "/usr/lib/x86_64-linux-gnu/libboost_python3-py36.so")
  • update Boost_Python3_Library* (eg "/usr/lib/x86_64-linux-gnu/libboost_python3.so")
I may be more dummy that others, but I don't get those two parameters. The only Boost related one is BOOST_THREAD_LIBRARY. :?

How do I get those two to show up in cmake-gui? Especially if I'm not supposed to set PYTHON_BASENAME and PYTHON_CONFIG_SUFFIX? Contrary to what PYTHON_BASENAME's tooltip seems to imply ("Same as PYTHON_SUFFIX but for PySide. If left empty, PYTHON_SUFFIX will be used: <PysideConfigPYTHON_BASENAME.cmake>"), I have no PYTHON_SUFFIX variable. :?

Here's the output of cmake-gui after generate:

Code: Select all

Compiler: GNU, version: 7.3.0
prefix: /usr/local
datadir: data
docdir: doc
includedir: include
libdir: /usr/local/lib
cmake: 3.10.2
Boost version: 1.65.1
Found the following Boost libraries:
  filesystem
  program_options
  regex
  system
  thread
  chrono
  date_time
  atomic
Found Xerces-C: /usr/lib/x86_64-linux-gnu/libxerces-c.so
PyCXX found:
  Headers:  /home/normand2/compilation/FreeCAD/freecad-code/src
  Sources:  /home/normand2/compilation/FreeCAD/freecad-code/src/CXX
  Version:  6.2.8
-- Found OCE/OpenCASCADE version: 7.3.0
-- OCE/OpenCASCADE include directory: /usr/include/occt
-- OCE/OpenCASCADE shared libraries directory: /usr/lib/x86_64-linux-gnu
The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.3/VTKTargets.cmake"
but not all the files it references.

The imported target "vtk" references the file
   "/usr/bin/vtk"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.3/VTKTargets.cmake"
but not all the files it references.

VTK components: vtkCommonCore;vtkCommonDataModel;vtkFiltersVerdict;vtkIOXML;vtkFiltersCore;vtkFiltersGeneral;vtkIOLegacy;vtkFiltersExtraction;vtkFiltersSources;vtkFiltersGeometry;vtkIOMPIParallel;vtkParallelMPI;vtkhdf5;vtkRenderingCore;vtkInteractionStyle;vtkRenderingFreeType
Check for medfile (libmed and libmedc) ...
We guess that libmed was built using hdf5-openmpi version
Checking for module 'Coin'
  No package 'Coin' found
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.11.2/Shiboken2Config.cmake:5 (include):
  include could not find load file:

    /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.11.2/Shiboken2Config-python2.7.cmake
Call Stack (most recent call first):
  CMakeLists.txt:973 (find_package)


PYTHON_CONFIG_SUFFIX: -python2.7.x86_64-linux-gnu
libshiboken built for Release
-- matplotlib-2.1.1 has been found.
Platform is 64-bit, set -D_OCC64
Build type: Release
git
/home/normand2/compilation/FreeCAD/freecad-build/src/Build/Version.h.out written

Found zipios++: 
Found zipios++ headers.
setting gcc options: -Wall -Werror -Wno-deprecated -pedantic-errors
CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:1626 (message):
  No header defined for python27; skipping header check
Call Stack (most recent call first):
  src/Mod/Path/libarea/CMakeLists.txt:20 (find_package)


Could NOT find Boost
CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:1626 (message):
  No header defined for python2; skipping header check
Call Stack (most recent call first):
  src/Mod/Path/libarea/CMakeLists.txt:23 (find_package)


Could NOT find Boost
Boost version: 1.65.1
Found the following Boost libraries:
  python
found Boost: 1_65_1
boost-incude dirs are: /usr/include
boost-python lib is: /usr/lib/x86_64-linux-gnu/libboost_python.so
boost_LIBRARY_DIRS is: /usr/lib/x86_64-linux-gnu
Boost_LIBRARIES is: /usr/lib/x86_64-linux-gnu/libboost_python.so
area module (for Path Workbench) will be installed to: /usr/local/lib
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
=======================================
Now run 'make' to build FreeCAD
=======================================

Configuring incomplete, errors occurred!
See also "/home/normand2/compilation/FreeCAD/freecad-build/CMakeFiles/CMakeOutput.log".
See also "/home/normand2/compilation/FreeCAD/freecad-build/CMakeFiles/CMakeError.log".
Thanks.
wandererfan
Posts: 2246
Joined: Tue Nov 06, 2012 5:42 pm

Re: Compile w/Py3 & Qt5 for Dummies

Postby wandererfan » Tue Jan 08, 2019 1:53 pm

NormandC wrote:
Tue Jan 08, 2019 12:33 pm
I may be more dummy that others, but I don't get those two parameters. The only Boost related one is BOOST_THREAD_LIBRARY. :?
Is the "Advanced" box (upper right) checked?:
BoostOptionsCMake.png
BoostOptionsCMake.png (174.17 KiB) Viewed 155 times
User avatar
NormandC
Posts: 17813
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Compile w/Py3 & Qt5 for Dummies

Postby NormandC » Wed Jan 09, 2019 4:22 am

Ah man, I'm embarrassed. I had never noticed that checkbox before. :oops: :roll:

Thanks. Will give it another go.