dev-libs/zziplib-0.13.49 [-r1] are currently marked -sparc. Building them with FEATURES=test generates a bus error (use of misaligned data item) about here (zip.c + 290) trailer->zz_entries = zzip_disk_trailer_localentries (orig); according to gdb. Program being tested is lt-zziptest (It works out to Now, the real program for this, zzcat, does work, so the problem might be in the tests themselves, but it's hard to say. Unfortunately, this problem is holding up sparc for texlive keywording, because texlive needs luatex, and luatex wants zziplib. If the problem is in the test drivers and not in the actual installed package, we can live with that, but then the tests should be fixed at some point. I'll investigate as time permits because of the texlive (luatex) issues.
Created attachment 167114 [details, diff] zziplib-0.13.49-aligned-access.patch They somehow managed to cast their pointers in a way to break glibc'd bswap_{16,32,64} functions. Fortunately they also provided their own byte swapping functions that do work. The attached patch works fine for me but I'm unsure what impact it would have on other big-endian arches. Btw. the tests fail if MAKEOPTS = 3 so the ebuild should probably do emake -j1 check.
Comment on attachment 167114 [details, diff] zziplib-0.13.49-aligned-access.patch the code you're changing isnt sparc specific, and really you only need to change the one location in the header file. a simple '&& !defined(__sparc__)'. please test that and post a new patch.
Created attachment 172106 [details, diff] zziplib-0.13.49-aligned-access.patch Right, here's the revised patch, works fine.
once that patch gets cleaned up, feel free to commit it http://dev.gentoo.org/~vapier/clean-patches
done
looks good, thanks
Created attachment 176962 [details, diff] alternative patch for 0.13.50 FYI I investigated ZZIP_HAVE_ALIGNED_ACCESS_REQUIRED in 0.13.50, it fixes fetch.h but not fetch.c. I attached a patch to change 0.13.50 to do it the way upstream wants to do it. Both this one and the existing zziplib-0.13.50-sparc-aligned-access.patch are fine so use whatever you prefer :)
thanks, ive merged your patch and posted it upstream http://sources.gentoo.org/dev-libs/zziplib/zziplib-0.13.50.ebuild?r1=1.1&r2=1.2 http://sources.gentoo.org/dev-libs/zziplib/files/zziplib-0.13.50-sparc-aligned-access.patch?r1=1.1&r2=1.2