Bug 134546 - app-text/a2ps-4.13c-r4 compile fails on systems with bad fnmatch (patch included)
Bug#: 134546 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: printing@gentoo.org Reported By: yvasilev@gentoo.org
Component: Printing
URL: 
Summary: app-text/a2ps-4.13c-r4 compile fails on systems with bad fnmatch (patch included)
Keywords:  
Status Whiteboard: 
Opened: 2006-05-27 10:09 0000
Description:   Opened: 2006-05-27 10:09 0000
On my uclibc based system the configure script detects that the fnmatch
function is broken but files to provide a working replacement. This actually
happens for all a2ps versions in portage.

The problem was that the replacement function included in the lib dir was never
used because of: first, a name mismatch; and second, because it wrongly
rechecked if it was a GNU system (uclibc defines __GNU_LIBRARY__). 

Yuri.

PS: for embedded@g.o, the test that fails is: (fnmatch ("d*/*1", "d/s/1",
FNM_PATHNAME) == FNM_NOMATCH).

bad emerge log:
i686-gentoo-linux-uclibc-gcc -march=pentium3 -msse2 -O3 -mfpmath=sse
-falign-functions=0 -falign-jumps=0 -falign-loops=0 -pipe -Wl,-O1 -o a2ps
main.o read.o sshread.o ssheet.o select.o generate.o delegate.o regex.o
buffer.o versions.o ffaces.o version-etc.o long-options.o parsessh.o lexssh.o
lexps.o sheets-map.o  ../lib/.libs/liba2ps.a -lm
select.o: In function `get_command':
select.c:(.text+0x4ff): undefined reference to `rpl_fnmatch'
select.c:(.text+0x553): undefined reference to `rpl_fnmatch'
../lib/.libs/liba2ps.a(pathwalk.o): In function `pw_filter_fnmatch':
pathwalk.c:(.text+0xb9a): undefined reference to `rpl_fnmatch'
collect2: ld returned 1 exit status
make[3]: *** [a2ps] Error 1
make[3]: Leaving directory
`/var/tmp/build/portage/a2ps-4.13c-r4/work/a2ps-4.13/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/var/tmp/build/portage/a2ps-4.13c-r4/work/a2ps-4.13/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/var/tmp/build/portage/a2ps-4.13c-r4/work/a2ps-4.13'
make: *** [all] Error 2

!!! ERROR: app-text/a2ps-4.13c-r4 failed.

# emerge --info
Portage 2.1_rc3 (uclibc/x86, gcc-3.4.6, uclibc-0.9.28-r0, 2.6.16-gentoo-r8
i686)
=================================================================
System uname: 2.6.16-gentoo-r8 i686 Transmeta Efficeon(tm) Processor TM8000
Gentoo Base System version 1.12.0
dev-lang/python:     2.3.4-r1, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-gentoo-linux-uclibc"
CFLAGS="-march=pentium3 -msse2 -O3 -mfpmath=sse -falign-functions=0
-falign-jumps=0 -falign-loops=0 -pipe"
CHOST="i686-gentoo-linux-uclibc"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -msse2 -O3 -mfpmath=sse -falign-functions=0
-falign-jumps=0 -falign-loops=0 -pipe"
DISTDIR="/mnt/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://mirrors.tds.net/gentoo http://gentoo.osuosl.org/"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/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'"
PORTAGE_TMPDIR="/var/tmp/build"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/yvasilev/portage/overlay.gpe"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X aac acpi alsa bitmap-fonts bzip2 cli crypt dmi dri dts dv dvd
dvdread encode exo gif gnutls gpm gtk imap ithreads jpeg live mad matroska mmx
mmxext mozsvg musepack ncurses nonfsv4 oss pam panel-plugin pcre png readline
reflection rtc session speex spell spl sse sse2 ssl startup-notification tga
theora thunar-vfs tiff truetype truetype-fonts type1-fonts uclibc unicode
vorbis win32codecs xorg xprint xscreensaver xv xvid zlib elibc_uclibc
input_devices_keyboard input_devices_mouse kernel_linux linguas_en userland_GNU
video_cards_ati video_cards_radeon"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL,
PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #1 From Yuri Vasilevski 2006-05-27 10:10:05 0000 -------
Created an attachment (id=87670) [details]
a2ps-4.13c-fnmatch-replacement.patch

------- Comment #2 From Yuri Vasilevski 2006-05-30 14:54:43 0000 -------
Committed to CVS.