Hi all,
thanks to hints of Quian and Dima (thanks!) FriCAS-1.3.10 is no running
on my MacBook M2!
@Quian: I did everything freshly, the only 2 differences to yesterday
(and the only changes!) was that I set
export CC="gcc -march=armv8.5-a"
@Dima: thanks for the proper flag, I did:
configure --enable-case-insensitive-file-system-check=no
If someone is interested in the whole story: Here are my notes:
===============================================================================
Installation of FriCAS 1.3.10 11.01.2024 on an Apple M2 Pro MAC OS
Ventura 13.5.2
+ sbcl 2.1.2 on arm64-darwin is alread installed
+ check whether Xcode has the right version(??): no check
+ download von fricas-1.3.10-full.tar.bz2
+ double click fricas-1.3.10-full.tar.bz2 in finder do unpack
and get ./fricas-1.3.10
+ mv $HOME/Downloads/fricas-1.3.10 $HOME
+ use a terminal session, not iTerm2, as this sees to be united
with x86_64 go to
directory fricas-1.3.10 and then check, whether uname
refers to the write kernel: uname -v or uname -a
uname -v
-- Darwin Kernel Version 22.6.0: Wed Jul 5 22:21:53
PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6020
uname -a
--Darwin MBPvonJohannes.fritz.box 22.6.0 Darwin Kernel
Version 22.6.0: Wed Jul 5 22:21:53 PDT 2023;
root:xnu-8796.141.3~6/RELEASE_ARM64_T6020 arm64
on iterm one gets:
uname -a
--Darwin MBPvonJohannes.fritz.box 22.6.0 Darwin Kernel
Version 22.6.0: Wed Jul 5 22:21:53 PDT 2023;
root:xnu-8796.141.3~6/RELEASE_ARM64_T6020 x86_64
info on kernel see https://reviews.llvm.org/D134351
+ important, set CC:
export CC="gcc -march=armv8.5-a"
echo $CC
+ check, whether the correct C-compiler is active:
+ gcc -v
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: arm64-apple-darwin22.3.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
+ configure --enable-case-insensitive-file-system-check=no
-- among other things will produce Makefile
+ as we had set CC already, in Makefile we find CC = gcc
-march=armv8.5-a
+ make
+ make install (as root, as it writes in /usr/local/bin and
/usr/local/lib
the executable file fricas in /usr/local/bin starts with
#!/bin/sh -
exec_prefix="${FRICAS_PREFIX:-/usr/local}"
FRICAS="${exec_prefix}/lib/fricas/target/arm-apple-darwin22.6.0"
export FRICAS
FRICAS_VERSION="1.3.10"
FRICAS_LISP_FLAVOR="sbcl"
FRICAS_LISP_VERSION="2.1.2"
#!/bin/sh
+ myfricas in /Users/jgrabmeier/bin calls the wrapper
exec fricas -clefprog /Users/jgrabmeier/bin/myFricasWrapper
===============================================================================
Am 11.01.24 um 10:28 schrieb Qian Yun:
On 1/11/24 17:17, Prof. Dr. Johannes Grabmeier wrote:
Hi Quian,
thanks for your answer. Actually, 1.3.8 is running on my ARM Macs
since March last year. There were a lot of trouble because Mac still
provides emulation (?) to x86-64 architecture and there were some
confusion because of this, e.g.
on iTerm2 I get
uname -a
Darwin MBPvonJohannes.fritz.box 22.6.0 Darwin Kernel Version 22.6.0:
Wed Jul 5 22:21:53 PDT 2023;
root:xnu-8796.141.3~6/RELEASE_ARM64_T6020 x86_64
while on a terminal I get
uname -a
Darwin MBPvonJohannes.fritz.box 22.6.0 Darwin Kernel Version 22.6.0:
Wed Jul 5 22:21:53 PDT 2023;
root:xnu-8796.141.3~6/RELEASE_ARM64_T6020 arm64
The problem now seems to be, that with all the
corrections/work-arounds and settings I managed to compile 1.3.8 last
March, but this procedure fails with the problem I reported yesterday.
The config.log looks normal.
Can you show me the workarounds you applied to 1.3.10?
In theory no such workarounds are required.
Also please attach a log of the make process like:
make > make.log
(Compress it if too huge.)
- Qian
It seems that during the compilation process libspad.o is produced,
"but is an incompatible architecture (have 'x86_64', need 'arm64'))."
Somehow the wrong compiler is used again. That is the core of my
question. Where and how is this produced to find an idea to give
right flags or so at this step.
I send my config.log. There is one reference in line 68 onf x86:
PATH:
/Users/jgrabmeier/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/
Thanks for all your help.
Johannes
Am 11.01.24 um 01:33 schrieb Qian Yun:
Hi,
First of all, you are the first ARM Mac user reporting build issues.
The original plan is to wait one or two month so that Github Actions
can provide ARM Mac runners, then I can add support for ARM Macs.
Since I don't have access to this platform yet, here are my educated
guesses:
1. Did you do something extra to the source files?
AFAICS, the config/config.guess is outdated and it can't recognize
a "arm-apple-darwin" system. Can you post your config.log?
2. FriCAS doesn't propagate CFLAGS in Makefiles very well.
So please post your full modifications to the source tarball.
- Qian
On 1/10/24 23:25, Prof. Dr. Johannes Grabmeier wrote:
Hi all,
had a lot of trouble with wrong x86-64 when I installed 1.3.8 in
March last year. However, I finally managed to set everything
properly, e.g.
in Makefile: CC = gcc -march=armv8.5-a
But now, compilation fails:
gmake, stops with folllowing error, complaining that libspad.so
(which is newly compiled with the command set for CC in Makefile)
has x86_64 architecture.
How can this happen? What is to do to get proper file für arm64?
Thanks for any help!
Checking for foreign routines
FRICAS="/Users/jgrabmeier/fricas-1.3.10/target/arm-apple-darwin22.6.0"
spad-lib="/Users/jgrabmeier/fricas-1.3.10/target/arm-apple-darwin22.6.0/lib/libspad.so"
foreign routines found
debugger invoked on a SIMPLE-ERROR in thread
#<THREAD "main thread" RUNNING {7006170243}>:
Error opening shared object
"/Users/jgrabmeier/fricas-1.3.10/target/arm-apple-darwin22.6.0/lib/libspad.so":
dlopen(/Users/jgrabmeier/fricas-1.3.10/target/arm-apple-darwin22.6.0/lib/libspad.so,
0x000A): tried:
'/Users/jgrabmeier/fricas-1.3.10/target/arm-apple-darwin22.6.0/lib/libspad.so'
(mach-o file, but is an incompatible architecture (have 'x86_64',
need 'arm64')),
'/System/Volumes/Preboot/Cryptexes/OS/Users/jgrabmeier/fricas-1.3.10/target/arm-apple-darwin22.6.0/lib/libspad.so'
(no such file),
'/Users/jgrabmeier/fricas-1.3.10/target/arm-apple-darwin22.6.0/lib/libspad.so'
(mach-o file, but is an incompatible architecture (have 'x86_64',
need 'arm64')).
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT] Exit from the current thread.
(SB-SYS:DLOPEN-OR-LOSE #S(SB-ALIEN::SHARED-OBJECT :PATHNAME
#P"/Users/jgrabmeier/fricas-1.3.10/target/arm-apple-darwin22.6.0/lib/libspad.so"
:NAMESTRING
"/Users/jgrabmeier/fricas-1.3.10/target/arm-apple-darwin22.6.0/lib/libspad.so"
:HANDLE NIL :DONT-SAVE NIL))
--
Mit freundlichen Grüßen
Johannes Grabmeier
Prof. Dr. Johannes Grabmeier,
Köckstraße 1, D-94469 Deggendorf
Tel. +49-(0)-991-2979584, Tel. +49-(0)-151-681-70756
Fax: +49-(0)-991-2979592
--
You received this message because you are subscribed to the Google Groups "FriCAS -
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/8884aaaf-6812-4d26-996b-fbe73c9b893e%40grabmeier.net.