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

MacPorts noreply at macports.org
Wed Aug 17 18:38:48 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 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 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.

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


More information about the macports-tickets mailing list