[DONE] conda: update to gcc7 and py3.7

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: [wip] conda: update to gcc7 and py3.7

Post by looo »

I can only speak for the conda related stuff and this is already outdated.

I guess using the appimage is the simplest way to test python3-compatibility on linux.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [wip] conda: update to gcc7 and py3.7

Post by Kunda1 »

looo wrote: Sun Jan 20, 2019 7:34 pm I can only speak for the conda related stuff and this is already outdated.
What should we do about this wiki page then, if it's obsolete ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: [wip] conda: update to gcc7 and py3.7

Post by sgrogan »

Kunda1 wrote: Sun Jan 20, 2019 8:59 pm What should we do about this wiki page then, if it's obsolete ?
"Under Construction"
For conda based PY3, which includes Win, OSX, and AppImage, this is a work in progress. For Linux, there is all of kkremitzki's work on Debian and Ubuntu.

Maybe in the short term, some links to the relevant forum threads, although this is less than ideal because it's also spread out and evolving.
"fight the good fight"
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: [wip] conda: update to gcc7 and py3.7

Post by looo »

little update:

A freecad-package for linux is uploaded to freecad/label/testing . This build include one problem with boost. A smesh library reports a problem with boost:

Code: Select all

During initialization the error /home/k/conda/envs/freecad-gcc7/lib/././libSMESHUtils.so.8.3: undefined symbol: _ZN5boost6system6detail24system_category_instanceE occurred in /home/k/.FreeCAD/Mod/CfdOF/InitGui.py
Normally these kind errors are due to different linked boost-versions but this is not the case here. I think the problem is because boost 1.68.0 is build with -std=c++17 and smesh is build with -sdt=c++14. It seems it's not possible to mix these different standards.

There is no such problem with FreeCAD. I guess this is because FreeCAD doesn't depend on boost::system, but I am not sure.

So in the long run we should try to make these libraries work with c++17.

As a riminder: Errors to fix in smesh. Maybe it's already done for internal smesh?

Code: Select all

[13/205] $BUILD_PREFIX/bin/x86_64-conda_cos6-linux-gnu-c++  -DCSFDB -DHAVE_CONFIG_H -DHAVE_FREEIMAGE -DHAVE_LIMITS_H -DHAVE_TBB -DLIN -DOCC_CONVERT_SIGNALS -DSMDS_EXPORTS -I$PREFIX/include/opencascade -I$PREFIX/include -I$PREFIX/include/freetype2 -I$PREFIX/include/python3.7m -I$PREFIX/include/libxml2 -I$PREFIX/include/netgen -I$PREFIX/include/netgen/occ -I$PREFIX/include/netgen/meshing -I$PREFIX/include/netgen/general -I$PREFIX/include/netgen/linalg -I$PREFIX/include/netgen/csg -I$PREFIX/include/netgen/geom2d -I$PREFIX/include/netgen/gprim -I$PREFIX/include/netgen/include -I$PREFIX/include/netgen/stlgeom -I../inc -isystem $PREFIX/include/vtk-8.1 -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -I$PREFIX/include -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix -O3 -DNDEBUG -fPIC   -std=gnu++1z -MD -MT CMakeFiles/SMDS.dir/src/SMDS/SMDS_Mesh0DElement.cxx.o -MF CMakeFiles/SMDS.dir/src/SMDS/SMDS_Mesh0DElement.cxx.o.d -o CMakeFiles/SMDS.dir/src/SMDS/SMDS_Mesh0DElement.cxx.o -c ../src/SMDS/SMDS_Mesh0DElement.cxx
FAILED: CMakeFiles/SMDS.dir/src/SMDS/SMDS_Mesh0DElement.cxx.o 
$BUILD_PREFIX/bin/x86_64-conda_cos6-linux-gnu-c++  -DCSFDB -DHAVE_CONFIG_H -DHAVE_FREEIMAGE -DHAVE_LIMITS_H -DHAVE_TBB -DLIN -DOCC_CONVERT_SIGNALS -DSMDS_EXPORTS -I$PREFIX/include/opencascade -I$PREFIX/include -I$PREFIX/include/freetype2 -I$PREFIX/include/python3.7m -I$PREFIX/include/libxml2 -I$PREFIX/include/netgen -I$PREFIX/include/netgen/occ -I$PREFIX/include/netgen/meshing -I$PREFIX/include/netgen/general -I$PREFIX/include/netgen/linalg -I$PREFIX/include/netgen/csg -I$PREFIX/include/netgen/geom2d -I$PREFIX/include/netgen/gprim -I$PREFIX/include/netgen/include -I$PREFIX/include/netgen/stlgeom -I../inc -isystem $PREFIX/include/vtk-8.1 -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -I$PREFIX/include -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix -O3 -DNDEBUG -fPIC   -std=gnu++1z -MD -MT CMakeFiles/SMDS.dir/src/SMDS/SMDS_Mesh0DElement.cxx.o -MF CMakeFiles/SMDS.dir/src/SMDS/SMDS_Mesh0DElement.cxx.o.d -o CMakeFiles/SMDS.dir/src/SMDS/SMDS_Mesh0DElement.cxx.o -c ../src/SMDS/SMDS_Mesh0DElement.cxx
In file included from ../src/SMDS/SMDS_Mesh0DElement.cxx:31:0:
../inc/SMDS_Mesh.hxx:698:55: error: ISO C++1z does not allow dynamic exception specifications
   static int CheckMemory(const bool doNotRaise=false) throw (std::bad_alloc);

