[MacPorts] #66802: gdb: ignoring file /opt/local/lib/libintl.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 (was: I am getting this error while trying to install sudo port install i386-elf-gcc gdb)

MacPorts noreply at macports.org
Tue Jan 31 20:56:10 UTC 2023


#66802: gdb: ignoring file /opt/local/lib/libintl.dylib, building for macOS-x86_64
but attempting to link with file built for macOS-arm64
--------------------------+--------------------
  Reporter:  sunnypranay  |      Owner:  (none)
      Type:  defect       |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:
      Port:  gdb          |
--------------------------+--------------------
Changes (by ryandesign):

 * priority:  High => Normal
 * port:   => gdb


Comment:

 You mentioned i386-elf-gcc but that doesn't appear to be related to this
 ticket. The portion of the log you showed is a build failure of gdb.

 Based on the fact that you have an arm64 libintl.dylib, I believe you are
 on an Apple Silicon Mac. Based on the fact that you are using the macOS 13
 SDK, I assume you are running macOS 12 or 13.

 The gdb port does not build for arm64 (it contains the line
 `supported_archs x86_64 i386`) so it will build for x86_64. That means all
 of its dependencies must be built universal (for both x86_64 and arm64)
 first. MacPorts should have made sure that was the case before beginning
 to install gdb, but that doesn't appear to have happened. Let's
 investigate why.

 libintl.dylib is part of the gettext port. For what architecture(s) does
 MacPorts think it installed gettext? To find out, run:

 {{{
 port -qv installed gettext
 }}}

 For what architecture(s) has gettext actually been installed? To find out,
 run:

 {{{
 lipo -info /opt/local/lib/libintl.dylib
 }}}

 If there is a mismatch between the two, maybe something else replaced the
 gettext files without MacPorts' knowledge. If so, the solution would be to
 reinstall gettext using:

 {{{
 sudo port -n upgrade --force gettext
 }}}

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


More information about the macports-tickets mailing list