Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 239472

Summary: dev-libs/zziplib-0.13.49 [-r1] generates Bus error on sparc, blocking texlive upgrade.
Product: Gentoo Linux Reporter: Ferris McCormick (RETIRED) <fmccor>
Component: Current packagesAssignee: SpanKY <vapier>
Status: RESOLVED FIXED    
Severity: normal CC: mr_bones_, sparc, tex
Priority: High    
Version: 2008.0   
Hardware: Sparc   
OS: Linux   
URL: https://sourceforge.net/tracker/index.php?func=detail&aid=2479788&group_id=6389&atid=306389
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 371525, 237202    
Attachments: zziplib-0.13.49-aligned-access.patch
zziplib-0.13.49-aligned-access.patch
alternative patch for 0.13.50

Description Ferris McCormick (RETIRED) gentoo-dev 2008-10-03 19:37:06 UTC
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.
Comment 1 Friedrich Oslage (RETIRED) gentoo-dev 2008-10-03 21:36:41 UTC
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 2 SpanKY gentoo-dev 2008-10-26 04:50:00 UTC
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.
Comment 3 Friedrich Oslage (RETIRED) gentoo-dev 2008-11-17 19:12:03 UTC
Created attachment 172106 [details, diff]
zziplib-0.13.49-aligned-access.patch

Right, here's the revised patch, works fine.
Comment 4 SpanKY gentoo-dev 2008-11-17 20:26:31 UTC
once that patch gets cleaned up, feel free to commit it

http://dev.gentoo.org/~vapier/clean-patches
Comment 5 Friedrich Oslage (RETIRED) gentoo-dev 2008-11-17 22:39:11 UTC
done
Comment 6 SpanKY gentoo-dev 2008-11-17 22:56:57 UTC
looks good, thanks
Comment 7 Friedrich Oslage (RETIRED) gentoo-dev 2008-12-31 18:01:07 UTC
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 :)