Apple M1 Install Gets Stuck
peardox opened this issue · 11 comments
Ooh (just got ssh working on the box - that helped)
Found the issue - activate.sh don't work (I think) - zsh shell...
OK - bad info - the PAServer window had the problem
It can't find libpython3.9.dylib - trying to fix
Found the problem - on a M1 it's installing an x64 dylib
> file python/3.9/lib/libpython3.9.dylib
python/3.9/lib/libpython3.9.dylib: Mach-O 64-bit dynamically linked shared library x86_64
Manually unzipped the correct file
> file python/3.9/lib/libpython3.9.dylib
python/3.9/lib/libpython3.9.dylib: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64Mach-O 64-bit dynamically linked shared library x86_64] [arm64]
python/3.9/lib/libpython3.9.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
python/3.9/lib/libpython3.9.dylib (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64
That's more like it :)
But it still won't activate :(
Note that I'm installing Python in {$HOME}/SomeProject/python using a runtime created TPyEmbeddedResEnvironment39
PAServer says ...
> Error: Could not open DLL "libpython3.9.dylib'
> Python could not be properly activated. We must quit!
This explains why it works on my MacBook Pro (X64) but not on the Cloud Rented M1 Mini (Arm 64) - not sure whats wrong after manually unzipping the right dylib...
Running from command line without Delphi and the ETA on my job is 1 day 14 hours and 20 mins. Same job takes 105m on a 3060 and be still be quicker without (i.e. 8C/16T AMD 5900HX CPU only).
Having said that the Mac Mini only has 8Gb
Hmm - the CPUs are under-utilized - I'll have a play...
OK - much better...
The M1 needs a different method of turning GPU on - specify 'mps' where you'd usually use 'cpu' or 'cuda'.
It's giving me an ETA of 10 hours so my 3060 is 10 times faster than a M1 but the M1 is about twice as fast as my CPU
The Mac is only using about 4Gb ATM and the processors are only about 20% load which is annoying, My laptop goes crazy when training :)
Gonna try a Steam Deck in three months...:)
I've worked out what's happening
Delphi 10.4.2 CE don't do M1 compilation - that was a waste of a day...
So - will CE be able to compile a x64 version that works on a M1 now?
AWS just gave me $500 (just over a month) credit for a 16G M1 Mini
I can compile it for you, if you want so. You can also get a trial version so far.
Can I invalidate this one?
It's a closed issue anyway :)
