Using libmonome on M1 processors

Hello, after searching the forum with different m1 keyword configurations with no results I decided to create this topic.

Tldr;
This is first a question:

Are there already m1 compatible libraries and bundle somewhere?

And a report:

I managed to compile them manually, place them in the right location and after restarting the daemon everything is working as expected.

Perhaps I overlooked something but it seems there is no m1 processor version of any of the libmonome/serialosc utils? I read rosetta emulation can take up excessive ram and power while running and since serialoscd is constantly running I was a bit bothered.

I have successfully compiled libmonome and serialosc tools on my machine and replaced the contents of the installed serialosc.bundle and everything seems to work as expected. The only small problem I encountered is that I had to manually compile and install as well liblo
for this to work.

Cheers

2 Likes

HI! I reached out to monome support and they pointed me towards this thread. I was trying to see how I could get my grid to work on my new M1 machine. Do you have any details you could share on how you made this happen? Which, btw is next level lol! I have been using the monome since 2007, so I had to trouvbleshoot multiple times through the years but I’m not a programmer or anything so I don’t even know where to begin.
Either way thanks!

Hi!

TLDR;
I recommend you go through the default way of getting it to work following the momome docs, because the default setup works fine. What I did is only making sure I’m using M1 binaries instead of the default ones, but as I said the default works perfectly, and you should have that one working before trying any other alternative.

Bit of detail:
What I basically did was compiling the libmonome project which in turn compiles serialosc, and then replaced the serialoscd binary inside the official MacOs bundle (and other binaries inside /usr/local/bin directory). If you would like to try that I can help more in detail, but one last time, please make sure the default setup works before trying other ways.

2 Likes

i’m working on getting an m1-something so i can post up new installers, thanks for your patience!

4 Likes

Let me know if I can help by sharing the precompiled binaries, I already created a repo earlier, but not entirely sure that would just work as is(?)

I also just noticed this tool, cross compiles for mac and claims being able to target arm64 , arm64e , x86_64 , x86_64h and i386 from linux.

@tehn already mentioned that they were working on the M1 installers but I was also emailing with them and this is the more in depth answer to my question:

currently, there are no native compiled libraries for serialosc or libmonome on M1 chips – we simply don’t yet have access to an M1-powered machine. we have one on order, though, so we’ll be compiling and releasing the M1-native versions soon!

if you have an account on lines, perhaps the user who created this thread can provide their compiled version in the meantime: Using libmonome on M1 processors

Have we heard any update on this? I am also curious, is it a simple or semi trivial process to remove it. I now have a computer that can run Live the way I want and figured a performance/improve template using the grid/arc and push would be very very fun.

native m1 will be an optimization, but the existing installers will work fine.

1 Like

Thanks! I love learning about tech through usage. Thanks for the info.

Hey there. crossposting from discord: I’m having trouble running libmonome’s arc example on my m1 air.
Attempting to run: libmonome/test_arc.c at main · monome/libmonome · GitHub
errors:

zjb-s@jupiter c201 % gcc -L /opt/homebrew/Cellar/libmonome/1.4.5/lib/ -I /opt/homebrew/Cellar/libmonome/1.4.5/include/ arc.c
Undefined symbols for architecture arm64:
  "_monome_led_ring_all", referenced from:
      _test_ring in arc-a4b995.o
      _clear_rings in arc-a4b995.o
  "_monome_led_ring_map", referenced from:
      _test_ring in arc-a4b995.o
  "_monome_led_ring_range", referenced from:
      _test_ring in arc-a4b995.o
  "_monome_led_ring_set", referenced from:
      _test_ring in arc-a4b995.o
  "_monome_open", referenced from:
      _main in arc-a4b995.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)**

The gcc command needs -lmonome as well in order to actually link against the library. The -L flag only extends the search path for libraries.

1 Like

You could try adding arch -x86_64 as an argument to gcc since you are linking against the non arm libmonome from an arm architecture and looking at your error it’s trying to compile an arm binary.

1 Like

Cool, thanks! That built and ran (and stalled for an appropriate amount of time), but then returned without output, and didn’t appear to do anything on Arc. Looking at the code it looks like it’s supposed to light up after a brief delay. A print statement after the delay returns as expected, so it’s definitely making it through the program

@vectorsize - that gives me clang: error: invalid arch name '-arch -x86_64'

I don’t remember on top of my head but I think it’s -arch x86_64 (no dash in the value side, dash in the param side)

however if you get the program to execute then the problem might be something else.

Thanks, I missed that the first time. with -arch x86_64 it outputs the same error as my post upthread. Like you said I bet the problem is elsewhere?

maybe using -Wpedantic and -Wall reveals some other issues? I don’t have an arc so Im afraid I cannot help much.

I just tested the test_arc.c code locally with 2012 era arc2 and current generation arc4 - it is indeed not working. I can see that serialosc is detecting the arc(s) but even in Max with the arc-test patch nothing shows up. …and it looks like grids are not working on my machine either.

This is all extremely strange since I’m using the same machine which I used last month when updating the homebrew serialosc package.

1 Like

mysterious!
another data point: arc works as expected in Max.
When I was adding crow outputs to a C script the other day, I couldn’t get it to work for the life of me, even though it worked in max and druid. I had to call a python script to do the serial communication, which worked perfectly. I wonder if these issues are related?