Re: GMP bug (?) - unable to build for ARM64 with assembly enabled

2020-10-14 Thread Andreas Buff


Am 14.10.20 um 15:38 schrieb Marc Glisse:
> On Wed, 14 Oct 2020, Andreas Buff wrote:
>
>> Using host `aarch64-apple-darwin` gives me "unknown AArch64 fixup kind!"
>> errors.
>
> There was a discussion related to arm64 and apple in july, did you try 
> with a recent snapshot from https://gmplib.org/download/snapshot/ ?
>
Will try. I am using 6.2.0

Latest snapshot is from may though (re "discussion related to arm64 and 
apple in july").

Will come back with results.

Thx!




pEpkey.asc
Description: application/pgp-keys
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: GMP bug (?) - unable to build for ARM64 with assembly enabled

2020-10-14 Thread Hans Åberg

> On 14 Oct 2020, at 12:59, Andreas Buff  wrote:
> 
> We are cross building GMP for use on ARM64 iOS devices using this command:
> …

This link suggests using the -target option for makefiles outside Xcode.

https://developer.apple.com/documentation/xcode/building_a_universal_macos_binary


___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: GMP bug (?) - unable to build for ARM64 with assembly enabled

2020-10-14 Thread Torbjörn Granlund
Marco Bodrato  writes:

  Look for a filename starting with gmp-6.2.0-202010...

  Then please follow up here!

I changed how snapshots are managed.

1. There are now subdirs for each release series, plus "gmp-next".  The
   latter is made from the bleeding edge repo.

2. We have had an idea of an "active" repo, which is the same as the
   autobuilds use.  Now, both that active repo and the bleeding edge
   repo will have snapshots manufactured once per day.

I've long planned to change the snapshot mechanism even more:

3. Make snapshots just after checkins and only after checkins which pass
some tests.  If n checkins are made in a day, n snapshots are made,
where n might be 0.

4. Do that for all GMP repos.


-- 
Torbjörn
Please encrypt, key id 0xC8601622
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: GMP bug (?) - unable to build for ARM64 with assembly enabled

2020-10-14 Thread Marco Bodrato

Il 2020-10-14 21:28 t...@gmplib.org ha scritto:

Andreas Buff  writes:

  Latest snapshot is from may though



There is one made every day.


Look for a filename starting with gmp-6.2.0-202010...

Then please follow up here!

Ĝis,
m
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: GMP bug (?) - unable to build for ARM64 with assembly enabled

2020-10-14 Thread Torbjörn Granlund
Andreas Buff  writes:

  Latest snapshot is from may though

Not quite.  Look better.

There is one made every day.

-- 
Torbjörn
Please encrypt, key id 0xC8601622
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: GMP bug (?) - unable to build for ARM64 with assembly enabled

2020-10-14 Thread Andreas Buff
Hi,

thanks (!) for useful and fast response.

See below.

Best,
Andreas


Am 14.10.20 um 14:50 schrieb Marc Glisse:
> On Wed, 14 Oct 2020, Andreas Buff wrote:
>
>> We are cross building GMP for use on ARM64 iOS devices using this 
>> command:
>>
>> ```
>> export CFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH}
>> -miphoneos-version-min=${MIN_IOS_VERSION} -std=c99"
>> export LDFLAGS="-arch ${ARCH}"
>> export CC="$(whereis gcc) -arch ${ARCH} -isysroot ${SDK_PATH}"
>>
>> PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
>> ./configure --host=${HOST} --prefix=$PREFIX
>> make -j4
>> make install
>> ```
>>
>> Where:
>> ${ARCH}="arm64"
>> ${SDK_PATH}=path to iOS14 SDK (failed also wirth previous SDK versions
>> MIN_IOS_VERSION="11.0"
>> ${HOST}="arm-apple-darwin"
>
> That triplet looks like 32 bits to me, don't you mean something like 
> aarch64 or arm64 instead of arm there?

Ah, Good catch.

Using host `aarch64-apple-darwin` gives me "unknown AArch64 fixup kind!" 
errors.

Find relevant part of the log attached.

tmp-bdiv_q_1.s:75:2: libtool: compile:  
/Applications/Xcode_11.6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
 -arch arm64 -isysroot 
/Applications/Xcode_11.6.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk
 -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_sbpi1_bdiv_r 
-arch arm64 -isysroot 
/Applications/Xcode_11.6.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk
 -miphoneos-version-min=11.0 -std=c99 -c sbpi1_bdiv_r.c  -fno-common -DPIC -o 
.libs/sbpi1_bdiv_r.o
libtool: compile:  
/Applications/Xcode_11.6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
 -arch arm64 -isysroot 
/Applications/Xcode_11.6.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk
 -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_sbpi1_bdiv_qr 
-arch arm64 -isysroot 
/Applications/Xcode_11.6.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk
 -miphoneos-version-min=11.0 -std=c99 -c sbpi1_bdiv_qr.c -o sbpi1_bdiv_qr.o 
>/dev/null 2>&1
libtool: compile:  
/Applications/Xcode_11.6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
 -arch arm64 -isysroot 
/Applications/Xcode_11.6.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk
 -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_sbpi1_bdiv_r 
-arch arm64 -isysroot 
/Applications/Xcode_11.6.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk
 -miphoneos-version-min=11.0 -std=c99 -c sbpi1_bdiv_r.c -o sbpi1_bdiv_r.o 
>/dev/null 2>&1
libtool: compile:  
/Applications/Xcode_11.6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
 -arch arm64 -isysroot 
/Applications/Xcode_11.6.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk
 -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_dcpi1_bdiv_q 
-arch arm64 -isysroot 
/Applications/Xcode_11.6.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk
 -miphoneos-version-min=11.0 -std=c99 -c dcpi1_bdiv_q.c  -fno-common -DPIC -o 
.libs/dcpi1_bdiv_q.o
error: /bin/sh ../libtool  --tag=CC   --mode=compile 
/Applications/Xcode_11.6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
 -arch arm64 -isysroot 
/Applications/Xcode_11.6.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk
 -DHAVE_CONFIG_H -I. -I..  -D__GMP_WITHIN_GMP -I.. -DOPERATION_`echo 
dcpi1_bdiv_qr | sed 's/_$//'`   -arch arm64 -isysroot 
/Applications/Xcode_11.6.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk
 -miphoneos-version-min=11.0 -std=c99 -c -o dcpi1_bdiv_qr.lo dcpi1_bdiv_qr.c
ADR/ADRP relocations must be GOT relative
 adrp x7, :got:__gmp_binvert_limb_table
 ^
tmp-bdiv_q_1.s:75:2: error: unknown AArch64 fixup kind!
/bin/sh ../libtool  --tag=CC   --mode=compile 
/Applications/Xcode_11.6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
 -arch arm64 -isysroot 
/Applications/Xcode_11.6.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk
 -DHAVE_CONFIG_H -I. -I..  -D__GMP_WITHIN_GMP -I.. -DOPERATION_`echo mu_bdiv_q 
| sed 's/_$//'`   -arch arm64 -isysroot 
/Applications/Xcode_11.6.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk
 -miphoneos-version-min=11.0 -std=c99 -c -o mu_bdiv_q.lo mu_bdiv_q.c
libtool: compile:  
/Applications/Xcode_11.6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
 -arch arm64 -isysroot 
/Applications/Xcode_11.6.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk
 -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_dcpi1_bdiv_qr 
-arch arm64 -isysroot 

GMP bug (?) - unable to build for ARM64 with assembly enabled

2020-10-14 Thread Andreas Buff
Hi,

We are cross building GMP for use on ARM64 iOS devices using this command:

```
export CFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH} 
-miphoneos-version-min=${MIN_IOS_VERSION} -std=c99"
export LDFLAGS="-arch ${ARCH}"
export CC="$(whereis gcc) -arch ${ARCH} -isysroot ${SDK_PATH}"

PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig 
./configure --host=${HOST} --prefix=$PREFIX
make -j4
make install
```

Where:
${ARCH}="arm64"
${SDK_PATH}=path to iOS14 SDK (failed also wirth previous SDK versions
MIN_IOS_VERSION="11.0"
${HOST}="arm-apple-darwin"

Error:
configure: error: Oops, mp_limb_t is 64 bits, but the assembler code
in this configuration expects 32 bits.
You appear to have set $CFLAGS, perhaps you also need to tell GMP the
intended ABI, see "ABI and ISA" in the manual.


Adding --disable-assembly to configure works.

I have tried several things from the manual with no success like setting 
ABI=64 (-> "configure: error: ABI=64 is not among the following valid 
choices: 32".

Can you please assist?

Best,
Andreas



pEpkey.asc
Description: application/pgp-keys
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: GMP bug (?) - unable to build for ARM64 with assembly enabled

2020-10-14 Thread Marc Glisse

On Wed, 14 Oct 2020, Andreas Buff wrote:


Using host `aarch64-apple-darwin` gives me "unknown AArch64 fixup kind!"
errors.


There was a discussion related to arm64 and apple in july, did you try 
with a recent snapshot from https://gmplib.org/download/snapshot/ ?


--
Marc Glisse
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: GMP bug (?) - unable to build for ARM64 with assembly enabled

2020-10-14 Thread Marc Glisse

On Wed, 14 Oct 2020, Andreas Buff wrote:


We are cross building GMP for use on ARM64 iOS devices using this command:

```
export CFLAGS="-arch ${ARCH} -isysroot ${SDK_PATH}
-miphoneos-version-min=${MIN_IOS_VERSION} -std=c99"
export LDFLAGS="-arch ${ARCH}"
export CC="$(whereis gcc) -arch ${ARCH} -isysroot ${SDK_PATH}"

PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
./configure --host=${HOST} --prefix=$PREFIX
make -j4
make install
```

Where:
${ARCH}="arm64"
${SDK_PATH}=path to iOS14 SDK (failed also wirth previous SDK versions
MIN_IOS_VERSION="11.0"
${HOST}="arm-apple-darwin"


That triplet looks like 32 bits to me, don't you mean something like 
aarch64 or arm64 instead of arm there?


--
Marc Glisse
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs