compile freecad on buster

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
skull
Posts: 10
Joined: Sat Aug 18, 2018 9:25 am

compile freecad on buster

Post by skull »

Hallo,
There is no QT4 on debian 10 Buster. So, I have to build a freecad against qt5.
The dependics are for qt4 :

Code: Select all

sudo apt install build-essential cmake python python-matplotlib libtool libcoin80-dev libsoqt4-dev libxerces-c-dev libboost-dev libboost-filesystem-dev libboost-regex-dev libboost-program-options-dev libboost-signals-dev libboost-thread-dev libboost-python-dev libqt4-dev libqt4-opengl-dev qt4-dev-tools python-dev python-pyside pyside-tools libeigen3-dev libqtwebkit-dev libshiboken-dev libpyside-dev libode-dev swig libzipios++-dev libfreetype6-dev liboce-foundation-dev liboce-modeling-dev liboce-ocaf-dev liboce-visualization-dev liboce-ocaf-lite-dev libsimage-dev checkinstall python-pivy python-qt4 doxygen libspnav-dev oce-draw liboce-foundation-dev liboce-modeling-dev liboce-ocaf-dev liboce-ocaf-lite-dev liboce-visualization-dev libmedc-dev libvtk6-dev libproj-dev 
So the following packages debian 10 buster did not find.

Code: Select all

E: Package 'python-pyside' has no installation candidate
E: Unable to locate package pyside-tools
E: Unable to locate package libshiboken-dev
E: Unable to locate package libpyside-dev
E: Unable to locate package checkinstall
Insteed I select

Code: Select all

pyside2-tools
libshiboken2-dev
libpyside2-dev	
still missing python-pyside and checkinstall.
Have some one a full dependics package list for buster?
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: compile freecad on buster

Post by wmayer »

The dependencies you listed are somewhat outdated and a few things are not needed any more:
libtool, libsoqt4-dev

Also checkinstall is not really needed. It was used to create a .deb package when doing a make install in order to get rid of installed files. But it suffices to have a local build of FreeCAD using only make

As you already installed the PySide2, shiboken2 and the Qt5 packages it should be no problem to build FreeCAD now. I recommend to also install cmake-gui because it's easier to set the needed switches. When running cmake's configure once you should enable the option BUILD_QT5
skull
Posts: 10
Joined: Sat Aug 18, 2018 9:25 am

Re: compile freecad on buster

Post by skull »

Thank you for the Information that libsoqt4-dev is outdated. Did not find a alternative for it.

Because the Change from qt4 to qt5

I made the following changes in the packed selection.
pyside-tools -->pyside2-tools
libshiboken-dev --> libshiboken2-dev
libpyside-dev --> libpyside2-dev
python-pyside --> python-pyside2uic (User Interface Compiler for PySide2 (Python 2))
libsoqt4-dev --> ??????? Outdated
libqt4-dev --> pyqt5-dev
libqt4-opengl-dev --> libqt5opengl5-dev
qt4-dev-tools --> qt5base-dev-tools
python-qt4 --> python-pyqt5 and python3-pyqt5

I installed some packages extra:
shiboken
python-qt-binding
python3-qt-binding
Yes I installed recomanded cmake-qt-gui.

But because I never use it before I tried the old way:

Code: Select all

git clone https://github.com/FreeCAD/FreeCAD.git free-cad-code
and then

Code: Select all

cmake -DBUILD_QT5=ON        
CMake Deprecation Warning at CMakeLists.txt:22 (cmake_policy):
  The OLD behavior for policy CMP0050 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- Compiler: GNU, version: 8.2.0
-- prefix: /usr/local
-- datadir: data
-- docdir: doc
-- includedir: include
-- libdir: /usr/local/lib
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   filesystem
--   program_options
--   regex
--   signals
--   system
--   thread
--   chrono
--   date_time
--   atomic
-- Found Xerces-C: /usr/lib/x86_64-linux-gnu/libxerces-c.so
-- PyCXX found:
--   Headers:  /home/hn/free-cad-code/src
--   Sources:  /home/hn/free-cad-code/src/CXX
--   Version:  6.2.8
-- -- OpenCASCADE Community Edition has been found.
-- -- Found OCE/OpenCASCADE version: 6.9.1
-- -- OCE/OpenCASCADE include directory: /usr/lib/x86_64-linux-gnu/oce-0.17/../../../include/oce
-- -- OCE/OpenCASCADE shared libraries directory: 
-- 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) ...
CMake Warning at CMakeLists.txt:874 (find_package):
  By not providing "FindQt5Svg.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5Svg", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5Svg" with any
  of the following names:

    Qt5SvgConfig.cmake
    qt5svg-config.cmake

  Add the installation prefix of "Qt5Svg" to CMAKE_PREFIX_PATH or set
  "Qt5Svg_DIR" to a directory containing one of the above files.  If "Qt5Svg"
  provides a separate development package or SDK, be sure it has been
  installed.


CMake Warning at CMakeLists.txt:875 (find_package):
  By not providing "FindQt5UiTools.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Qt5UiTools", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5UiTools" with
  any of the following names:

    Qt5UiToolsConfig.cmake
    qt5uitools-config.cmake

  Add the installation prefix of "Qt5UiTools" to CMAKE_PREFIX_PATH or set
  "Qt5UiTools_DIR" to a directory containing one of the above files.  If
  "Qt5UiTools" provides a separate development package or SDK, be sure it has
  been installed.


CMake Warning at CMakeLists.txt:879 (find_package):
  By not providing "FindQt5WebKitWidgets.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "Qt5WebKitWidgets", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5WebKitWidgets"
  with any of the following names:

    Qt5WebKitWidgetsConfig.cmake
    qt5webkitwidgets-config.cmake

  Add the installation prefix of "Qt5WebKitWidgets" to CMAKE_PREFIX_PATH or
  set "Qt5WebKitWidgets_DIR" to a directory containing one of the above
  files.  If "Qt5WebKitWidgets" provides a separate development package or
  SDK, be sure it has been installed.


CMake Warning (dev) at /usr/share/cmake-3.12/Modules/FindOpenGL.cmake:270 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  CMakeLists.txt:928 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Checking for module 'Coin'
--   No package 'Coin' found
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.11.0/Shiboken2Config.cmake:5 (include):
  include could not find load file:

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


====================
shiboken2 not found.
====================

CMake Error at /usr/lib/x86_64-linux-gnu/cmake/PySide2-5.11.0/PySide2Config.cmake:5 (include):
  include could not find load file:

    /usr/lib/x86_64-linux-gnu/cmake/PySide2-5.11.0/PySide2Config-python2.7.cmake
Call Stack (most recent call first):
  CMakeLists.txt:983 (find_package)


==================
PySide2 not found.
==================

-- -- matplotlib-2.2.2 has been found.
-- Platform is 64-bit, set -D_OCC64
-- Build type: 
-- setting gcc options: -Wall -Werror -Wno-deprecated -pedantic-errors
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   python27
-- found Boost: 1_62
-- boost-incude dirs are: /usr/include
-- boost-python lib is: 
-- boost_LIBRARY_DIRS is: /usr/lib/x86_64-linux-gnu
-- Boost_LIBRARIES is: /usr/lib/x86_64-linux-gnu/libboost_python-py27.so
-- area module (for Path Workbench) will be installed to: /usr/local/lib
-- Note: Doxygen docs will look better with graphviz's dot installed.
-- Coin3D doc is installed
--   Found /usr/share/doc/libcoin80-doc/html/coin.tag.gz
--   You should uncompress this file if you want to use it for source doc generation
=======================================
Now run 'make' to build FreeCAD
=======================================

-- Configuring incomplete, errors occurred!
See also "/home/hn/free-cad-code/CMakeFiles/CMakeOutput.log".
See also "/home/hn/free-cad-code/CMakeFiles/CMakeError.log".
So I looked in

Code: Select all

