Re: Build failure on macOS Sonoma 14.0 beta
Marc Culler writes: The build fails in the same way when I remove --enable-fat but use export CFLAGS="-arch x86_64 -mmacosx-version-min=10.9 -mno-avx -mno-avx2 -mno-bmi2" If it "fails in the same way" without --enable-fat, your machine has gremlins. The problem symbol is very specific to FAT builds. -- Torbjörn Please encrypt, key id 0xC8601622 ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: Build failure on macOS Sonoma 14.0 beta
Marc Culler writes: With no CFLAGS and using $ ./configure --with-pic --enable-fat --prefix=X I get almost the same error (the difference being the distance of the branch), namely: It is not possible for the GMP maintainers to analyse the effects of various options which we do not know about. As I wrote before, please just use --enable-fat. The GMP manual is a great source for information on how to build and use GMP. I have no idea what effect --with-pic might have on a GMP build. We do not list that option in our manual. It is a common problem that people pass lots of options to the compiler by means of GMP's configure, which in turn breaks things. My avenue to sorting such problem out would be to cut down on those options, not report any resulting failure as a bug. The error you get, assuming it still happens without any unsupported extra options, is clearly related to "fat" builds. How Apple's proprietary clang breaks it is curious. My best guess is that it is a compiler bug; clang has always been buggy and Apple's closed source variant is worse that the open source variant. -- Torbjörn Please encrypt, key id 0xC8601622 ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: Build failure on macOS Sonoma 14.0 beta
And one more -- The build fails in the same way when I remove --enable-fat but use export CFLAGS="-arch x86_64 -mmacosx-version-min=10.9 -mno-avx -mno-avx2 -mno-bmi2" I am concluding that Apple has silently dropped support for old Intel CPUs which are supported by OSX 10.9. - Marc On Wed, Sep 20, 2023 at 12:01 PM Marc Culler wrote: > One more data point -- I do get a successful build if I omit the > --enable-fat option. That means no CFLAGS and configuring with: > > $ ./configure --with-pic --prefix=XX > > In this case the compiler options include: > -mtune=skylake -march=broadwell > > - Marc > > On Wed, Sep 20, 2023 at 11:49 AM Marc Culler > wrote: > >> With no CFLAGS and using >> >> $ ./configure --with-pic --enable-fat --prefix=X >> >> I get almost the same error (the difference being the distance of the >> branch), namely: >> >> ld: branch8 out of range 378633 in ___gmpn_add_nc_x86_64 >> >> - Marc >> >> On Wed, Sep 20, 2023 at 11:25 AM Hans Åberg wrote: >> >>> >>> >>> > On 20 Sep 2023, at 16:36, Marc Culler wrote: >>> > >>> > …macOS Sonoma beta… >>> … >>> > …using: "Apple clang version 15.0.0 >>> > (clang-1500.0.40.1)" >>> >>> The same compiler version is now available on MacOS 13, together with >>> Xcode 15. >>> >>> ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: Build failure on macOS Sonoma 14.0 beta
One more data point -- I do get a successful build if I omit the --enable-fat option. That means no CFLAGS and configuring with: $ ./configure --with-pic --prefix=XX In this case the compiler options include: -mtune=skylake -march=broadwell - Marc On Wed, Sep 20, 2023 at 11:49 AM Marc Culler wrote: > With no CFLAGS and using > > $ ./configure --with-pic --enable-fat --prefix=X > > I get almost the same error (the difference being the distance of the > branch), namely: > > ld: branch8 out of range 378633 in ___gmpn_add_nc_x86_64 > > - Marc > > On Wed, Sep 20, 2023 at 11:25 AM Hans Åberg wrote: > >> >> >> > On 20 Sep 2023, at 16:36, Marc Culler wrote: >> > >> > …macOS Sonoma beta… >> … >> > …using: "Apple clang version 15.0.0 >> > (clang-1500.0.40.1)" >> >> The same compiler version is now available on MacOS 13, together with >> Xcode 15. >> >> ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: Build failure on macOS Sonoma 14.0 beta
With no CFLAGS and using $ ./configure --with-pic --enable-fat --prefix=X I get almost the same error (the difference being the distance of the branch), namely: ld: branch8 out of range 378633 in ___gmpn_add_nc_x86_64 - Marc On Wed, Sep 20, 2023 at 11:25 AM Hans Åberg wrote: > > > > On 20 Sep 2023, at 16:36, Marc Culler wrote: > > > > …macOS Sonoma beta… > … > > …using: "Apple clang version 15.0.0 > > (clang-1500.0.40.1)" > > The same compiler version is now available on MacOS 13, together with > Xcode 15. > > ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: Build failure on macOS Sonoma 14.0 beta
> On 20 Sep 2023, at 16:36, Marc Culler wrote: > > …macOS Sonoma beta… … > …using: "Apple clang version 15.0.0 > (clang-1500.0.40.1)" The same compiler version is now available on MacOS 13, together with Xcode 15. ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: Build failure on macOS Sonoma 14.0 beta
I get exactly the same error with: export CFLAGS="-arch x86_64 -mmacosx-version-min=10.9" I will also try removing those options. - Marc On Wed, Sep 20, 2023 at 10:48 AM Marc Culler wrote: > Thanks for replying! > > The reason for the options "-mno-avx -mno-avx2 -mno-bmi2" is that it is > important for us to have a gmp which runs on old intel hardware. And we > had no trouble with those options until this version of clang. > > Also, the function in which ld claims to find the out-of-range branch8 is > written in assembly language. However, ld may be lying. There is no > branch instruction in the .asm file, and disassembly of the .o file also > shows no branch instruction. > > I will try removing those options and see what happens. > > - Marc > > > > On Wed, Sep 20, 2023 at 10:33 AM Torbjörn Granlund wrote: > >> Marc Culler writes: >> >> I am unable to build gmp-6.2.1 on macOS Sonoma beta using the command >> line >> tools released for that system. The system is up to date. The hardware >> of >> the build system is "1.6 GHz Dual-Core Intel Core i5". >> >> The build commands I am using are: >> $ export GMPPREFIX=/a/path/on/my/system >> $ export CFLAGS="-arch x86_64 -mmacosx-version-min=10.9 -mno-avx >> -mno-avx2 >> -mno-bmi2" >> $ ./configure --with-pic --build=x86_64-none-darwin >> --host=x86_64-none-darwin --enable-fat --prefix=${GMPPREFIX}/intel >> >> The error message I get is: >> ld: branch8 out of range 501588 in ___gmpn_add_nc_x86_64 >> >> The error occurs when using: "Apple clang version 15.0.0 >> (clang-1500.0.40.1)" >> >> Have you tried letting GMP figure out how to best compile things? >> >> You want to retain the --enable-fat option only. >> >> Passing an arm long set of options usually makes the build worse, or >> breaks it completely. >> >> -- >> Torbjörn >> Please encrypt, key id 0xC8601622 >> > ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: Build failure on macOS Sonoma 14.0 beta
Thanks for replying! The reason for the options "-mno-avx -mno-avx2 -mno-bmi2" is that it is important for us to have a gmp which runs on old intel hardware. And we had no trouble with those options until this version of clang. Also, the function in which ld claims to find the out-of-range branch8 is written in assembly language. However, ld may be lying. There is no branch instruction in the .asm file, and disassembly of the .o file also shows no branch instruction. I will try removing those options and see what happens. - Marc On Wed, Sep 20, 2023 at 10:33 AM Torbjörn Granlund wrote: > Marc Culler writes: > > I am unable to build gmp-6.2.1 on macOS Sonoma beta using the command > line > tools released for that system. The system is up to date. The hardware > of > the build system is "1.6 GHz Dual-Core Intel Core i5". > > The build commands I am using are: > $ export GMPPREFIX=/a/path/on/my/system > $ export CFLAGS="-arch x86_64 -mmacosx-version-min=10.9 -mno-avx > -mno-avx2 > -mno-bmi2" > $ ./configure --with-pic --build=x86_64-none-darwin > --host=x86_64-none-darwin --enable-fat --prefix=${GMPPREFIX}/intel > > The error message I get is: > ld: branch8 out of range 501588 in ___gmpn_add_nc_x86_64 > > The error occurs when using: "Apple clang version 15.0.0 > (clang-1500.0.40.1)" > > Have you tried letting GMP figure out how to best compile things? > > You want to retain the --enable-fat option only. > > Passing an arm long set of options usually makes the build worse, or > breaks it completely. > > -- > Torbjörn > Please encrypt, key id 0xC8601622 > ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Re: Build failure on macOS Sonoma 14.0 beta
Marc Culler writes: I am unable to build gmp-6.2.1 on macOS Sonoma beta using the command line tools released for that system. The system is up to date. The hardware of the build system is "1.6 GHz Dual-Core Intel Core i5". The build commands I am using are: $ export GMPPREFIX=/a/path/on/my/system $ export CFLAGS="-arch x86_64 -mmacosx-version-min=10.9 -mno-avx -mno-avx2 -mno-bmi2" $ ./configure --with-pic --build=x86_64-none-darwin --host=x86_64-none-darwin --enable-fat --prefix=${GMPPREFIX}/intel The error message I get is: ld: branch8 out of range 501588 in ___gmpn_add_nc_x86_64 The error occurs when using: "Apple clang version 15.0.0 (clang-1500.0.40.1)" Have you tried letting GMP figure out how to best compile things? You want to retain the --enable-fat option only. Passing an arm long set of options usually makes the build worse, or breaks it completely. -- Torbjörn Please encrypt, key id 0xC8601622 ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs
Build failure on macOS Sonoma 14.0 beta
I am unable to build gmp-6.2.1 on macOS Sonoma beta using the command line tools released for that system. The system is up to date. The hardware of the build system is "1.6 GHz Dual-Core Intel Core i5". The build commands I am using are: $ export GMPPREFIX=/a/path/on/my/system $ export CFLAGS="-arch x86_64 -mmacosx-version-min=10.9 -mno-avx -mno-avx2 -mno-bmi2" $ ./configure --with-pic --build=x86_64-none-darwin --host=x86_64-none-darwin --enable-fat --prefix=${GMPPREFIX}/intel The error message I get is: ld: branch8 out of range 501588 in ___gmpn_add_nc_x86_64 The error occurs when using: "Apple clang version 15.0.0 (clang-1500.0.40.1)" The build succeeds with: "Apple clang version 14.0.3 (clang-1403.0.22.14.1)" The build also succeeds if I cross compile for arm using: $ export CFLAGS="-arch arm64 -mmacosx-version-min=10.9" $ ./configure --with-pic --build=${BUILD_SYSTEM} --host=arm64-none-darwin --prefix=${GMPPREFIX}/arm Note that the actual release of Sonoma is scheduled for September 26. - Marc Culler ___ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs