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).