User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: [wip] conda: update to gcc7 and py3.7

Post by looo »

also if someone knows what this is about please drop a comment:

Code: Select all

import TestFemCommon 
import TestObjectCreate 
import TestObjectType 
Call from Python thread (not synchronized): count=1
Call from Python thread (not synchronized): count=2
Call from Python thread (not synchronized): count=3
Call from Python thread (not synchronized): count=4
Call from Python thread (not synchronized): count=5
Call from Python thread (not synchronized): count=6
Call from Python thread (not synchronized): count=7
Call from Python thread (not synchronized): count=8
Call from Python thread (not synchronized): count=9
Call from Python thread (not synchronized): count=10
libgcc_s.so.1 must be installed for pthread_cancel to work
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: [wip] conda: update to gcc7 and py3.7

Post by looo »

The smesh problem is because of different c++-standarts used for smesh and boost. Conda's boost is now compiled with c++17 and some symbols are not available if a library is build with c++14. This means: We have to build smesh (and maybe FreeCAD) with c++17 if boost is build with c++17.

this is how packaging feels:
https://proxy.duckduckgo.com/iu/?u=http ... ka.jpg&f=1
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: [wip] conda: update to gcc7 and py3.7

Post by looo »

anyway, I tried to build freecad with c++17. @wmayer Any ideas?

Code: Select all

undefined reference to `boost::re_detail_106700::cpp_regex_traits_implementation<char>::transform[abi:cxx11](char const*, char const*) const'
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: [wip] conda: update to gcc7 and py3.7

Post by wmayer »

Sorry, no idea what is wrong here.
blacey
Posts: 370
Joined: Tue Dec 08, 2015 11:28 pm

Re: [wip] conda: update to gcc7 and py3.7

Post by blacey »

@loo, The

Code: Select all

[abi:cxx11]
seems to indicate that boost was compiled with an Application Binary Interface (ABI) that is not compatible with cxx17. I believe that either boost needs to be compiled with cxx17 or you need to compile it with the newer ABI. Checkout https://gcc.gnu.org/onlinedocs/libstdc+ ... l_abi.html,
https://docs.computecanada.ca/wiki/GCC_C%2B%2B_Dual_ABI and
https://stackoverflow.com/questions/306 ... i-mismatch
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: [wip] conda: update to gcc7 and py3.7

Post by looo »

blacey wrote: Sat Feb 02, 2019 4:06 pm @loo, The

Code: Select all

[abi:cxx11]
seems to indicate that boost was compiled with an Application Binary Interface (ABI) that is not compatible with cxx17. I believe that either boost needs to be compiled with cxx17 or you need to compile it with the newer ABI. Checkout https://gcc.gnu.org/onlinedocs/libstdc+ ... l_abi.html,
https://docs.computecanada.ca/wiki/GCC_C%2B%2B_Dual_ABI and
https://stackoverflow.com/questions/306 ... i-mismatch
Thanks for the hints.

The boost lib from conda-forge is now compiled with c++17. This adds some additional headache:
https://github.com/LaughlinResearch/SMESH/issues/12
https://github.com/conda-forge/boost-cp ... /issues/43
https://github.com/conda/conda-build/issues/3375

It did compile the boost-library with c++11 locally. Maybe this library was the one used for the build, and therefor the error occured. I will ignore this for now, as I think we do not have to port freecad to c++17(But we will see after tests are done)

The way to proceed looks like the following:
- port smesh to work with c++17 (help needed how to replace something like this https://github.com/LaughlinResearch/SME ... 3D.cxx#L80 with noexpect)
- try building freecad with c++11 and see if it works. I guess it should work allthough boost is build with c++17 because only the boost::system lib seems to be dependent on the c++-standart (which is soooooo anoying)

Maybe someone can help with the throw/noexpect stuff.
http://www.open-std.org/jtc1/sc22/wg21/ ... 003r0.html
Post Reply