[unable to compile and link C++ code with g++ 12.3]

Maxim Abalenkov maxim.abalenkov at gmail.com
Wed Sep 20 16:11:13 UTC 2023


Dear all,

How are you? I hope all is well with you. I need help please. I’m no longer able to compile and link a C++ code on my Mac. I use the latest GNU C++ compiler available via MacPorts:

g++ (MacPorts gcc12 12.3.0_0+stdlib_flag) 12.3.0

Please find below the output of the make tool:

g++ ifm.o Core/engine.o Core/filter.o Core/watershed.o FileIO/interpolation.o FileIO/mapfile.o FileIO/netcdf_io.o FileIO/rain_table.o -o ifm -fopenmp -O3   -lm -lz -lnetcdf_c++ -lnetcdf -L/opt/local/lib
-macosx_version_min has been renamed to -macos_version_min
0  0x109822f43  __assert_rtn + 64
1  0x109724f43  ld::AtomPlacement::findAtom(unsigned char, unsigned long long, ld::AtomPlacement::AtomLoc const*&, long long&) const + 1411
2  0x109741431  ld::InputFiles::SliceParser::parseObjectFile(mach_o::Header const*) const + 19745
3  0x109751b71  ld::InputFiles::parseAllFiles(void (ld::AtomFile const*) block_pointer)::$_7::operator()(unsigned long, ld::FileInfo const&) const + 657
4  0x7ff810954066  _dispatch_client_callout2 + 8
5  0x7ff810965e09  _dispatch_apply_invoke + 213
6  0x7ff810954033  _dispatch_client_callout + 8
7  0x7ff8109640f6  _dispatch_root_queue_drain + 683
8  0x7ff810964768  _dispatch_worker_thread2 + 170
9  0x7ff810af1c0f  _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: *** [Makefile:58: ifm] Error 1

All this may be related to the update of Xcode command line tools that I performed yesterday. Any help on how to debug and make it compile would be most welcome. Thank you and have a great day ahead!

—
Best wishes,
Maxim

Maxim Abalenkov \\ maxim.abalenkov at gmail.com
+44 7 486 486 505 \\ www.maxim.abalenkov.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20230920/7be84e5e/attachment.htm>


More information about the macports-users mailing list