[MacPorts] #66159: gdk-pixbuf2 dependents malloc issue (PPC and Intel)

MacPorts noreply at macports.org
Tue Dec 6 01:31:42 UTC 2022


#66159: gdk-pixbuf2 dependents malloc issue (PPC and Intel)
---------------------------+----------------------------------
  Reporter:  barracuda156  |      Owner:  kencu
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.8.0
Resolution:                |   Keywords:  leopard, snowleopard
      Port:  gdk-pixbuf2   |
---------------------------+----------------------------------

Comment (by kencu):

 OK, I bumped into this finally on a Leopard Intel system and may have
 sorted it out.

 gdk-pixbuf2 builds on that system with gcc-4.2, but still throws the
 malloc error that you see when using the new libstdc++ in gcc7.5+.

 This is a bit of a weird situation, because as far as I can see (looking
 quickly), there is no c++ code anywhere in gdk-pixbuf2. But somewhere, one
 of the libraries it links to must invoke some, because crash it does.

 So we need to do the legacysupport binwrapping trick on the gdk-pixbuf2
 binaries. But legacysupport never anticipated this case, so it tries to
 block you, thinking you're out of your mind perhaps, by making sure you're
 only binwrapping if the stdlib=macports-libstdc++.

 So to allow the binwrapping to work, we have to tell MacPorts that is what
 we are doing, and then it can work, the bins are wrapped, and all works
 well.

 Adding this to the gdk-pixbuf2 portfile fixes the bins, in the end:

 {{{
 PortGroup           legacysupport 1.1

 legacysupport.newest_darwin_requires_legacy 10
 legacysupport.redirect_bins gdk-pixbuf-csource gdk-pixbuf-pixdata gdk-
 pixbuf-query-loaders gdk-pixbuf-thumbnailer
 compiler.cxx_standard 2011
 }}}

 And then this works again without crashing:
 {{{
 $ sudo gdk-pixbuf-query-loaders --update-cache
 }}}

 Now, everyone is going to find it completely stupid to set
 {{{compiler.cxx_standard 2011}}} on a port that only uses "C", so we
 probably have to come up with some new plan on how to enable that.

 Or just copy-paste the post-destroot into the portfile and tweak it so it
 works. But here I defer to the maintainer, as no point wasting time on
 something that won't get committed.

 And now, a whole new chapter in the {{{malloc: *** error for object
 0x1017e2458: Non-aligned pointer being freed}}} saga opens.

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


More information about the macports-tickets mailing list