conda, osx-arm64, occt7.6

This subforum is specifically to discuss packaging issues on different platforms (windows, mac, linux), and using different packaging systems (conda, etc...)
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

conda, osx-arm64, occt7.6

Post by looo »

Starting a new topic for tracking the conda-forge osx-arm64 freecad build. My goal is:
1. make a freecad package available for osx-arm64 via conda package-manager
2. do a lot of testing
3. create a bundle for osx-arm64
4. update the rest of the conda freecad-packages to qt5.15 / occt7.6
5. do weekly builds for osx-arm64 via cross-compilation (not sure if this works for Freecad)


as already mentioned on GitHub there is now a Freecad-package available for osx-arm64 for testing:

Code: Select all

conda create -n freecad_test freecad -c conda-forge -c freecad/label/dev
conda activate freecad_test
freecad
Last edited by looo on Wed Jul 06, 2022 7:30 am, edited 1 time in total.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda, osx-arm64, occt7.6

Post by looo »

first issue is not really related to osx-arm64 but as it is the first system where I try occt7.6 / external smesh 9.8.0.2 I think it's ok to work on this via the osx-arm64 build.

the error-message is:

Code: Select all

dlopen(/Users/lo/mambaforge/envs/freecad_test/lib/Fem.so, 0x0002): symbol not found in flat namespace '__ZN10SMESH_Mesh14GetElementTypeEib'
Sounds like something has to be adopted in the Freecad-source. @wmayer
User avatar
adrianinsaval
Veteran
Posts: 5534
Joined: Thu Apr 05, 2018 5:15 pm

Re: conda, osx-arm64, occt7.6

Post by adrianinsaval »

windows installer, snap and flatpak packages all use occt 7.6.2 successfully so I'm not sure if the issue really is on the FreeCAD side, unless it's arm specific.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda, osx-arm64, occt7.6

Post by looo »

adrianinsaval wrote: Tue Jul 05, 2022 9:29 pm windows installer, snap and flatpak packages all use occt 7.6.2 successfully so I'm not sure if the issue really is on the FreeCAD side, unless it's arm specific.
yes, but they are using the internal smesh which I don't do for some reasons.
wmayer
Founder
Posts: 20202
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: conda, osx-arm64, occt7.6

Post by wmayer »

Sounds like something has to be adopted in the Freecad-source
I wouldn't know what to change there. How is this error actually triggered?

When looking at the internal smesh then there is this function

Code: Select all

SMDSAbs_ElementType GetElementType( const int id, const bool iselem );
In the external smesh it's slightly different

Code: Select all

SMDSAbs_ElementType GetElementType( const smIdType id, const bool iselem );
The difference is the int vs. smIdType. The smIdType is defined as
#ifndef SALOME_USE_64BIT_IDS
typedef std::int32_t smIdType;
#else
typedef std::int64_t smIdType;
#endif
So, the question is whether SALOME_USE_64BIT_IDS is differently set for the external smesh and FreeCAD.
User avatar
Gift
Posts: 769
Joined: Tue Aug 18, 2015 10:08 am
Location: Germany, Sauerland

Re: conda, osx-arm64, occt7.6

Post by Gift »

looo wrote: Tue Jul 05, 2022 9:14 pm Starting a new topic for tracking the conda-forge osx-arm64 freecad build. My goal is:
1. make a freecad package available for osx-arm64 via conda package-manager
2. do a lot of testing
3. create a bundle for osx-arm64
4. update the rest of the conda freecad-packages to qt5.15 / occt7.6
5. do weekly builds for osx-arm64 via cross-compilation (not sure if this works for Freecad)


as already mentioned on GitHub there is now a Freecad-package available for osx-arm64 for testing:

Code: Select all

conda create -n freecad_test freecad -c conda-forge -c freecad/label/dev
conda activate freecad_test
freecad
This is great news
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda, osx-arm64, occt7.6

Post by looo »

wmayer wrote: Wed Jul 06, 2022 9:20 am
Sounds like something has to be adopted in the Freecad-source
I wouldn't know what to change there. How is this error actually triggered?
It's triggered by changing to the fem-workbench or by trying to mesh a geometry with the mesh-design workbench.
wmayer wrote: Wed Jul 06, 2022 9:20 am #ifndef SALOME_USE_64BIT_IDS
typedef std::int32_t smIdType;
#else
typedef std::int64_t smIdType;
#endif
where is this defined?
wmayer
Founder
Posts: 20202
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: conda, osx-arm64, occt7.6

Post by wmayer »

looo wrote: Wed Jul 06, 2022 11:31 am where is this defined?
https://git.salome-platform.org/gitweb/ ... 3a;hb=HEAD

In a cloned smesh repository you will find it under SMESH/src/Kernel/src/Basics/smIdType.hxx
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda, osx-arm64, occt7.6

Post by looo »

wmayer wrote: Wed Jul 06, 2022 3:00 pm
looo wrote: Wed Jul 06, 2022 11:31 am where is this defined?
https://git.salome-platform.org/gitweb/ ... 3a;hb=HEAD

In a cloned smesh repository you will find it under SMESH/src/Kernel/src/Basics/smIdType.hxx

thanks, and I guess we should use std::int32_t to be compatible with the internal smesh. So SALOME_USE_64BIT_IDS should not be defined.
wmayer
Founder
Posts: 20202
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: conda, osx-arm64, occt7.6

Post by wmayer »

As a test you can replace

Code: Select all

typedef std::int64_t smIdType;
with

Code: Select all

typedef std::int32_t smIdType;
so that it doesn't mind whether SALOME_USE_64BIT_IDS is defined or not.
Post Reply