tests/pixbuf-lowmem.c makes calls to __libc_malloc() __libc_realloc() and __libc_free(). These are glibc specific functions and should never be used. Since this is in tests, one solution is to just edit the top level Makefile.am and remove SUBDIRS = tests. A better solution would be to shield the tests subdir in an if driven by AC_ARG_ENABLE([tests],...). The best solution would be to replace __libc_malloc() and friends with their proper POSIX versions. I'll take care of this upstream, but its causing me lots of problems with uclibc and musl right now, and since 2.30.8-r2 will probably be dropped as soon as the current version is stabilized on all arches, I'd like to get a solution in the tree soon even if its just ~arch. I'll get the proper fix upstream. Reproducible: Always
Would this fix it? https://git.gnome.org/browse/gdk-pixbuf/commit/?h=gdk-pixbuf-2-32&id=e1fd25a3d0c18bd941f685bbdf5aa3812403a48e
If so, please feel free to add the patch to the ebuild. (And __libc_malloc() and friends cannot be replaced with their posix versions since the purpose of the test is to override the malloc symbol with custom code to test that gdk-pixbuf correctly handles out-of-memory situations.)
Patch added. https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91c97a5dae6ab5ca1fead8aacba2c5e058f38212 commit 91c97a5dae6ab5ca1fead8aacba2c5e058f38212 Author: Alexandre Rostovtsev <tetromino@gentoo.org> Date: Wed Oct 14 08:39:32 2015 -0400 x11-libs/gdk-pixbuf: run glibc-specific test only on glibc Gentoo-Bug: 563052 Reported-by: Anthony Basile
(In reply to Alexandre Rostovtsev from comment #3) > Patch added. > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > ?id=91c97a5dae6ab5ca1fead8aacba2c5e058f38212 > > commit 91c97a5dae6ab5ca1fead8aacba2c5e058f38212 > Author: Alexandre Rostovtsev <tetromino@gentoo.org> > Date: Wed Oct 14 08:39:32 2015 -0400 > > x11-libs/gdk-pixbuf: run glibc-specific test only on glibc > > Gentoo-Bug: 563052 > Reported-by: Anthony Basile this should work for musl but not uclibc because uclibc defines __GLIBC__. The line #ifdef __GLIBC__ should be #if defined(__GLIBC__) && !defined(__UCLIBC__) Let me test first and then I'll make the fix if its okay with you.
(In reply to Anthony Basile from comment #4) > (In reply to Alexandre Rostovtsev from comment #3) > > Patch added. > > > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > > ?id=91c97a5dae6ab5ca1fead8aacba2c5e058f38212 > > > > commit 91c97a5dae6ab5ca1fead8aacba2c5e058f38212 > > Author: Alexandre Rostovtsev <tetromino@gentoo.org> > > Date: Wed Oct 14 08:39:32 2015 -0400 > > > > x11-libs/gdk-pixbuf: run glibc-specific test only on glibc > > > > Gentoo-Bug: 563052 > > Reported-by: Anthony Basile > > this should work for musl but not uclibc because uclibc defines __GLIBC__. > The line > > #ifdef __GLIBC__ > > should be > > #if defined(__GLIBC__) && !defined(__UCLIBC__) > > Let me test first and then I'll make the fix if its okay with you. Okay I edited Nathan Copa's patch as above, tested, and it now works on glibc, uclibc and musl. Copa is the lead for Alpine Linux which uses musl. It used to use uclibc, so I'm surprised he didn't add that to his patch, but I guess these days he's only concerned with musl. I'll get that full fix upstream.
(In reply to Anthony Basile from comment #5) > (In reply to Anthony Basile from comment #4) > > (In reply to Alexandre Rostovtsev from comment #3) > > > Patch added. > > > > > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > > > ?id=91c97a5dae6ab5ca1fead8aacba2c5e058f38212 > > > > > > commit 91c97a5dae6ab5ca1fead8aacba2c5e058f38212 > > > Author: Alexandre Rostovtsev <tetromino@gentoo.org> > > > Date: Wed Oct 14 08:39:32 2015 -0400 > > > > > > x11-libs/gdk-pixbuf: run glibc-specific test only on glibc > > > > > > Gentoo-Bug: 563052 > > > Reported-by: Anthony Basile > > > > this should work for musl but not uclibc because uclibc defines __GLIBC__. > > The line > > > > #ifdef __GLIBC__ > > > > should be > > > > #if defined(__GLIBC__) && !defined(__UCLIBC__) > > > > Let me test first and then I'll make the fix if its okay with you. > > Okay I edited Nathan Copa's patch as above, tested, and it now works on > glibc, uclibc and musl. Copa is the lead for Alpine Linux which uses musl. > It used to use uclibc, so I'm surprised he didn't add that to his patch, but > I guess these days he's only concerned with musl. I'll get that full fix > upstream. For the records, the expanded fix to includ both musl and uClibc is upstream now: https://bugzilla.gnome.org/show_bug.cgi?id=756590
gdk-pixbuf was bumped, but gdk-pixbuf-2.32.1-lowmem-test-glibc.patch was not forward ported. Upstream has not yet applied that patch which introduces some very non-posix functions. I don't think they care (or fully understand) why they shouldn't use __libc_malloc() and friends. With 2.32.3 being stabilized this is no breaking on all musl and uclibc systems. Can we get keep this patch going forward why I try to get upstream to change their minds :)
(In reply to Anthony Basile from comment #7) > gdk-pixbuf was bumped, but gdk-pixbuf-2.32.1-lowmem-test-glibc.patch was not > forward ported. Upstream has not yet applied that patch which introduces > some very non-posix functions. I don't think they care (or fully > understand) why they shouldn't use __libc_malloc() and friends. > > With 2.32.3 being stabilized this is no breaking on all musl and uclibc > systems. Can we get keep this patch going forward why I try to get upstream > to change their minds :) wait, i take that back. upstream did apply my patch but they made a small change which is incorrect. i'll prepare a proper fix and push it upstream and add it to 2.32.3.
Thanks for all the investigation :)
Did you finally pushed the updated fix? Thanks
Won't fix without a patch from someone who cares about uclibc.