cat free-cad-code/CMakeFiles/CMakeError.log
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/hn/free-cad-code/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_80cfa/fast"
/usr/bin/make -f CMakeFiles/cmTC_80cfa.dir/build.make CMakeFiles/cmTC_80cfa.dir/build
make[1]: Entering directory '/home/hn/free-cad-code/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_80cfa.dir/CheckSymbolExists.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_80cfa.dir/CheckSymbolExists.c.o   -c /home/hn/free-cad-code/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_80cfa
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_80cfa.dir/link.txt --verbose=1
/usr/bin/cc      -rdynamic CMakeFiles/cmTC_80cfa.dir/CheckSymbolExists.c.o  -o cmTC_80cfa 
/usr/bin/ld: CMakeFiles/cmTC_80cfa.dir/CheckSymbolExists.c.o: in function `main':
CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_80cfa.dir/build.make:87: cmTC_80cfa] Error 1
make[1]: Leaving directory '/home/hn/free-cad-code/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_80cfa/fast] Error 2

File /home/hn/free-cad-code/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/hn/free-cad-code/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_4e857/fast"
/usr/bin/make -f CMakeFiles/cmTC_4e857.dir/build.make CMakeFiles/cmTC_4e857.dir/build
make[1]: Entering directory '/home/hn/free-cad-code/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_4e857.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_4e857.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.12/Modules/CheckFunctionExists.c
Linking C executable cmTC_4e857
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4e857.dir/link.txt --verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=pthread_create    -rdynamic CMakeFiles/cmTC_4e857.dir/CheckFunctionExists.c.o  -o cmTC_4e857 -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_4e857.dir/build.make:87: cmTC_4e857] Error 1
make[1]: Leaving directory '/home/hn/free-cad-code/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_4e857/fast] Error 2
:?:
Seems like pthread.h is missing?
:?:
Knows some one what is wrong?
User avatar
kkremitzki
Veteran
Posts: 2511
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: compile freecad on buster

Post by kkremitzki »

skull wrote: Sat Aug 18, 2018 6:19 pm
:?:
Seems like pthread.h is missing?
:?:
Knows some one what is wrong?
The pthread.h message is a red herring that shows up when your cmake command did not actually succeed. See:

Code: Select all

CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.11.0/Shiboken2Config.cmake:5 (include):
  include could not find load file:

    /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.11.0/Shiboken2Config-python2.7.cmake
That means you need libshiboken2-dev. Edit: Oops, actually the problem is that the file is actually

Code: Select all

/usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.11.0/Shiboken2Config-python2.7.x86_64-linux-gnu.cmake
There are actually several other missing packages based on your cmake log. For example, one of the first warnings looks like:

Code: Select all

CMake Warning at CMakeLists.txt:874 (find_package):
  By not providing "FindQt5Svg.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5Svg", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5Svg" with any
  of the following names:

    Qt5SvgConfig.cmake
    qt5svg-config.cmake

  Add the installation prefix of "Qt5Svg" to CMAKE_PREFIX_PATH or set
  "Qt5Svg_DIR" to a directory containing one of the above files.  If "Qt5Svg"
  provides a separate development package or SDK, be sure it has been
  installed.
In order to resolve this, I recommend doing sudo apt install apt-file && sudo apt-file update to install and set up the apt-file tool. Then, you can do

Code: Select all

apt-file search Qt5SvgConfig.cmake
to find what package contains that missing cmake file. You'll see output like this:

Code: Select all

libqt5svg5-dev: /usr/lib/x86_64-linux-gnu/cmake/Qt5Svg/Qt5SvgConfig.cmake
which lets you know it's the libqt5svg5-dev package that you 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
kkremitzki
Veteran
Posts: 2511
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: compile freecad on buster

Post by kkremitzki »

Give this a try:

Code: Select all

cmake -DBUILD_QT5=ON -DPYTHON_CONFIG_SUFFIX="-python2.7.x86_64-linux-gnu"
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.
skull
Posts: 10
Joined: Sat Aug 18, 2018 9:25 am

Re: compile freecad on buster

Post by skull »

Thank you for the shot = -DPYTHON_CONFIG_SUFFIX="-python2.7.x86_64-linux-gnu" :D

Code: Select all

cmake -DBUILD_QT5=ON -DPYTHON_CONFIG_SUFFIX="-python2.7.x86_64-linux-gnu"
CMake Deprecation Warning at CMakeLists.txt:22 (cmake_policy):
  The OLD behavior for policy CMP0050 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- Compiler: GNU, version: 8.2.0
-- prefix: /usr/local
-- datadir: data
-- docdir: doc
-- includedir: include
-- libdir: /usr/local/lib
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   filesystem
--   program_options
--   regex
--   signals
--   system
--   thread
--   chrono
--   date_time
--   atomic
-- Found Xerces-C: /usr/lib/x86_64-linux-gnu/libxerces-c.so
-- PyCXX found:
--   Headers:  /home/hn/free-cad-code/src
--   Sources:  /home/hn/free-cad-code/src/CXX
--   Version:  6.2.8
-- -- OpenCASCADE Community Edition has been found.
-- -- Found OCE/OpenCASCADE version: 6.9.1
-- -- OCE/OpenCASCADE include directory: /usr/lib/x86_64-linux-gnu/oce-0.17/../../../include/oce
-- -- OCE/OpenCASCADE shared libraries directory: 
-- 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) ...
CMake Warning at CMakeLists.txt:874 (find_package):
  By not providing "FindQt5Svg.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5Svg", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5Svg" with any
  of the following names:

    Qt5SvgConfig.cmake
    qt5svg-config.cmake

  Add the installation prefix of "Qt5Svg" to CMAKE_PREFIX_PATH or set
  "Qt5Svg_DIR" to a directory containing one of the above files.  If "Qt5Svg"
  provides a separate development package or SDK, be sure it has been
  installed.


CMake Warning at CMakeLists.txt:875 (find_package):
  By not providing "FindQt5UiTools.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Qt5UiTools", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5UiTools" with
  any of the following names:

    Qt5UiToolsConfig.cmake
    qt5uitools-config.cmake

  Add the installation prefix of "Qt5UiTools" to CMAKE_PREFIX_PATH or set
  "Qt5UiTools_DIR" to a directory containing one of the above files.  If
  "Qt5UiTools" provides a separate development package or SDK, be sure it has
  been installed.


CMake Warning at CMakeLists.txt:879 (find_package):
  By not providing "FindQt5WebKitWidgets.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "Qt5WebKitWidgets", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5WebKitWidgets"
  with any of the following names:

    Qt5WebKitWidgetsConfig.cmake
    qt5webkitwidgets-config.cmake

  Add the installation prefix of "Qt5WebKitWidgets" to CMAKE_PREFIX_PATH or
  set "Qt5WebKitWidgets_DIR" to a directory containing one of the above
  files.  If "Qt5WebKitWidgets" provides a separate development package or
  SDK, be sure it has been installed.


CMake Warning (dev) at /usr/share/cmake-3.12/Modules/FindOpenGL.cmake:270 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  CMakeLists.txt:928 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Checking for module 'Coin'
--   No package 'Coin' found
-- libshiboken built for Release
-- -- matplotlib-2.2.2 has been found.
-- Platform is 64-bit, set -D_OCC64
-- Build type: 
-- setting gcc options: -Wall -Werror -Wno-deprecated -pedantic-errors
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   python27
-- found Boost: 1_62
-- boost-incude dirs are: /usr/include
-- boost-python lib is: 
-- boost_LIBRARY_DIRS is: /usr/lib/x86_64-linux-gnu
-- Boost_LIBRARIES is: /usr/lib/x86_64-linux-gnu/libboost_python-py27.so
-- area module (for Path Workbench) will be installed to: /usr/local/lib
-- Note: Doxygen docs will look better with graphviz's dot installed.
-- Coin3D doc is installed
--   Found /usr/share/doc/libcoin80-doc/html/coin.tag.gz
--   You should uncompress this file if you want to use it for source doc generation
=======================================
Now run 'make' to build FreeCAD
=======================================

-- Configuring done
-- Generating done
-- Build files have been written to: /home/hn/free-cad-code
Runs with less errors. :D now I hunt PythonTkWidgets.so :twisted:.
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: compile freecad on buster

Post by Jee-Bee »

skull wrote: Sat Aug 18, 2018 7:30 pm Thank you for the shot = -DPYTHON_CONFIG_SUFFIX="-python2.7.x86_64-linux-gnu" :D
why not python3?
User avatar
kkremitzki
Veteran
Posts: 2511
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: compile freecad on buster

Post by kkremitzki »

Jee-Bee wrote: Sat Aug 18, 2018 7:47 pm
skull wrote: Sat Aug 18, 2018 7:30 pm Thank you for the shot = -DPYTHON_CONFIG_SUFFIX="-python2.7.x86_64-linux-gnu" :D
why not python3?
The pivy package in buster does not support Python 3 yet (https://lists.debian.org/debian-science ... 00041.html), nor does PySide 2 fully. (https://bugs.debian.org/cgi-bin/bugrepo ... bug=906020)
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.
skull
Posts: 10
Joined: Sat Aug 18, 2018 9:25 am

Re: compile freecad on buster

Post by skull »

I am happy that there is a python 3 solution for the future, but there are some workbenches like the assembly2plus that are still in python2, but I will test both.
https://github.com/CPFL/Autoware/issues/795
They missed libvtkRenderingPythonTkWidgets.so as well.
Find it on the same place, so I linked it the same way

Code: Select all

sudo ln -s /usr/lib/python2.7/dist-packages/vtk/libvtkRenderingPythonTkWidgets.x86_64-linux-gnu.so /usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so
and to the next step

Code: Select all

CMake Deprecation Warning at CMakeLists.txt:22 (cmake_policy):
  The OLD behavior for policy CMP0050 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- Compiler: GNU, version: 8.2.0
-- prefix: /usr/local
-- datadir: data
-- docdir: doc
-- includedir: include
-- libdir: /usr/local/lib
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   filesystem
--   program_options
--   regex
--   signals
--   system
--   thread
--   chrono
--   date_time
--   atomic
-- Found Xerces-C: /usr/lib/x86_64-linux-gnu/libxerces-c.so
-- PyCXX found:
--   Headers:  /home/hn/free-cad-code/src
--   Sources:  /home/hn/free-cad-code/src/CXX
--   Version:  6.2.8
-- -- OpenCASCADE Community Edition has been found.
-- -- Found OCE/OpenCASCADE version: 6.9.1
-- -- OCE/OpenCASCADE include directory: /usr/lib/x86_64-linux-gnu/oce-0.17/../../../include/oce
-- -- OCE/OpenCASCADE shared libraries directory: 
-- 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) ...
CMake Warning at CMakeLists.txt:874 (find_package):
  By not providing "FindQt5Svg.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5Svg", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5Svg" with any
  of the following names:

    Qt5SvgConfig.cmake
    qt5svg-config.cmake

  Add the installation prefix of "Qt5Svg" to CMAKE_PREFIX_PATH or set
  "Qt5Svg_DIR" to a directory containing one of the above files.  If "Qt5Svg"
  provides a separate development package or SDK, be sure it has been
  installed.


CMake Warning at CMakeLists.txt:875 (find_package):
  By not providing "FindQt5UiTools.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Qt5UiTools", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5UiTools" with
  any of the following names:

    Qt5UiToolsConfig.cmake
    qt5uitools-config.cmake

  Add the installation prefix of "Qt5UiTools" to CMAKE_PREFIX_PATH or set
  "Qt5UiTools_DIR" to a directory containing one of the above files.  If
  "Qt5UiTools" provides a separate development package or SDK, be sure it has
  been installed.


CMake Warning at CMakeLists.txt:879 (find_package):
  By not providing "FindQt5WebKitWidgets.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "Qt5WebKitWidgets", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5WebKitWidgets"
  with any of the following names:

    Qt5WebKitWidgetsConfig.cmake
    qt5webkitwidgets-config.cmake

  Add the installation prefix of "Qt5WebKitWidgets" to CMAKE_PREFIX_PATH or
  set "Qt5WebKitWidgets_DIR" to a directory containing one of the above
  files.  If "Qt5WebKitWidgets" provides a separate development package or
  SDK, be sure it has been installed.


CMake Warning (dev) at /usr/share/cmake-3.12/Modules/FindOpenGL.cmake:270 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  CMakeLists.txt:928 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Checking for module 'Coin'
--   No package 'Coin' found
-- libshiboken built for Release
-- -- matplotlib-2.2.2 has been found.
-- Platform is 64-bit, set -D_OCC64
-- Build type: 
-- setting gcc options: -Wall -Werror -Wno-deprecated -pedantic-errors
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   python27
-- found Boost: 1_62
-- boost-incude dirs are: /usr/include
-- boost-python lib is: 
-- boost_LIBRARY_DIRS is: /usr/lib/x86_64-linux-gnu
-- Boost_LIBRARIES is: /usr/lib/x86_64-linux-gnu/libboost_python-py27.so
-- area module (for Path Workbench) will be installed to: /usr/local/lib
-- Note: Doxygen docs will look better with graphviz's dot installed.
-- Coin3D doc is installed
--   Found /usr/share/doc/libcoin80-doc/html/coin.tag.gz
--   You should uncompress this file if you want to use it for source doc generation
=======================================
Now run 'make' to build FreeCAD
=======================================

-- Configuring done
-- Generating done
-- Build files have been written to: /home/hn/free-cad-code
skull
Posts: 10
Joined: Sat Aug 18, 2018 9:25 am

Re: compile freecad on buster

Post by skull »

Tryed the recomanded

Code: Select all

sudo apt install apt-file
sudo apt-file update
apt-file search Qt5Svg-config.cmake
Yes and installed libqt5svg5-dev

Code: Select all

cmake -DBUILD_QT5=ON -DPYTHON_CONFIG_SUFFIX="-python2.7.x86_64-linux-gnu"
CMake Deprecation Warning at CMakeLists.txt:22 (cmake_policy):
  The OLD behavior for policy CMP0050 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- Compiler: GNU, version: 8.2.0
-- prefix: /usr/local
-- datadir: data
-- docdir: doc
-- includedir: include
-- libdir: /usr/local/lib
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   filesystem
--   program_options
--   regex
--   signals
--   system
--   thread
--   chrono
--   date_time
--   atomic
-- Found Xerces-C: /usr/lib/x86_64-linux-gnu/libxerces-c.so
-- PyCXX found:
--   Headers:  /home/hn/free-cad-code/src
--   Sources:  /home/hn/free-cad-code/src/CXX
--   Version:  6.2.8
-- -- OpenCASCADE Community Edition has been found.
-- -- Found OCE/OpenCASCADE version: 6.9.1
-- -- OCE/OpenCASCADE include directory: /usr/lib/x86_64-linux-gnu/oce-0.17/../../../include/oce
-- -- OCE/OpenCASCADE shared libraries directory: 
-- 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) ...
CMake Warning at CMakeLists.txt:875 (find_package):
  By not providing "FindQt5UiTools.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Qt5UiTools", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5UiTools" with
  any of the following names:

    Qt5UiToolsConfig.cmake
    qt5uitools-config.cmake

  Add the installation prefix of "Qt5UiTools" to CMAKE_PREFIX_PATH or set
  "Qt5UiTools_DIR" to a directory containing one of the above files.  If
  "Qt5UiTools" provides a separate development package or SDK, be sure it has
  been installed.


CMake Warning at CMakeLists.txt:879 (find_package):
  By not providing "FindQt5WebKitWidgets.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "Qt5WebKitWidgets", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5WebKitWidgets"
  with any of the following names:

    Qt5WebKitWidgetsConfig.cmake
    qt5webkitwidgets-config.cmake

  Add the installation prefix of "Qt5WebKitWidgets" to CMAKE_PREFIX_PATH or
  set "Qt5WebKitWidgets_DIR" to a directory containing one of the above
  files.  If "Qt5WebKitWidgets" provides a separate development package or
  SDK, be sure it has been installed.


CMake Warning (dev) at /usr/share/cmake-3.12/Modules/FindOpenGL.cmake:270 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  CMakeLists.txt:928 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Checking for module 'Coin'
--   No package 'Coin' found
-- libshiboken built for Release
-- -- matplotlib-2.2.2 has been found.
-- Platform is 64-bit, set -D_OCC64
-- Build type: 
-- setting gcc options: -Wall -Werror -Wno-deprecated -pedantic-errors
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   python27
-- found Boost: 1_62
-- boost-incude dirs are: /usr/include
-- boost-python lib is: 
-- boost_LIBRARY_DIRS is: /usr/lib/x86_64-linux-gnu
-- Boost_LIBRARIES is: /usr/lib/x86_64-linux-gnu/libboost_python-py27.so
-- area module (for Path Workbench) will be installed to: /usr/local/lib
-- Note: Doxygen docs will look better with graphviz's dot installed.
-- Coin3D doc is installed
--   Found /usr/share/doc/libcoin80-doc/html/coin.tag.gz
--   You should uncompress this file if you want to use it for source doc generation
=======================================
Now run 'make' to build FreeCAD
=======================================

-- Configuring done
-- Generating done
-- Build files have been written to: /home/hn/free-cad-code
apt-file is nice. :D
Post Reply