Alessandro Languasco on Fri, 16 Apr 2021 14:47:15 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Apple ARM M1 processor - gp2c


Dear Bill,

SUCCESS !!

So the routine is:

- install Xcode

- remove the homebrew installation of pari

- install gmp with homebrew

- download readline and compile it from source
(./configure, make, sudo make install)

- download pari and compile from source with 
./Configure --with-gmp=/opt/homebrew/Cellar/gmp/6.2.1
(Readline just compiled and installed is recognised automatically)

- download gp2c, link the relevant pari.cfg file, and compile it from source

This is the result:

gp2c-run -pmy_ -g -W prova.gp  
Reading GPRC: /Users/languasc/.gprc
GPRC Done.

                  GP/PARI CALCULATOR Version 2.13.1 (released)
         arm64 running darwin (aarch64/GMP-6.2.1 kernel) 64-bit version
     compiled: Apr 16 2021, Apple clang version 12.0.0 (clang-1200.0.32.29)
                            threading engine: single
                 (readline v8.1 enabled, extended help enabled)

                     Copyright (C) 2000-2020 The PARI Group

PARI/GP is free software, covered by the GNU General Public License, and comes 
WITHOUT ANY WARRANTY WHATSOEVER.

Type ? for help, \q to quit.
Type ?17 for how to get moral (and possibly technical) support.

parisizemax = 400015360, primelimit = 500000


Now the remaining “strange” phenomenon is that it seems to me that the running times of the same script with gp or with gp2c are essentially the same, while, as usual, I expected a significant improvement using gp2c.

Thanks a lot for the assistance. 
Best regards,
Alessandro

On 16 Apr 2021, at 13:33, Bill Allombert <Bill.Allombert@math.u-bordeaux.fr> wrote:

On Fri, Apr 16, 2021 at 12:57:45PM +0200, Alessandro Languasco wrote:
.

Dear Alessandro,

ld: warning: ignoring file stack.o, building for macOS-arm64 but
attempting to link with file built for unknown-x86_64

It seems you are mixing arm64 binary with intel binaries, which
seems strange.

You can try to do 'make clean' and rebuild.

Dear Bill,

thanks for the hint; that was a problem !! 
Now I have a running version but with some problem with the readline.

To compile with gmp, I first had to install gmp with brew and than 
link to it at the Configure stage. For some reason the same trick is not
working with deadline. 

Probably I am doing another stupid mistake.

Probably not!
darwin includes a library libeditline that masquerade as libreadline.
So you have to point ./Configure to the brew version with
--with-readline=/usr/local
or something else.
Check Configure output carefully, it should tell you if it is OK.

Cheers,
Bill.