Having trouble installing or compiling FreeCAD? Get help here.
yorik
Founder
Posts: 13665 Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:
Post
by yorik » Thu Jun 30, 2016 10:09 pm
Joining the dance... I cannot compile FreeCAD anymore either!
(debian testing)
Code: Select all
[ 5%] Linking CXX shared library ../../../lib/libSMESH.so
CMakeFiles/SMESH.dir/src/SMESH/SMESH_Mesh.cpp.o: In function `MPI::Intracomm::Intracomm()':
SMESH_Mesh.cpp:(.text._ZN3MPI9IntracommC2Ev[_ZN3MPI9IntracommC5Ev]+0x14): undefined reference to `MPI::Comm::Comm()'
CMakeFiles/SMESH.dir/src/SMESH/SMESH_Mesh.cpp.o: In function `MPI::Intracomm::Intracomm(ompi_communicator_t*)':
SMESH_Mesh.cpp:(.text._ZN3MPI9IntracommC2EP19ompi_communicator_t[_ZN3MPI9IntracommC5EP19ompi_communicator_t]+0x19): undefined reference to `MPI::Comm::Comm()'
CMakeFiles/SMESH.dir/src/SMESH/SMESH_Mesh.cpp.o: In function `MPI::Op::Init(void (*)(void const*, void*, int, MPI::Datatype const&), bool)':
SMESH_Mesh.cpp:(.text._ZN3MPI2Op4InitEPFvPKvPviRKNS_8DatatypeEEb[_ZN3MPI2Op4InitEPFvPKvPviRKNS_8DatatypeEEb]+0x26): undefined reference to `ompi_mpi_cxx_op_intercept'
CMakeFiles/SMESH.dir/src/SMESH/SMESH_Mesh.cpp.o:(.data.rel.ro._ZTVN3MPI3WinE[_ZTVN3MPI3WinE]+0x48): undefined reference to `MPI::Win::Free()'
CMakeFiles/SMESH.dir/src/SMESH/SMESH_Mesh.cpp.o:(.data.rel.ro._ZTVN3MPI8DatatypeE[_ZTVN3MPI8DatatypeE]+0x78): undefined reference to `MPI::Datatype::Free()'
collect2: error: ld returned 1 exit status
src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/build.make:1244: recipe for target 'lib/libSMESH.so' failed
make[2]: *** [lib/libSMESH.so] Error 1
CMakeFiles/Makefile2:535: recipe for target 'src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/all' failed
make[1]: *** [src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
If only I could remember what I did last time to solve this...
sgrogan
Veteran
Posts: 6499 Joined: Wed Oct 22, 2014 5:02 pm
Post
by sgrogan » Thu Jun 30, 2016 10:23 pm
yorik wrote: Joining the dance... I cannot compile FreeCAD anymore either!
(debian testing)
Welcome, the water is warm
I had mpi problems on Trusty with self compiled VTK7, it was solved by using the default VTK6 package. There are conflicts between libmed-dev/libmedc and vtk that are different on the different distros. vejmarie has reported that on Trusty at least libmed-dev or libmedc-dev? are/is compiled against hdf5 parallel when it should be serial. I haven't had the time to try on trusty, I think @bernd solved his problems by self compiling vtk7 with all the defaults on jessie.
"fight the good fight"
jmaustpc
Veteran
Posts: 11207 Joined: Tue Jul 26, 2011 6:28 am
Location: Australia
Post
by jmaustpc » Fri Jul 01, 2016 1:14 pm
master will not compile for me any more on Kubuntu 12.04.
sgrogan wrote: I think @bernd solved his problems by self compiling vtk7 with all the defaults on jessie.
I did as well, but FreeCAD still will not compile.
sgrogan
Veteran
Posts: 6499 Joined: Wed Oct 22, 2014 5:02 pm
Post
by sgrogan » Fri Jul 01, 2016 1:20 pm
jmaustpc wrote: I did as well, but FreeCAD still will not compile.
wonderfan is just going through this as well with precise. I think you will probably have to compile med as well and maybe hdf5. I have a problem on trusty with self-compiled VTK7 + repo libmedc-dev. But repo VTK6 + repo libmedc-dev works.
"fight the good fight"
yorik
Founder
Posts: 13665 Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:
Post
by yorik » Sun Jul 03, 2016 8:45 pm
ok in my case the above error is only when compiling wandererfan's techdraw branch. Compiling FreeCAD master works OK. Still no idea why this error happens with the techdraw branch...
CharlieMAC
Posts: 228 Joined: Fri Apr 25, 2014 1:59 am
Post
by CharlieMAC » Wed Jul 06, 2016 11:39 pm
sgrogan wrote: jmaustpc wrote: I did as well, but FreeCAD still will not compile.
wonderfan is just going through this as well with precise. I think you will probably have to compile med as well and maybe hdf5. I have a problem on trusty with self-compiled VTK7 + repo libmedc-dev. But repo VTK6 + repo libmedc-dev works.
How do you compile VTK7?
gdo35
Posts: 189 Joined: Wed Jan 25, 2012 7:25 pm
Post
by gdo35 » Fri Sep 16, 2016 7:47 pm
yorik wrote: Joining the dance... I cannot compile FreeCAD anymore either!
(debian testing)
Code: Select all
[ 5%] Linking CXX shared library ../../../lib/libSMESH.so
CMakeFiles/SMESH.dir/src/SMESH/SMESH_Mesh.cpp.o: In function `MPI::Intracomm::Intracomm()':
SMESH_Mesh.cpp:(.text._ZN3MPI9IntracommC2Ev[_ZN3MPI9IntracommC5Ev]+0x14): undefined reference to `MPI::Comm::Comm()'
CMakeFiles/SMESH.dir/src/SMESH/SMESH_Mesh.cpp.o: In function `MPI::Intracomm::Intracomm(ompi_communicator_t*)':
SMESH_Mesh.cpp:(.text._ZN3MPI9IntracommC2EP19ompi_communicator_t[_ZN3MPI9IntracommC5EP19ompi_communicator_t]+0x19): undefined reference to `MPI::Comm::Comm()'
CMakeFiles/SMESH.dir/src/SMESH/SMESH_Mesh.cpp.o: In function `MPI::Op::Init(void (*)(void const*, void*, int, MPI::Datatype const&), bool)':
SMESH_Mesh.cpp:(.text._ZN3MPI2Op4InitEPFvPKvPviRKNS_8DatatypeEEb[_ZN3MPI2Op4InitEPFvPKvPviRKNS_8DatatypeEEb]+0x26): undefined reference to `ompi_mpi_cxx_op_intercept'
CMakeFiles/SMESH.dir/src/SMESH/SMESH_Mesh.cpp.o:(.data.rel.ro._ZTVN3MPI3WinE[_ZTVN3MPI3WinE]+0x48): undefined reference to `MPI::Win::Free()'
CMakeFiles/SMESH.dir/src/SMESH/SMESH_Mesh.cpp.o:(.data.rel.ro._ZTVN3MPI8DatatypeE[_ZTVN3MPI8DatatypeE]+0x78): undefined reference to `MPI::Datatype::Free()'
collect2: error: ld returned 1 exit status
src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/build.make:1244: recipe for target 'lib/libSMESH.so' failed
make[2]: *** [lib/libSMESH.so] Error 1
CMakeFiles/Makefile2:535: recipe for target 'src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/all' failed
make[1]: *** [src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
If only I could remember what I did last time to solve this...
Do you remember what you did to solve this because I have the same issue on Ubuntu mate 16.10 64 bits beta.
I am on commit 279418f032ae2a7708a4639efa7c371f66601d7f
Thx,
gdo
yorik
Founder
Posts: 13665 Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:
Post
by yorik » Fri Sep 16, 2016 11:15 pm
gdo35 wrote: Do you remember what you did to solve this because I have the same issue on Ubuntu mate 16.10 64 bits beta.
I think I added -lmpi_cxx somewhere... There is a cmake variable where you can add custom linker (-l) switches, but I don't remember which one...
jCandlish
Posts: 18 Joined: Tue Apr 07, 2015 2:30 pm
Location: Oberargau, Switzerland
Post
by jCandlish » Sat Sep 17, 2016 12:38 am
On Debian (unstable for me), SMESH is explicitly expecting to link against MPI.
I couldn't find an easy way to force SMESH to use the serial HDF5 implementation.
What got it going for me was to hint cmake the location of the openmpi HDF5 libraries by setting the environment variable HDF5_ROOT in the toplevel CMakeLists.txt at around line 589
Code: Select all
if(NOT FREECAD_USE_EXTERNAL_SMESH)
# See https://www.hdfgroup.org/HDF5/release/cmakebuild.html
if (WIN32)
find_package(HDF5 COMPONENTS NO_MODULE REQUIRED static)
else()
set(HDF5_ROOT "/usr/lib/x86_64-linux-gnu/hdf5/openmpi")
# set(HDF5_ROOT "/usr/lib/x86_64-linux-gnu/hdf5/serial")
find_package(HDF5 REQUIRED)
endif()
find_package(MEDFile REQUIRED)
set(SMESH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc)
else()
And then specifying '/usr/bin/mpic++.openmpi' as the CMAKE_CXX_COMPILIER
Hope that is a help.