Build 0.17 on Debian Testing (Stretch)

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Build 0.17 on Debian Testing (Stretch)

Post by yorik »

the joys of linux packaging :D
lambda
Posts: 91
Joined: Sat Feb 25, 2017 3:10 pm
Contact:

Re: Build 0.17 on Debian Testing (Stretch)

Post by lambda »

Hi,

this threads provides confusing and misleading information.

Compiling recent git master on stretch of today, I see two different issues:
1) Tons of warnings, mostly of the type

Code: Select all

In file included from /usr/lib/x86_64-linux-gnu/oce-0.17/../../../include/oce/IntRes2d_Intersection.hxx:15:0,
                 from /usr/lib/x86_64-linux-gnu/oce-0.17/../../../include/oce/IntCurve_IntImpConicParConic.hxx:13,
                 from /usr/lib/x86_64-linux-gnu/oce-0.17/../../../include/oce/IntCurve_IntConicConic.hxx:13,
                 from /usr/lib/x86_64-linux-gnu/oce-0.17/../../../include/oce/Geom2dInt_IntConicCurveOfGInter.hxx:14,
                 from /usr/lib/x86_64-linux-gnu/oce-0.17/../../../include/oce/BRepClass_Intersector.hxx:13,
                 from /usr/lib/x86_64-linux-gnu/oce-0.17/../../../include/oce/BRepClass_FClass2dOfFClassifier.hxx:17,
                 from /usr/lib/x86_64-linux-gnu/oce-0.17/../../../include/oce/BRepClass_FClassifier.hxx:13,
                 from /usr/lib/x86_64-linux-gnu/oce-0.17/../../../include/oce/BRepClass_FaceClassifier.hxx:13,
                 from /home/harald/FreeCAD/src/3rdParty/salomesmesh/src/Controls/SMESH_Controls.cpp:42:
/usr/lib/x86_64-linux-gnu/oce-0.17/../../../include/oce/TCollection_Sequence.lxx: In copy constructor ‘IntRes2d_SequenceOfIntersectionSegment::IntRes2d_SequenceOfIntersectionSegment(const IntRes2d_SequenceOfIntersectionSegment&)’:
/usr/lib/x86_64-linux-gnu/oce-0.17/../../../include/oce/IntRes2d_SequenceOfIntersectionSegment.hxx:109:30: warning: base class ‘class TCollection_BaseSequence’ should be explicitly initialized in the copy constructor [-Wextra]
 #define TCollection_Sequence IntRes2d_SequenceOfIntersectionSegment
                              ^
/usr/lib/x86_64-linux-gnu/oce-0.17/../../../include/oce/IntRes2d_SequenceOfIntersectionSegment.hxx:109:30: note: in definition of macro ‘TCollection_Sequence’
 #define TCollection_Sequence IntRes2d_SequenceOfIntersectionSegment
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I guess this is just gcc-6 being more strict then earlier versions.

2) make aborts with the following error:

Code: Select all

CMakeFiles/SMESH.dir/src/SMESH/DriverMED_Family.cpp.o: In function `MPI::Intracomm::Intracomm()':
DriverMED_Family.cpp:(.text._ZN3MPI9IntracommC2Ev[_ZN3MPI9IntracommC5Ev]+0x14): undefined reference to `MPI::Comm::Comm()'
CMakeFiles/SMESH.dir/src/SMESH/DriverMED_Family.cpp.o: In function `MPI::Intracomm::Intracomm(ompi_communicator_t*)':
DriverMED_Family.cpp:(.text._ZN3MPI9IntracommC2EP19ompi_communicator_t[_ZN3MPI9IntracommC5EP19ompi_communicator_t]+0x19): undefined reference to `MPI::Comm::Comm()'
CMakeFiles/SMESH.dir/src/SMESH/DriverMED_Family.cpp.o: In function `MPI::Op::Init(void (*)(void const*, void*, int, MPI::Datatype const&), bool)':
DriverMED_Family.cpp:(.text._ZN3MPI2Op4InitEPFvPKvPviRKNS_8DatatypeEEb[_ZN3MPI2Op4InitEPFvPKvPviRKNS_8DatatypeEEb]+0x26): undefined reference to `ompi_mpi_cxx_op_intercept'
CMakeFiles/SMESH.dir/src/SMESH/DriverMED_Family.cpp.o:(.data.rel.ro._ZTVN3MPI3WinE[_ZTVN3MPI3WinE]+0x48): undefined reference to `MPI::Win::Free()'
CMakeFiles/SMESH.dir/src/SMESH/DriverMED_Family.cpp.o:(.data.rel.ro._ZTVN3MPI8DatatypeE[_ZTVN3MPI8DatatypeE]+0x78): undefined reference to `MPI::Datatype::Free()'
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libSMESH.so] Fehler 1
make[1]: *** [src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/all] Fehler 2
make: *** [all] Fehler 2
This can be solved by calling cmake with:

Code: Select all

-DCMAKE_CXX_COMPILER=/usr/bin/mpic++
See viewtopic.php?f=4&t=16292&start=40 for example.

I don't who is messing up the autoconfiguration, but FreeCAD can be built on stretch without needing to modify any files! Of course some cmake guru figuring out whats wrong with either stretch or FreeCAD would be great though.

There are also some warnings at cmake time about VTK6, but these are on debian stable the same as on strech, so not related.
@mlampert: From the bug reports I read, it seems that the debian maintainer is only refusing to fix those warnings, but if you can point out any serious problems with the cmake files, I'm quite sure he will address those.

HTH,
Harald
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Build 0.17 on Debian Testing (Stretch)

Post by mlampert »

lambda wrote:

Code: Select all

-DCMAKE_CXX_COMPILER=/usr/bin/mpic++
Testing got a new version of VTK6 today so I finally had a chance to try this out - and it works like a charm!! :)

Thanks for digging that up.

EDIT: I spoke too soon, doesn't get through the build, will dig into it tomorrow.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Build 0.17 on Debian Testing (Stretch)

Post by mlampert »

No, gotta take my edit back, works like a charm. I might have screwed up something else last night.
yova
Posts: 1
Joined: Wed May 31, 2017 6:41 pm

Re: Build 0.17 on Debian Testing (Stretch)

Post by yova »

Hi everybody!

I fiddled around some time with mlamperts tipps, until I read the second page of the thread. Perhaps someone could include the switch for debian sid

Code: Select all

-DCMAKE_CXX_COMPILER=/usr/bin/mpic++
into https://www.freecadweb.org/wiki/CompileOnUnix at least under troubleshooting?
Post Reply