[MacPorts] #69812: /usr/bin/clang++ cannot compile anything when trying to compile as x86_64 on a current arm system against the MacOSX10.13.sdk

MacPorts noreply at macports.org
Sun Jun 9 23:02:06 UTC 2024


#69812: /usr/bin/clang++ cannot compile anything when trying to compile as x86_64
on a current arm system against the MacOSX10.13.sdk
---------------------+--------------------
  Reporter:  lukaso  |      Owner:  (none)
      Type:  defect  |     Status:  new
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:
Resolution:          |   Keywords:
      Port:          |
---------------------+--------------------

Comment (by kencu):

 OK, well forcing it to also link against libstdc++.dylib finds the missing
 symbols, stupidly:
 {{{
 % /usr/bin/clang++  -v -Wl,-v -pipe -Os -target x86_64-apple-darwin17
 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk
 hello.cpp -Wl,-lstdc++.6
 }}}

 and produces a working binary, although a Frankenstein thing, linked
 against libstd++ and libc++:

 {{{
  % ./a.out
 Hello World!

 % otool -L a.out
 a.out:
         /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
 version 104.1.0)
         /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current
 version 400.9.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 1252.50.4)

 }}}

 So now we just need to sort out why those missing symbols are not in
 libc++.dylib (apparently) any more. Did they get moved to some other
 library I wonder?

-- 
Ticket URL: <https://trac.macports.org/ticket/69812#comment:25>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list