NetBSD Problem Report #44182

From www@NetBSD.org  Wed Dec  1 18:26:55 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 1DA0163BAE5
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  1 Dec 2010 18:26:55 +0000 (UTC)
Message-Id: <20101201182654.EE80F63B95F@www.NetBSD.org>
Date: Wed,  1 Dec 2010 18:26:54 +0000 (UTC)
From: tez@netbsd.org
Reply-To: tez@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: pdftex fails due to largefile/endian issues on big endian machines (patch included)
X-Send-Pr-Version: www-1.0

>Number:         44182
>Category:       pkg
>Synopsis:       pdftex fails due to largefile/endian issues on big endian machines (patch included)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    minskim
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 01 18:30:00 +0000 2010
>Last-Modified:  Thu Dec 02 08:50:22 +0000 2010
>Originator:     Tim
>Release:        pkgsrc HEAD
>Organization:
>Environment:
SunOS nodename 5.10 Generic_144488-02 sun4u sparc SUNW,Sun-Fire-V440 Solaris
>Description:
NOT a solaris specific issue... rather a big endian w/LFS issue.

It appears that pdftex and friends are not bigendian safe when
compiled without --disable-largefile
(reference: http://www.tug.org/pipermail/tex-live/2008-September/017761.html )

In particular trying to do the 'make install' phase of
pkgsrc/devel/doxygen dies with an error building the
doxygen_manual.pdf... and in general it seems that trying to include a
pdf image into a document shows the problem.
(reference: http://www.ntg.nl/pipermail/ntg-pdftex/2008-February/003472.html )

In my tree I added to each of:
 pkgsrc/print/web2c/Makefile
 pkgsrc/fonts/gsftopkk/Makefile
 pkgsrc/fonts/ps2pkm/Makefile
 pkgsrc/fonts/ttf2pk/Makefile
 pkgsrc/print/dviljk/Makefile
 pkgsrc/print/dvipdfmx/Makefile
 pkgsrc/print/dvipsk/Makefile
 pkgsrc/print/kpathsea/Makefile
 pkgsrc/print/ptexenc/Makefile
 pkgsrc/print/texlive-pdftools/Makefile
 pkgsrc/print/texlive-tetex/Makefile
 pkgsrc/print/xdvik/Makefile
 pkgsrc/print/xetex/Makefile
 pkgsrc/textproc/makeindexk/Makefile
 pkgsrc/textproc/mendexk/Makefile
(selected based on use of the texlive source distfile)
these lines to discover big endian machines and to add the CONFIGURE_ARGS:

 .include "../../mk/endian.mk"

 .if ${MACHINE_ENDIAN} == "big"
 # largefile support is broken in pdftex on big endian machines
 CONFIGURE_ARGS+=        --disable-largefile
 .endif

After rebuilding everything, I was able to do the make install in
pkgsrc/devel/doxygen without failure.  It may be that this patch is not needed for ALL these packages, but the tex maintainer is better to determine this... changing and rebuilding only print/web2c did not seem to solve it for me.
>How-To-Repeat:
Attempt to 'make install' doxygen while on a big endian machine with largefile support (such as Solaris SPARC), which demonstrates the failure while building the doxygen_manual.pdf.

>Fix:
Add to Makefile of every package with DISTNAME matching texlive-*-source

 .include "../../mk/endian.mk"
 .if ${MACHINE_ENDIAN} == "big"
 # largefile support is broken in pdftex on big endian machines
 CONFIGURE_ARGS+=        --disable-largefile
 .endif

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->minskim
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Thu, 02 Dec 2010 08:50:22 +0000
Responsible-Changed-Why:
Over to tex maintainer.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.