[MacPorts] #65685: sparsehash fails to link on Rosetta: Undefined symbols "MallocExtension::instance()"

MacPorts noreply at macports.org
Wed Aug 17 19:46:25 UTC 2022


#65685: sparsehash fails to link on Rosetta: Undefined symbols
"MallocExtension::instance()"
---------------------------+-------------------------------------------
  Reporter:  barracuda156  |      Owner:  (none)
      Type:  defect        |     Status:  new
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.7.2
Resolution:                |   Keywords:  powerpc, rosetta, snowleopard
      Port:  sparsehash    |
---------------------------+-------------------------------------------

Comment (by barracuda156):

 Replying to [comment:1 kencu]:
 > because there is no arch flag in the referenced build line, g++-4.2
 looks around to guess what you are trying to do, and defaults to building
 as x86_64 on this system.
 >
 > when it tries to link against the libtcmalloc.dylib, it finds the
 library is built for ppc7400. So it can't link.
 >
 > you need to add an arch flag to the build/link of sparsehash for your
 desired build arch, and you should be good to go.
 >
 > this is exactly the kind of "generic good fix" I was talking about
 before, that benefits all users.

 Thank you, that worked!

 (Yes, I usually include logs, unless the issue appears clear enough.)

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


More information about the macports-tickets mailing list