macOS native M1 build

Hello,

A wiki page with specific instructions for the macOS native M1/arm64 build has been created at https://gitlab.com/scilab/scilab/-/wikis/Developers/setup-Scilab-repository-macOS-arm64. We are still not able to provide a complete native M1 release because of missing libraries in conda-forge (ocaml, ocaml-num) and because of the missing support of arm64 architecture in atoms. However, preview M1 builds of the development branch will be available soon.

S.

As promised, a native macOS/arm64 build of branch-2024.0 (as of 26/05/2023) is available for testing purposes at the macOS Scilab page: https://www.utc.fr/~mottelet/scilab_for_macOS.html. Please give any feedback in this topic (speed improvements, crashes, …).

S.

Hello,

An update for mac M1 users : the native arm64 build of sci_ipopt and scicolpack atoms toolboxes has been done. The 2024.0 version of these toolboxes now includes fat libraries (both for x86_64 and arm64) and I think it will be the default option for future small compiled gateways on macOS.
These new builds also allows to install fmincon (which has the two above toolboxes as dependencies).
Playing with the sci_ipopt and fmincon demos I have noticed a general speedup of 2x compared to the same demos running in Scilab 2023.1.0 on the same machine.
To test within the branch-2024.0 native M1 build:

atomsSystemUpdate
atomsInstall fmincon

S.

HI there! I recently updated a Scilab program for simulating programming Field Programmable Analog Arrays from Scilab 5 to the latest version. It creates some C code from Modelica models and then compiles that code and links with it on the fly. This works OK in Scilab 2023.1, but in Scilab 2024.0 I get an error complaining about Team IDs not matching.

Looking in the 2023.1 package, I see that CodeEntitlements has the line:

com.apple.security.cs.disable-library-validation

But, alas, in the 2040.0 package, I see that the corresponding line is commented out. The disable-library-validation appears to be the magical incantation that makes it work; alas I don’t see any way to add it after the fact (if I edit the text file using code sign to check the entitlements results in it telling me the entitlements in the binary are invalid and will be ignored).

Could y’all recompile 2024.0 for the Mac, but with disable-library-validation switched on?

(I can make 2024 work if I reboot the computer in repair mode and use “csrutil disable” to turn of System Integrity Protection, but that’s obviously not idea.)

Thanks!

Aaron Lanterman, Prof. of ECE, Georgia Tech
My blog on Electronics and Programming: https://lantertronics.blogspot.com
My YouTube channel on Electronics and Programming: https://www.youtube.com/c/lantertronics

Hello,

Can you tell if Modelica demos are working fine, e.g. Xcos/Modelica demos/RLC circuit? If this is the case, what mechanism do you use to link your custom blocks?

If it can help, I have signed again the 2024.0 M1 build image with com.apple.security.cs.disable-library-validation enabled, you will find the updated image at the following url: https://www.utc.fr/~mottelet/scilab/download/2024.0.0/scilab-2024.0.0-nolibval-arm64.dmg

S.

Yeah, it has trouble with the RLC demo with the main version on the website. It tells me this:

Flat Modelica : /private/var/folders/r6/cwj7bwc976z98x2ytl3nsrgr0000gn/T/SCI_TMP_42006_vooyxV/RLC_Modelica_imf.mo
Simulation C code :/private/var/folders/r6/cwj7bwc976z98x2ytl3nsrgr0000gn/T/SCI_TMP_42006_vooyxV/RLC_Modelica_im.c
Generate a loader file
Generate a Makefile
ilib_gen_Make: Copy compilation files (Makefile*, libtool…) to TMPDIR
ilib_gen_Make: Copy RLC_Modelica_im.c to TMPDIR
ilib_gen_Make: configure : Generate Makefile.
ilib_gen_Make: Modification of the Makefile in TMPDIR.
Running the Makefile
Generate a cleaner file
Link failed for dynamic library ‘/private/var/folders/r6/cwj7bwc976z98x2ytl3nsrgr0000gn/T/SCI_TMP_42006_vooyxV/libRLC_Modelica_im.dylib’.
An error occurred: dlopen(/private/var/folders/r6/cwj7bwc976z98x2ytl3nsrgr0000gn/T/SCI_TMP_42006_vooyxV/libRLC_Modelica_im.dylib, 0x000A): tried: ‘/private/var/folders/r6/cwj7bwc976z98x2ytl3nsrgr0000gn/T/SCI_TMP_42006_vooyxV/libRLC_Modelica_im.dylib’ (code signature in ‘/private/var/folders/r6/cwj7bwc976z98x2ytl3nsrgr0000gn/T/SCI_TMP_42006_vooyxV/libRLC_Modelica_im.dylib’ not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs), ‘/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/r6/cwj7bwc976z98x2ytl3nsrgr0000gn/T/SCI_TMP_42006_vooyxV/libRLC_Modelica_im.dylib’ (no such file), ‘/private/var/folders/r6/cwj7bwc976z98x2ytl3nsrgr0000gn/T/SCI_TMP_42006_vooyxV/libRLC_Modelica_im.dylib’ (code signature in ‘/private/var/folders/r6/cwj7bwc976z98x2ytl3nsrgr0000gn/T/SCI_TMP_42006_vooyxV/libRLC_Modelica_im.dylib’ not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs)

“c_pass1: build the modelica meta-block failed”

“xcos_simulate: Error during block parameters update.”

But, the new “scilab-2024.0.0-nolibval-arm64” version you created works great, both on the RLC Modelica demo, and my own FPAA simulation code! (I should note I’m using macOS 14.1 Sonoma).

I have the same problem with version 2024.1.0 ARM64, When I try to start a Modelica demo, e.g. Demos/Xcos/modelica demos/hydraulics blocks

I always get the following error message

“c_pass1: build the modelica meta-block failed”

“xcos_simulate: Error during block parameters update.”

Maybe some additional informations:
I’m work on a MacStudio M1Ultra, Sonoma 14.6.1

But the console log says :slight_smile:
checking build system type… x86_64-apple-darwin23.6.0
checking host system type… x86_64-apple-darwin23.6.0

Hello,

Did you install the Xcode command line tools ? To run Modelica demos you need a compiler. If this is the case, can you test the forthcoming 2025.0.0 native build at https://www.utc.fr/~mottelet/scilab/download/2025.0.0/scilab-2025.0-arm64.dmg ?

S.

Thx for reply,

Yes, I’ve installed XCode, as well as GCC and Gfortran.

I tested yesterday the x86_64 version of SciLab on the same Mac and ist works well.

Regards Stefan

There is a signature issue with the arm64 version of Scilab 2024.1.0, which prevents the dynamic link of external compiled code. Can you test the main branch 2025.0 build ?

S.

Yes, for sure…
I‘ve different types of Mac, as well as virtual machines to test different versions.

BTW, if you launched Scilab from the command line, please check that your terminal started with the correct architecture info with uname -m. Sometimes Rosetta x86_64 emulation can be triggered for some obscure reasons…

S.

No I used the App, but I also checkt uname -m —> arm64

Do you have a download link for the main branch 2025.0 build?

Stefan

I gave it above this morning : https://www.utc.fr/~mottelet/scilab/download/2025.0.0/scilab-2025.0-arm64.dmg

The 2025.0.0 build works fine with my Mac :slight_smile:

thx

I tested version 2025.0.0 today on my MacBook Air M3 with Sequoia 15.0 beta, and it also ran smoothly. The modelica demos also ran without any problems.

1 Like

Hello,
after updating my OS (now macOS 15 Sequoia), scilab 2024.0.1 does not run anymore. I try your scilab 2025 but it does not work. What is the problem according to you?
Thank you,
Philippe

Hello and welcome to Scilab’s Discourse !

The OS update… Frankly speaking, maintaining Scilab under macOS is a real headache !

S.

Thank you…
At least now you are aware of the problem… (OS update was done yesterday)