Csound Csound-dev Csound-tekno Search About

[Csnd-dev] How to build on M1 mac

Date2023-04-20 04:55
Fromandy fillebrown
Subject[Csnd-dev] How to build on M1 mac
Hey all, I'm trying to build the develop branch on an M1 mac and
totally failing. I tried using libsndfile from homebrew but the csound
link says it can't use it because it's arm64 only, and the csound
build wants a universal binary? Is that right?

How do I do this?

Date2023-04-20 07:00
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] How to build on M1 mac
I would expect that CMake won't try and build a universal binary if you don't ask. Anyway, you can use CMAKE_OSX_ARCHITECTURE=arm64 
and I think it should force the build to be a single architecture.

Also make sure you have a fresh build directory.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 20 Apr 2023, at 04:56, andy fillebrown  wrote:
> 
> *Warning*
> 
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> 
> Hey all, I'm trying to build the develop branch on an M1 mac and
> totally failing. I tried using libsndfile from homebrew but the csound
> link says it can't use it because it's arm64 only, and the csound
> build wants a universal binary? Is that right?
> 
> How do I do this?

Date2023-04-20 14:20
FromHlöðver Sigurðsson
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] How to build on M1 mac
I made this custom cmake script for M1 osx, referring to dependencies from the nix package manager without needing to install any of the csound dependencies globally

https://gist.github.com/hlolli/3298aa6d3129a01a973e9d22e8da143b

On Thu, 20 Apr 2023 at 08:00, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I would expect that CMake won't try and build a universal binary if you don't ask. Anyway, you can use CMAKE_OSX_ARCHITECTURE=arm64
and I think it should force the build to be a single architecture.

Also make sure you have a fresh build directory.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 20 Apr 2023, at 04:56, andy fillebrown <andy.fillebrown@gmail.com> wrote:
>
> *Warning*
>
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>
> Hey all, I'm trying to build the develop branch on an M1 mac and
> totally failing. I tried using libsndfile from homebrew but the csound
> link says it can't use it because it's arm64 only, and the csound
> build wants a universal binary? Is that right?
>
> How do I do this?

Date2023-04-20 15:41
Fromandy fillebrown
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] How to build on M1 mac
Ah, yes! I had forgotten about the Custom.cmake I was using a few
months back. Deleting that fixed the build issues. Thanks!

On Thu, Apr 20, 2023 at 9:20 AM Hlöðver Sigurðsson  wrote:
>
> I made this custom cmake script for M1 osx, referring to dependencies from the nix package manager without needing to install any of the csound dependencies globally
>
> https://gist.github.com/hlolli/3298aa6d3129a01a973e9d22e8da143b
>
> On Thu, 20 Apr 2023 at 08:00, Victor Lazzarini  wrote:
>>
>> I would expect that CMake won't try and build a universal binary if you don't ask. Anyway, you can use CMAKE_OSX_ARCHITECTURE=arm64
>> and I think it should force the build to be a single architecture.
>>
>> Also make sure you have a fresh build directory.
>>
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>>
>> > On 20 Apr 2023, at 04:56, andy fillebrown  wrote:
>> >
>> > *Warning*
>> >
>> > This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>> >
>> > Hey all, I'm trying to build the develop branch on an M1 mac and
>> > totally failing. I tried using libsndfile from homebrew but the csound
>> > link says it can't use it because it's arm64 only, and the csound
>> > build wants a universal binary? Is that right?
>> >
>> > How do I do this?

Date2023-04-20 15:44
FromHlöðver Sigurðsson
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] How to build on M1 mac
Exactly what I meant, you're welcome 🤣

On Thu, 20 Apr 2023 at 16:41, andy fillebrown <andy.fillebrown@gmail.com> wrote:
Ah, yes! I had forgotten about the Custom.cmake I was using a few
months back. Deleting that fixed the build issues. Thanks!

On Thu, Apr 20, 2023 at 9:20 AM Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
>
> I made this custom cmake script for M1 osx, referring to dependencies from the nix package manager without needing to install any of the csound dependencies globally
>
> https://gist.github.com/hlolli/3298aa6d3129a01a973e9d22e8da143b
>
> On Thu, 20 Apr 2023 at 08:00, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>
>> I would expect that CMake won't try and build a universal binary if you don't ask. Anyway, you can use CMAKE_OSX_ARCHITECTURE=arm64
>> and I think it should force the build to be a single architecture.
>>
>> Also make sure you have a fresh build directory.
>>
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>>
>> > On 20 Apr 2023, at 04:56, andy fillebrown <andy.fillebrown@gmail.com> wrote:
>> >
>> > *Warning*
>> >
>> > This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>> >
>> > Hey all, I'm trying to build the develop branch on an M1 mac and
>> > totally failing. I tried using libsndfile from homebrew but the csound
>> > link says it can't use it because it's arm64 only, and the csound
>> > build wants a universal binary? Is that right?
>> >
>> > How do I do this?