This appears to be a completely independent bug in Apple's new linker.
(You are linking with libgmp, but presumably that library was built with a
different linker.  And the "error" is different.) Once I knew what to look
for I found lots of issues with the new linker reported on the Apple
development site.  Perhaps we can assume that the new linker is still
unstable and eventually will be working.  In the meantime we can still use
the old linker.  I guess that we can just carry on and hope for the best.

Thanks, everyone, for your help with this.

- Marc

On Thu, Sep 21, 2023 at 2:50 AM Hans Åberg <haber...@telia.com> wrote:

>
> > On 20 Sep 2023, at 22:45, Marc Culler <marc.cul...@gmail.com> wrote:
> >
> > I learned by reading the release notes for XCode 15 that Apple rewrote
> the linker for XCode 15.  They also made the old linker available by using
> -ld64 as a linker option.
>
> When I use the new linker, using MacPorts gcc12 and gmp-6.2.1, I get the
> error [1] below. When adding '-ld64', I merely get a warning [2].
>
> The file Relocations.cpp contains LLVM platform-independent functions to
> process relocations.
>
> — 1 —
> % make
> /Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
> /opt/local/bin/g++-mp-12 -std=c++20 -g  -L /usr/local/lib -o mli MLI.o
> gc.o main.o write-style.o basictype.o database.o database-lexer.o
> database-parser.o directive-lexer.o directive-parser.o definition.o
> inferenceengine.o metacondition.o precedence.o proposition.o substitution.o
> function.o hoare_logic.o  -lgmp
> -macosx_version_min has been renamed to -macos_version_min
> 0  0x10dcfdf43  __assert_rtn + 64
> 1  0x10dbfff43  ld::AtomPlacement::findAtom(unsigned char, unsigned long
> long, ld::AtomPlacement::AtomLoc const*&, long long&) const + 1411
> 2  0x10dc1c431
> ld::InputFiles::SliceParser::parseObjectFile(mach_o::Header const*) const +
> 19745
> 3  0x10dc2cb71  ld::InputFiles::parseAllFiles(void (ld::AtomFile const*)
> block_pointer)::$_7::operator()(unsigned long, ld::FileInfo const&) const +
> 657
> 4  0x7ff816142066  _dispatch_client_callout2 + 8
> 5  0x7ff816153e09  _dispatch_apply_invoke + 213
> 6  0x7ff816142033  _dispatch_client_callout + 8
> 7  0x7ff8161520f6  _dispatch_root_queue_drain + 683
> 8  0x7ff816152768  _dispatch_worker_thread2 + 170
> 9  0x7ff8162dfc0f  _pthread_wqthread + 257
> ld: Assertion failed: (resultIndex < sectData.atoms.size()), function
> findAtom, file Relocations.cpp, line 1336.
> collect2: error: ld returned 1 exit status
> make[1]: *** [mli] Error 1
> make: *** [all] Error 2
>
> — 2 —
>
> % /opt/local/bin/g++-mp-12 -std=c++20 -g  -L /usr/local/lib -o mli MLI.o
> gc.o main.o write-style.o basictype.o database.o database-lexer.o
> database-parser.o directive-lexer.o directive-parser.o definition.o
> inferenceengine.o metacondition.o precedence.o proposition.o substitution.o
> function.o hoare_logic.o  -lgmp -ld64
> -macosx_version_min has been renamed to -macos_version_min
> ld: warning: -ld64 is deprecated, use -ld_classic instead
>
> — End —
>
>
>
_______________________________________________
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs

Reply via email to