[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#637667: libkpathsea5: breaks pdflatex on big endian platforms



clone -1 637667
retitle -1 libkpathsea5: ABI changed on 32-bit platforms
thanks

On Sat, Aug 13, 2011 at 05:50:04PM +0200, Aurelien Jarno wrote:
> Package: libkpathsea5
> Version: 2009-10
> Severity: serious
> 
> When libkpathsea5 version 2009-10 pdflatex doesn't work anymore, and
> issues strange errors:
> 
> | Chapter 1.
> | <yaws_head.pdf, id=26, 804.00375pt x 61.22874pt> <use yaws_head.pdf>
> | Overfull \hbox (12.65096pt too wide) in paragraph at lines 65--66
> | [] 
> | [2 <./yaws_head.pdf>] [3pdflatex: yaws: Invalid argument
> 
> This is not reproducible with libkpathsea5 version 2009-09. All big 
> endian platforms seems affected, at least mips, powerpc, s390 and sparc.
> See for example the following build logs:
> 
> https://buildd.debian.org/status/package.php?p=yaws&suite=sid
> https://buildd.debian.org/status/package.php?p=freefem%2B%2B&suite=sid
> 

The problem is due to the following change:

| * comment the --disable-largefile switch in upstream build script
|   (partial_lfs_support.diff). This hopefully (Closes: #618033). dvips
|   still can't write files > 2GB (see #383781).

This patch does:

| diff -urN texlive-bin-2009.orig/Build texlive-bin-2009/Build
| --- texlive-bin-2009.orig/Build 2009-09-17 15:40:44.000000000 +0200
| +++ texlive-bin-2009/Build      2011-03-28 19:40:09.000000000 +0200
| @@ -66,7 +66,7 @@
| 
|  # longinteger and off_t declarations are still inconsistent, do not
|  # enable this unless you are testing.
| -: ${TL_CONF_LARGEFILE=--disable-largefile}
| +# : ${TL_CONF_LARGEFILE=--disable-largefile}
| 
|  # default to static linking.
|  : ${TL_CONF_SHARED=--disable-shared}

As the comments says long int and off_t are still used in the code,
which means on 32-bit architectures, setting off_t to 64-bit with
largefile support, the type doesn't match. On little endian machines,
only the high part is lost (which means the problem only appears with
files bigger than 2GB), on big endian machines the offset is completely
wrong.

Also given that libkpathsea exports the following function,

| xfseeko(FILE *, off_t, int, string filename)

enabling largefile support change off_t to 64 bits on 32-bit
Linux architecture and breaks the ABI.

I am therefore cloning this bug for this slightly different problem.

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net


Reply to: