Build 0.17 on Debian Testing (Stretch)
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Build 0.17 on Debian Testing (Stretch)
Finally got 0.17 built to go through. In addition to the compile instructions for Linux I had to:
* /usr/lib/cmake/vtk-6.3
Grep for vtkRenderingPythonTkWidgets and comment out or delete
all references to it.
* <cmake>/src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/link.txt
After ..../libhdf5.so add the following libraries:
- /usr/lib/openmpi/lib/libmpi_cxx.so
- /usr/lib/openmpi/lib/libmpi.so
I don't know anything about cmake, so I could not figure out how to properly fix the missing libraries for linking SMESH.
Other projects have run into the issue with VTK's cmake file - if I read the comments in diverse bug reports correctly this might not get fixed.
Thought this might help others on Stretch who don't want to install a Ubuntu VM ....
* /usr/lib/cmake/vtk-6.3
Grep for vtkRenderingPythonTkWidgets and comment out or delete
all references to it.
* <cmake>/src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/link.txt
After ..../libhdf5.so add the following libraries:
- /usr/lib/openmpi/lib/libmpi_cxx.so
- /usr/lib/openmpi/lib/libmpi.so
I don't know anything about cmake, so I could not figure out how to properly fix the missing libraries for linking SMESH.
Other projects have run into the issue with VTK's cmake file - if I read the comments in diverse bug reports correctly this might not get fixed.
Thought this might help others on Stretch who don't want to install a Ubuntu VM ....
Re: Build 0.17 on Debian Testing (Stretch)
Repeating the build on a more vanilla installation turns out I forgot some steps:
* installation of libvtk6-dev
* ln -s /usr/bin/vtk6 /usr/bin/vtk
* installation of libmed-dev
* installation of libmedc-dev
* installation of libvtk6-dev
* ln -s /usr/bin/vtk6 /usr/bin/vtk
* installation of libmed-dev
* installation of libmedc-dev
Re: Build 0.17 on Debian Testing (Stretch)
Follow up:
The issue with link.txt turns out to be another mis-configuration of vtk6's cmake files. I added "/usr/lib/libmpi_cxx.so" before libmpi.so in the files:
/usr/lib/cmake/vtk-6.3/VTKTargets-none.cmake
/usr/lib/cmake/vtk-6.3/Modules/vtkhdf5.cmake
and that seems to do the trick. Don't know if both are required.
The issue with link.txt turns out to be another mis-configuration of vtk6's cmake files. I added "/usr/lib/libmpi_cxx.so" before libmpi.so in the files:
/usr/lib/cmake/vtk-6.3/VTKTargets-none.cmake
/usr/lib/cmake/vtk-6.3/Modules/vtkhdf5.cmake
and that seems to do the trick. Don't know if both are required.
-
- Posts: 228
- Joined: Fri Apr 25, 2014 1:59 am
Re: Build 0.17 on Debian Testing (Stretch)
I'm trying to compile 0.17 in debian testing, but the instructions I marked in bold are pretty confusing. Can you please specify in a better way what to do?mlampert wrote:Finally got 0.17 built to go through. In addition to the compile instructions for Linux I had to:
* /usr/lib/cmake/vtk-6.3
Grep for vtkRenderingPythonTkWidgets and comment out or delete
all references to it.
* <cmake>/src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/link.txt
After ..../libhdf5.so add the following libraries:
- /usr/lib/openmpi/lib/libmpi_cxx.so
- /usr/lib/openmpi/lib/libmpi.so
I don't know anything about cmake, so I could not figure out how to properly fix the missing libraries for linking SMESH.
Other projects have run into the issue with VTK's cmake file - if I read the comments in diverse bug reports correctly this might not get fixed.
Thought this might help others on Stretch who don't want to install a Ubuntu VM ....
Re: Build 0.17 on Debian Testing (Stretch)
Sorry for being too terse. These are the steps I do each time I upgrade Debian testing:CharlieMAC wrote:I'm trying to compile 0.17 in debian testing, but the instructions I marked in bold are pretty confusing. Can you please specify in a better way what to do?
*
Code: Select all
cd /usr/lib/cmake/vtk-6.3
Code: Select all
vim $(grep -rlw vtkRenderingPythonTkWidgets )
* also you have
Code: Select all
vim $(grep -rlw libmip)
Re: Build 0.17 on Debian Testing (Stretch)
Hi,
thanks a lot mlampert, I managed to compile 0.17 with the infos you shared. This is the gist of a successful out-of-source build on my system (Debian Testing "Stretch" @ 2016/12/02) :
Cheers ! Thanks all for this great software and community !
Victor
thanks a lot mlampert, I managed to compile 0.17 with the infos you shared. This is the gist of a successful out-of-source build on my system (Debian Testing "Stretch" @ 2016/12/02) :
Code: Select all
# Get the source code
$ git clone https://github.com/FreeCAD/FreeCAD.git freecad-code
$ mkdir freecad-build && cd freecad-build
# Install missing deps
$ sudo apt install build-essential cmake python python-matplotlib libtool 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 libpyside-dev libode-dev swig libzipios++-dev libfreetype6 libfreetype6-dev libmedc-dev libcoin80-dev libqtwebkit-dev libxerces-c-dev liboce*-dev oce-draw libvtk6-dev libshiboken-dev
# Manualy remove references to vtkRenderingPythonTkWidgets by deleting or commenting with "#" at the start of the lines
$ sudo gedit /usr/lib/cmake/vtk-6.3/VTKTargets-none.cmake
$ sudo gedit /usr/lib/cmake/vtk-6.3/VTKTargets.cmake
$ cmake ../freecad-code
# Append missing libraries in salomesmesh CMakeFiles (need to escape slash in paths)
$ ex -sc 's/$/ \/usr\/lib\/openmpi\/lib\/libmpi_cxx.so \/usr\/lib\/openmpi\/lib\/libmpi.so/|w|q' src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/link.txt
# Cross fingers :P
$ make
$ cd bin && ./FreeCAD
Victor
Re: Build 0.17 on Debian Testing (Stretch)
With the latest update from debian testing the openmpi packaging changed. The libraries are now (modify all in /usr/cmake/vtk-6.3)
/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so
/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so
Additionally the header files moved
* edit /usr/lib/cmake/vtk-6.3/Modules/vtkhdf5.cmake
* add ";/usr/include/mpi" at the end of the line starting with "set(vtkhdf5_INCLUDE_DIRS" (make sure to add it before the terminal \")
/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so
/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so
Additionally the header files moved
* edit /usr/lib/cmake/vtk-6.3/Modules/vtkhdf5.cmake
* add ";/usr/include/mpi" at the end of the line starting with "set(vtkhdf5_INCLUDE_DIRS" (make sure to add it before the terminal \")
Re: Build 0.17 on Debian Testing (Stretch)
@mlampert what exactly does this mean? Do you have to adjust some variables in the cmake GUI to get everything built? Especially vtkhdf5_INCLUDE_DIRS isn't this automatically detected and set by vtk's cmake handling?
Re: Build 0.17 on Debian Testing (Stretch)
It means the cmake files that come with vtk-6.3 are broken and need to be edited.
The Debian maintainer says it's an upstream problem with vtk and it needs to be fixed there. The end result is that the installed cmake files in /usr/lib/cmake/vtk-6.3 are referencing libraries that don't exist (vtkRenderingPythonTkWidgets), don't include the C++ binding for openmpi (libmpi_cxx.so) and now also look for the openmpi libraries and include files in the wrong directories.
The Debian maintainer says it's an upstream problem with vtk and it needs to be fixed there. The end result is that the installed cmake files in /usr/lib/cmake/vtk-6.3 are referencing libraries that don't exist (vtkRenderingPythonTkWidgets), don't include the C++ binding for openmpi (libmpi_cxx.so) and now also look for the openmpi libraries and include files in the wrong directories.
Re: Build 0.17 on Debian Testing (Stretch)
the package which brings in the cmake files is libvtk6-dev