Build 0.17 on Debian Testing (Stretch)

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
yorik
Site Admin
Posts: 8672
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Build 0.17 on Debian Testing (Stretch)

Postby yorik » Thu Dec 29, 2016 11:00 pm

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

Re: Build 0.17 on Debian Testing (Stretch)

Postby lambda » Sat Feb 25, 2017 4:33 pm

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
Posts: 292
Joined: Fri Sep 16, 2016 9:28 pm

Re: Build 0.17 on Debian Testing (Stretch)

Postby mlampert » Mon Mar 20, 2017 4:32 am

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
Posts: 292
Joined: Fri Sep 16, 2016 9:28 pm

Re: Build 0.17 on Debian Testing (Stretch)

Postby mlampert » Mon Mar 20, 2017 8:50 pm

No, gotta take my edit back, works like a charm. I might have screwed up something else last night.