Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 199590 - dev-tex/feynmf-1.08-r2 fails to compile in prefix
Summary: dev-tex/feynmf-1.08-r2 fails to compile in prefix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: x86 OS X
: High normal
Assignee: osx porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-18 21:14 UTC by Peter Ansell
Modified: 2007-11-19 20:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge log (build.log,44.18 KB, text/plain)
2007-11-18 21:16 UTC, Peter Ansell
Details
mkind.c patch to make the style file name length the same as the others (texlive-core-2007-mkind_stylefilenamelength.patch,290 bytes, patch)
2007-11-18 23:08 UTC, Peter Ansell
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Ansell 2007-11-18 21:14:52 UTC
Attempting to compile feynmf as a dependency of texlive fails in my OS X 1.5 prefixed Gentoo installation due to failing a condition possibly based on the length of the style file name.

The following URL points to the offending line in makeindex source code, although my message comes from a version prior to this change, as it does not include "name". 

http://www.tug.org/svn/texlive/trunk/Build/source/texk/makeindexk/mkind.c?r1=5165&r2=5164&pathrev=5165

This may be a problem with the use of a prefix, but as it is the only component that fails to compile for texlive in my prefix it seems important still.

Reproducible: Always

Steps to Reproduce:
1. Attempt to compile feynmf inside a prefixed Gentoo installation
2.
3.

Actual Results:  
Compile fails due to makeindex falling over

Expected Results:  
Makeindex should process the filename correctly and complete the compile.

$ emerge --info
Portage 2.2.00.8515-prefix (default-prefix/darwin/macos/10.5/x86, gcc-4.2.2, unavailable, 9.0.0 i386)
=================================================================
System uname: 9.0.0 i386 i386
Timestamp of tree: Sun, 18 Nov 2007 20:53:51 +0000
distcc 2.18.3 i686-apple-darwin9 (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.5.1-r3
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
ACCEPT_KEYWORDS="x86-macos ~x86-macos"
CBUILD="i686-apple-darwin9"
CFLAGS="-O2 -pipe -march=prescott"
CHOST="i686-apple-darwin9"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=prescott"
DISTDIR="/Users/peter/Library/Gentoo/usr/portage/distfiles"
EPREFIX="/Users/peter/Library/Gentoo"
FEATURES="collision-protect distlocks metadata-transfer nostrip parallel-fetch sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS=" ftp://mirror.internode.on.net/pub/gentoo ftp://ftp.swin.edu.au/gentoo"
LANG="en_AU.UTF-8"
PKGDIR="/Users/peter/Library/Gentoo/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/Users/peter/Library/Gentoo/var/tmp"
PORTDIR="/Users/peter/Library/Gentoo/usr/portage"
PORTDIR_OVERLAY="/Users/peter/Library/Gentoo/usr/local/portage"
SYNC="svn+http://overlays.gentoo.org/svn/proj/alt/trunk/prefix-overlay"
USE="aqua coreaudio cracklib midi mmx mmxext ncurses nls objc objc++ prefix readline sse sse2 ssl unicode x86-macos zlib" ELIBC="Darwin" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Peter Ansell 2007-11-18 21:16:17 UTC
Created attachment 136324 [details]
emerge log
Comment 2 Peter Ansell 2007-11-18 21:20:25 UTC
I compiled it again using the following command, but the resulting log file was too big to attach here.

$ KPATHSEA_DEBUG=-1 emerge -1 feynmf

I can to provide it by email to anyone who needs it.

Comment 3 Peter Ansell 2007-11-18 21:34:42 UTC
The following line in texlive's mkind.c file should possibly be changed:

char    sty_fn[LINE_MAX];

As LINE_MAX is basically a console/output width measurement, the host filename length is really STRING_MAX according to mkind.h

char    sty_fn[STRING_MAX];

In the STRING_MAX case, the filename that was given to it would not fail the following condition where found is a string pointer to the name of the style file.

    if (strlen(found) >= sizeof(sty_fn)) {
Comment 4 Fabian Groffen gentoo-dev 2007-11-18 22:08:31 UTC
Feels more like one should use PATH_MAX, though that may be too small as well, as POSIX defines 256 chars for it.
Comment 5 Peter Ansell 2007-11-18 22:23:17 UTC
Sorry, I just suggested STRING_MAX because of the following line in mkind.h

#define STRING_MAX    512	/* maximum length of host filename */

I think this is a texlive bug, although it may not ever appear with the standard length of paths in the standard Gentoo layout.
Comment 6 Peter Ansell 2007-11-18 23:08:06 UTC
Created attachment 136331 [details, diff]
mkind.c patch to make the style file name length the same as the others

This is a patch against texlive-core-2007-r8 which makes "STRING_MAX" the length of the style file pointer, inline with the other similar pointers in the same file.

Recompiling texlive-core using this patch fixes the issue with compiling feynmf inside my prefix.
Comment 7 Fabian Groffen gentoo-dev 2007-11-19 20:02:25 UTC
I added your patch to the tree.  Thanks!