Re: [PD-dev] [PD] how to compile externals for apple silicon?
4, you need a new enough Xcode (12.2 I believe) and >>>>>> that's it. You can cross-compile on an x86_64 machine for arm64 and >>>>>> vice-versa. >>>>> >>>>> So, I now have a partition with Catalina (10.15.7) and Xcode 12.4, which >>>>> is the last version catalina accepts. >>>>> >>>>> According to https://developer.apple.com/pt/support/xcode/ I believe 12.1 >>>>> could have been possible already. 12.5 needs Big Sur. Here's a table from >>>>> the link >>>>> >>>>> Versão do Xcode Sistema operacional mínimo necessário SDK >>>>> Arquitetura Destinos de implantação Simulador Swift >>>>> >>>>> Xcode 12.4macOS Catalina 10.15.4 (Mac com processador Intel) >>>>> >>>>> macOS Big Sur 11 >>>>> (Mac com Apple Silicon) iOS 14.4 >>>>> macOS 11.1 >>>>> tvOS 14.3 >>>>> watchOS 7.2 >>>>> DriverKit 20.2x86_64 >>>>> armv7 >>>>> armv7s >>>>> armv7k >>>>> arm64 >>>>> arm64e >>>>> arm64_32 iOS 9-14.4 >>>>> iPadOS 13-14.4 >>>>> macOS 10.9-11.1 >>>>> tvOS 9-14.3 >>>>> watchOS 2-7.2 >>>>> DriverKit 19-20.2 >>>>> >>>>> It says it can build for 'arm64' alright, but I tried creating a fat >>>>> binary for both intel and M1 as I was doing in my monterey partition and >>>>> didn't succeed. I'm using pd-lib-builder, verdsion 6.0, so I did: >>>>> >>>>> make install objectsdir=../ arch="i386 x86_64" extension=d_fat and that >>>>> works just fine >>>>> >>>>> but... >>>>> >>>>> make install objectsdir=../ arch="arm64 x86_64" extension=d_fat fails >>>>> miserably, this is what I get >>>>> >>>>> >>>>> /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:807:2: >>>>> error: Unsupported architecture >>>>> #error Unsupported architecture >>>>> >>>>> What should I do? >>>>> >>>>> My attempt here is to be able to build a binary for fluidsynth~ that >>>>> works for a wide range of OSes >>>>> >>>>> thanks >>>>> cheers >>>>> >>>>>> >>>>>>> On Mar 10, 2022, at 11:30 PM, pd-dev-requ...@lists.iem.at wrote: >>>>>>> >>>>>>> Message: 2 >>>>>>> Date: Thu, 10 Mar 2022 17:57:23 -0300 >>>>>>> From: Alexandre Torres Porres >>>>>>> To: Sebastian Shader >>>>>>> Cc: "pd-dev@lists.iem.at" >>>>>>> Subject: Re: [PD-dev] [PD] how to compile externals for apple silicon? >>>>>>> Message-ID: >>>>>>> >>>>>>> >>>>>>> Content-Type: text/plain; charset="utf-8" >>>>>>> >>>>>>> I guess I can install catalina on a partition, but I was hoping to use >>>>>>> pdlibbuilder in an easy way, is it possible? >>>>>> >>>>>> >>>>>> Dan Wilcox >>>>>> @danomatika >>>>>> danomatika.com >>>>>> robotcowboy.com >>>>>> >>>>>> >>>>>> >> >> >> Dan Wilcox >> @danomatika >> danomatika.com >> robotcowboy.com >> >> >> ___ Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
Re: [PD-dev] [PD] how to compile externals for apple silicon?
4.4 >> macOS 10.9-11.1 >> tvOS 9-14.3 >> watchOS 2-7.2 >> DriverKit 19-20.2 >> >> It says it can build for 'arm64' alright, but I tried creating a fat >> binary for both intel and M1 as I was doing in my monterey partition and >> didn't succeed. I'm using pd-lib-builder, verdsion 6.0, so I did: >> >> make install objectsdir=../ arch="i386 x86_64" extension=d_fat and that >> works just fine >> >> but... >> >> make install objectsdir=../ arch="arm64 x86_64" extension=d_fat fails >> miserably, this is what I get >> >> >> */Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:807:2: >> **error: **Unsupported architecture* >> >> #error Unsupported architecture >> >> What should I do? >> >> My attempt here is to be able to build a binary for fluidsynth~ that >> works for a wide range of OSes >> >> thanks >> cheers >> >> >>> On Mar 10, 2022, at 11:30 PM, pd-dev-requ...@lists.iem.at wrote: >>> >>> Message: 2 >>> Date: Thu, 10 Mar 2022 17:57:23 -0300 >>> From: Alexandre Torres Porres >>> To: Sebastian Shader >>> Cc: "pd-dev@lists.iem.at" >>> Subject: Re: [PD-dev] [PD] how to compile externals for apple silicon? >>> Message-ID: >>> >>> Content-Type: text/plain; charset="utf-8" >>> >>> I guess I can install catalina on a partition, but I was hoping to use >>> pdlibbuilder in an easy way, is it possible? >>> >>> >>> >>> Dan Wilcox >>> @danomatika <http://twitter.com/danomatika> >>> danomatika.com >>> robotcowboy.com >>> >>> >>> >>> > > Dan Wilcox > @danomatika <http://twitter.com/danomatika> > danomatika.com > robotcowboy.com > > > > ___ Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
Re: [PD-dev] [PD] how to compile externals for apple silicon?
_fat fails >> miserably, this is what I get >> >> >> /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:807:2: >> error: Unsupported architecture >> #error Unsupported architecture >> >> What should I do? >> >> My attempt here is to be able to build a binary for fluidsynth~ that works >> for a wide range of OSes >> >> thanks >> cheers >> >> >>> On Mar 10, 2022, at 11:30 PM, pd-dev-requ...@lists.iem.at >>> <mailto:pd-dev-requ...@lists.iem.at> wrote: >>> >>> Message: 2 >>> Date: Thu, 10 Mar 2022 17:57:23 -0300 >>> From: Alexandre Torres Porres mailto:por...@gmail.com>> >>> To: Sebastian Shader mailto:sebfumas...@aol.com>> >>> Cc: "pd-dev@lists.iem.at <mailto:pd-dev@lists.iem.at>" >> <mailto:pd-dev@lists.iem.at>> >>> Subject: Re: [PD-dev] [PD] how to compile externals for apple silicon? >>> Message-ID: >>> >> <mailto:caeasfmiupgiiewwpvm11eyy6ke6bdgiwfqfa8pbvpbjtuao...@mail.gmail.com>> >>> Content-Type: text/plain; charset="utf-8" >>> >>> I guess I can install catalina on a partition, but I was hoping to use >>> pdlibbuilder in an easy way, is it possible? >> >> >> Dan Wilcox >> @danomatika <http://twitter.com/danomatika> >> danomatika.com <http://danomatika.com/> >> robotcowboy.com <http://robotcowboy.com/> >> >> >> Dan Wilcox @danomatika <http://twitter.com/danomatika> danomatika.com <http://danomatika.com/> robotcowboy.com <http://robotcowboy.com/> ___ Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
Re: [PD-dev] [PD] how to compile externals for apple silicon?
By "modern" I was referring to the architectures, not the lib bundling mechanism. I know I've mentioned it before and you bring it up again: it's probably possible to create a single fat lib with ppc, i386, x86_64, and arm64. This is, however, at best an academic exercise. > On May 1, 2022, at 12:00 PM, pd-dev-requ...@lists.iem.at wrote: > > Message: 1 > Date: Sun, 1 May 2022 10:52:17 +0200 > From: IOhannes m zm?lnig mailto:zmoel...@iem.at>> > To: pd-dev@lists.iem.at <mailto:pd-dev@lists.iem.at> > Subject: Re: [PD-dev] [PD] how to compile externals for apple silicon? > Message-ID: <2a870fec-b81f-75d0-81e3-5a59462e2...@iem.at > <mailto:2a870fec-b81f-75d0-81e3-5a59462e2...@iem.at>> > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > > On 5/1/22 09:42, Dan Wilcox wrote >> You cannot build for i386. Support for that arch was famously removed in >> macOS 10.15 and those versions of Xcode which use its SDK, probably version >> 10 or so. Modern fat libs arm64 and x86_64. > > just to add a bit of confusion... > > technically, i think there's no difference between a "modern" and a > "legacy" fat lib: it's a file format that can contain multiple > architectures. > there's absolutely nothing keeping you from having a fat binary that > contains arm64, x86_64, i386 and ppc. > > the only obstacle is, that there is no compiler that can create binaries > for all of these architectures. > but you can create the binaries on multiple systems (different macOS/OSX > versions; different Xcode installations) and then use 'lipo' to merge > the different single-arch binaries into a single fat one. Dan Wilcox @danomatika <http://twitter.com/danomatika> danomatika.com <http://danomatika.com/> robotcowboy.com <http://robotcowboy.com/> ___ Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
Re: [PD-dev] [PD] how to compile externals for apple silicon?
On 5/1/22 09:42, Dan Wilcox wrote You cannot build for i386. Support for that arch was famously removed in macOS 10.15 and those versions of Xcode which use its SDK, probably version 10 or so. Modern fat libs arm64 and x86_64. just to add a bit of confusion... technically, i think there's no difference between a "modern" and a "legacy" fat lib: it's a file format that can contain multiple architectures. there's absolutely nothing keeping you from having a fat binary that contains arm64, x86_64, i386 and ppc. the only obstacle is, that there is no compiler that can create binaries for all of these architectures. but you can create the binaries on multiple systems (different macOS/OSX versions; different Xcode installations) and then use 'lipo' to merge the different single-arch binaries into a single fat one. gmdsa IOhannes OpenPGP_signature Description: OpenPGP digital signature ___ Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
Re: [PD-dev] [PD] how to compile externals for apple silicon?
You cannot build for i386. Support for that arch was famously removed in macOS 10.15 and those versions of Xcode which use its SDK, probably version 10 or so. Modern fat libs arm64 and x86_64. enohp ym morf tnes --- Dan Wilcox danomatika.com robotcowboy.com > On May 1, 2022, at 2:51 AM, Alexandre Torres Porres wrote: > > > > > >> Em qui., 10 de mar. de 2022 às 19:57, Dan Wilcox >> escreveu: >> I have a fork of pd-lib-builder which supports arm64 & universal builds on >> macOS. The PR has been sitting for some time but we have been using it >> successfully for a few projects for some time now: >> >> https://github.com/pure-data/pd-lib-builder/pull/69 >> >> To build for arm64, you need a new enough Xcode (12.2 I believe) and that's >> it. You can cross-compile on an x86_64 machine for arm64 and vice-versa. > > So, I now have a partition with Catalina (10.15.7) and Xcode 12.4, which is > the last version catalina accepts. > > According to https://developer.apple.com/pt/support/xcode/ I believe 12.1 > could have been possible already. 12.5 needs Big Sur. Here's a table from the > link > > Versão do Xcode Sistema operacional mínimo necessário SDK > Arquitetura Destinos de implantação Simulador Swift > > Xcode 12.4macOS Catalina 10.15.4 (Mac com processador Intel) > > macOS Big Sur 11 > (Mac com Apple Silicon) iOS 14.4 > macOS 11.1 > tvOS 14.3 > watchOS 7.2 > DriverKit 20.2x86_64 > armv7 > armv7s > armv7k > arm64 > arm64e > arm64_32 iOS 9-14.4 > iPadOS 13-14.4 > macOS 10.9-11.1 > tvOS 9-14.3 > watchOS 2-7.2 > DriverKit 19-20.2 > > It says it can build for 'arm64' alright, but I tried creating a fat binary > for both intel and M1 as I was doing in my monterey partition and didn't > succeed. I'm using pd-lib-builder, verdsion 6.0, so I did: > > make install objectsdir=../ arch="i386 x86_64" extension=d_fat and that works > just fine > > but... > > make install objectsdir=../ arch="arm64 x86_64" extension=d_fat fails > miserably, this is what I get > > > /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:807:2: > error: Unsupported architecture > #error Unsupported architecture > > What should I do? > > My attempt here is to be able to build a binary for fluidsynth~ that works > for a wide range of OSes > > thanks > cheers > >> >>> On Mar 10, 2022, at 11:30 PM, pd-dev-requ...@lists.iem.at wrote: >>> >>> Message: 2 >>> Date: Thu, 10 Mar 2022 17:57:23 -0300 >>> From: Alexandre Torres Porres >>> To: Sebastian Shader >>> Cc: "pd-dev@lists.iem.at" >>> Subject: Re: [PD-dev] [PD] how to compile externals for apple silicon? >>> Message-ID: >>> >>> Content-Type: text/plain; charset="utf-8" >>> >>> I guess I can install catalina on a partition, but I was hoping to use >>> pdlibbuilder in an easy way, is it possible? >> >> >> Dan Wilcox >> @danomatika >> danomatika.com >> robotcowboy.com >> >> >> ___ Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
Re: [PD-dev] [PD] how to compile externals for apple silicon?
Em qui., 10 de mar. de 2022 às 19:57, Dan Wilcox escreveu: > I have a fork of pd-lib-builder which supports arm64 & universal builds on > macOS. The PR has been sitting for some time but we have been using it > successfully for a few projects for some time now: > > https://github.com/pure-data/pd-lib-builder/pull/69 > > To build for arm64, you need a new enough Xcode (12.2 I believe) and > that's it. You can cross-compile on an x86_64 machine for arm64 and > vice-versa. > So, I now have a partition with Catalina (10.15.7) and Xcode 12.4, which is the last version catalina accepts. According to https://developer.apple.com/pt/support/xcode/ I believe 12.1 could have been possible already. 12.5 needs Big Sur. Here's a table from the link Versão do XcodeSistema operacional mínimo necessárioSDKArquiteturaDestinos de implantaçãoSimuladorSwift Xcode 12.4 macOS Catalina 10.15.4 (Mac com processador Intel) macOS Big Sur 11 (Mac com Apple Silicon) iOS 14.4 macOS 11.1 tvOS 14.3 watchOS 7.2 DriverKit 20.2 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 iOS 9-14.4 iPadOS 13-14.4 macOS 10.9-11.1 tvOS 9-14.3 watchOS 2-7.2 DriverKit 19-20.2 It says it can build for 'arm64' alright, but I tried creating a fat binary for both intel and M1 as I was doing in my monterey partition and didn't succeed. I'm using pd-lib-builder, verdsion 6.0, so I did: make install objectsdir=../ arch="i386 x86_64" extension=d_fat and that works just fine but... make install objectsdir=../ arch="arm64 x86_64" extension=d_fat fails miserably, this is what I get */Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:807:2: **error: **Unsupported architecture* #error Unsupported architecture What should I do? My attempt here is to be able to build a binary for fluidsynth~ that works for a wide range of OSes thanks cheers > On Mar 10, 2022, at 11:30 PM, pd-dev-requ...@lists.iem.at wrote: > > Message: 2 > Date: Thu, 10 Mar 2022 17:57:23 -0300 > From: Alexandre Torres Porres > To: Sebastian Shader > Cc: "pd-dev@lists.iem.at" > Subject: Re: [PD-dev] [PD] how to compile externals for apple silicon? > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > I guess I can install catalina on a partition, but I was hoping to use > pdlibbuilder in an easy way, is it possible? > > > > Dan Wilcox > @danomatika <http://twitter.com/danomatika> > danomatika.com > robotcowboy.com > > > > ___ Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
Re: [PD-dev] [PD] how to compile externals for apple silicon?
On 3/10/22 23:57, Dan Wilcox wrote: I have a fork of pd-lib-builder which supports arm64 & universal builds on macOS. The PR has been sitting for some time but we have been using it successfully for a few projects for some time now: note that the merit of the PR is mainly in autodetecting which architectures the current compiler might support. if you know that your compiler supports both amd64 (aka M1) and x86_64 (aka intel), you can simply call make with your target architectures, using the normal pd-lib-builder. e.g. for building universal binaries, use: ``` make arch="arm64 x86_64" ``` mgfdsf IOhannes OpenPGP_signature Description: OpenPGP digital signature ___ Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
Re: [PD-dev] [PD] how to compile externals for apple silicon?
I have a fork of pd-lib-builder which supports arm64 & universal builds on macOS. The PR has been sitting for some time but we have been using it successfully for a few projects for some time now: https://github.com/pure-data/pd-lib-builder/pull/69 <https://github.com/pure-data/pd-lib-builder/pull/69> To build for arm64, you need a new enough Xcode (12.2 I believe) and that's it. You can cross-compile on an x86_64 machine for arm64 and vice-versa. > On Mar 10, 2022, at 11:30 PM, pd-dev-requ...@lists.iem.at wrote: > > Message: 2 > Date: Thu, 10 Mar 2022 17:57:23 -0300 > From: Alexandre Torres Porres mailto:por...@gmail.com>> > To: Sebastian Shader mailto:sebfumas...@aol.com>> > Cc: "pd-dev@lists.iem.at <mailto:pd-dev@lists.iem.at>" <mailto:pd-dev@lists.iem.at>> > Subject: Re: [PD-dev] [PD] how to compile externals for apple silicon? > Message-ID: ><mailto:caeasfmiupgiiewwpvm11eyy6ke6bdgiwfqfa8pbvpbjtuao...@mail.gmail.com>> > Content-Type: text/plain; charset="utf-8" > > I guess I can install catalina on a partition, but I was hoping to use > pdlibbuilder in an easy way, is it possible? Dan Wilcox @danomatika <http://twitter.com/danomatika> danomatika.com <http://danomatika.com/> robotcowboy.com <http://robotcowboy.com/> ___ Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
Re: [PD-dev] [PD] how to compile externals for apple silicon?
With llvm 13 installed from homebrew if I do ./llc -march=arm64 -mattr=helpin /usr/local/opt/llvm/binit does list "apple-m1" under "Available CPUs for this target" so it might be hypothetically possible to cross-compile.. But if you're looking for an easy solution it's probably to just install catalina and the latest supported Xcode/command line tools. as for flags for pd-lib-builder I'm not sure, you might have to set the PLATFORM variable or something, someone else probably can say more.. but the 1st step is getting a toolchain that can build for m1 installed. -seb -Original Message- From: Alexandre Torres Porres To: Sebastian Shader Cc: pd-dev@lists.iem.at Sent: Thu, Mar 10, 2022 12:57 pm Subject: Re: [PD] how to compile externals for apple silicon? I guess I can install catalina on a partition, but I was hoping to use pdlibbuilder in an easy way, is it possible? Em qui., 10 de mar. de 2022 às 17:33, Sebastian Shader escreveu: (replied to dev list, seems more appropriate)I think you can cross-compile for arm on intel if you have xcode 12.2 (which I believe requires MacOS 10.15 Catalina)https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary -seb -Original Message- From: Alexandre Torres Porres To: Pd-List Sent: Thu, Mar 10, 2022 11:29 am Subject: [PD] how to compile externals for apple silicon? In my next update of my libraries I wanna see if I can provide externals for M1 macs. I'm assuming I need an apple silicon computer for that, right? Since I don't, I'll ask for someone who has one to help me. Now, what's the next step, is pdlibbuilder ready for apple silicon macs? I see zexy is already provided for apple silicon by the way. cheers ___ pd-l...@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list ___ Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
Re: [PD-dev] [PD] how to compile externals for apple silicon?
I guess I can install catalina on a partition, but I was hoping to use pdlibbuilder in an easy way, is it possible? Em qui., 10 de mar. de 2022 às 17:33, Sebastian Shader escreveu: > (replied to dev list, seems more appropriate) > I think you can cross-compile for arm on intel if you have xcode 12.2 > (which I believe requires MacOS 10.15 Catalina) > > https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary > > -seb > > -Original Message- > From: Alexandre Torres Porres > To: Pd-List > Sent: Thu, Mar 10, 2022 11:29 am > Subject: [PD] how to compile externals for apple silicon? > > In my next update of my libraries I wanna see if I can provide externals > for M1 macs. > > I'm assuming I need an apple silicon computer for that, right? Since I > don't, I'll ask for someone who has one to help me. > > Now, what's the next step, is pdlibbuilder ready for apple silicon macs? > > I see zexy is already provided for apple silicon by the way. > > cheers > ___ > pd-l...@lists.iem.at mailing list > UNSUBSCRIBE and account-management -> > https://lists.puredata.info/listinfo/pd-list > ___ Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
Re: [PD-dev] [PD] how to compile externals for apple silicon?
(replied to dev list, seems more appropriate)I think you can cross-compile for arm on intel if you have xcode 12.2 (which I believe requires MacOS 10.15 Catalina)https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary -seb -Original Message- From: Alexandre Torres Porres To: Pd-List Sent: Thu, Mar 10, 2022 11:29 am Subject: [PD] how to compile externals for apple silicon? In my next update of my libraries I wanna see if I can provide externals for M1 macs. I'm assuming I need an apple silicon computer for that, right? Since I don't, I'll ask for someone who has one to help me. Now, what's the next step, is pdlibbuilder ready for apple silicon macs? I see zexy is already provided for apple silicon by the way. cheers ___ pd-l...@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list ___ Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev