csound-plugins / risset

Csound Package Manager
18 stars 0 forks source link

Is there a way to get binaries for arm Macs? #6

Closed cianoc closed 4 months ago

cianoc commented 4 months ago

I noticed that a lot of plugins do not seem to have opcodes for Arm64.

I'm happy to compile these, but I figured there was a reason that only some of the plugins are available.

Is there a way that I can compile them and use Risset?

gesellkammer commented 4 months ago

Arm64 for which platform? Assuming you mean macos, then most opcodes do have arm64 binaries.

To check if a plugin has a binary for arm64 do:

$ risset show <pluginname>

For example, risset show else

Plugin        : else    
Author        : Eduardo Moguillansky (eduardo.moguillansky@gmail.com) 
URL           : https://github.com/csound-plugins/csound-plugins.git     
Version       : 1.19.2 

Installed     : Unknown (path: /home/em/.local/lib/csound/6.0/plugins64/libelse.so) 
Manifest      : No manifest (installed manually)
Abstract      : Miscellaneous plugins
Description:
    Collection of miscellaneous plugins
Opcodes:
    accum, atstop, bisect, crackle, cuetrig, deref, detectsilence,
    diode_ringmod, extendarray, fileexists, findarray, frac2int, ftfill,
    ftfind, ftnew, ftsetparams, initerror, interp1d, lfnoise, linenv,
    loadnpy, memview, mtro, nametoinstrnum, panstereo, perlin3, pread,
    presetinterp, pwrite, pwriten, ramptrig, ref, refvalid, schmitt,
    setslice, sigmdrive, standardchaos, throwerror, uniqinstance, vowelsdb,
    weightedsum, zeroarray, zerocrossing
Binaries:
    * linux-x86_64/csound>=6.17<7.0
    * linux-x86_64/csound>=7.0
    * windows-x86_64/csound>=6.17<7.0
    * windows-x86_64/csound>=7.0
    * macos-x86_64/csound>=6.17<7.0
    * macos-x86_64/csound>=7.0
    * macos-arm64/csound>=6.17<7.0

Compilation and testing is done via cirrus (github actions does not offer macos-arm64 runners)

cianoc commented 4 months ago

I don't know if these are free to opensource projects, but they've recently started offering macos-arm64 runners: https://github.blog/2023-10-02-introducing-the-new-apple-silicon-powered-m1-macos-larger-runner-for-github-actions/

cianoc commented 4 months ago

When I ran risset list this is what I get:

* else /1.19.2         | Miscellaneous plugins [manual]
                       |    Path: /Users/cianoconnor/Library/csound/6.0/plugins64/libelse.dylib
* pathtools /1.19.2    | Cross-platform path handling and string opcodes [manual]
                       |    Path: /Users/cianoconnor/Library/csound/6.0/plugins64/libpathtools.dylib
* klib /1.19.2         | A hashtable for csound [manual]
                       |    Path: /Users/cianoconnor/Library/csound/6.0/plugins64/libklib.dylib
* beosc /1.19.2        | Band-enhanced oscillators implementing the sine+noise synthesis model [manual]
                       |    Path: /Users/cianoconnor/Library/csound/6.0/plugins64/libbeosc.dylib
- jsfx /1.19.2         | jsfx support for csound 
                       |    -- No binaries for macos-arm64/6180
                       |       Available binaries: linux-x86_64/csound>=6.17<7.0, linux-x86_64/csound>=7.0, macos-x86_64/csound>=6.17<7.0, macos-x86_64/csound>=7.0, windows-x86_64/csound>=6.17<7.0, windows-x86_64/csound>=7.0
* poly /1.19.2         | Multiple (parallel or sequential) instances of an opcode [manual]
                       |    Path: /Users/cianoconnor/Library/csound/6.0/plugins64/libpoly.dylib
- sndmeta /1.19.2      | opcodes using libsndfile 
                       |    -- No binaries for macos-arm64/6180
                       |       Available binaries: linux-x86_64/csound>=6.17<7.0, linux-x86_64/csound>=7.0, macos-x86_64/csound>=6.17<7.0, macos-x86_64/csound>=7.0, windows-x86_64/csound>=6.17<7.0, windows-x86_64/csound>=7.0
- risset /1.19.2       | Opcodes to access risset package metadata 
                       |    -- No binaries for macos-arm64/6180
                       |       Available binaries: linux-x86_64/csound>=6.17<7.0, linux-x86_64/csound>=7.0, macos-x86_64/csound>=6.17<7.0, macos-x86_64/csound>=7.0, windows-x86_64/csound>=6.17<7.0, windows-x86_64/csound>=7.0
- vst3 /0.3.0          | Host vst3 plugins in csound 
                       |    -- No binaries for macos-arm64/6180
                       |       Available binaries: linux-x86_64/csound>=6.18<7.0, windows-x86_64/csound>=6.18<7.0, macos-x86_64/csound>=6.18<7.0
- chua /0.1.0          | Implementation of a Chua oscillator 
                       |    -- No binaries for macos-arm64/6180
                       |       Available binaries: linux-x86_64/csound>=6.18<7.0, macos-x86_64/csound>=6.18<7.0
- hdf5 /0.1.0          | Read/Write signals and arrays to/from an hdf5 file 
                       |    -- No binaries for macos-arm64/6180
                       |       Available binaries: linux-x86_64/csound>=6.18<7.0, macos-x86_64/csound>=6.18<7.0
- python /0.1.0        | Opcodes to interact with an embedded python interpreter 
                       |    -- No binaries for macos-arm64/6180
                       |       Available binaries: linux-x86_64/csound>=6.18<7.0, macos-x86_64/csound>=6.18<7.0
cianoc commented 4 months ago

At least some of these are supported on ARM (sndmeta, vst3 - and I'd guess chua and hdf5 as well), as there are builds available for them. It looks like you just don't have libraries for them.

gesellkammer commented 4 months ago

risset is just a package manager, it is not responsible for building plugins. Plugin authors add their repos to the index and are responsible for providing binaries. For the plugins I myself authored there are binaries for macos arm64 with the exception of jsfx which implements a jit which is for x86 only. Regarding other plugins like vst3, hdf5, etc, it might be probably possible to add a ci build for arm64 for cirrus.

gesellkammer commented 4 months ago

There are now macos arm64 binaries for the following plugins: vst3, chua, py, hdf5. Others are actually building correctly but are still missing risset integration. Binaries for macos/arm64 can be found here: https://cirrus-ci.com/github/csound-plugins/csound-externals