Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 19039 - sys-apps/man-1.5l-r2 fails to build with man.c:1107: `q' undeclared (first use in this function)
Summary: sys-apps/man-1.5l-r2 fails to build with man.c:1107: `q' undeclared (first us...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-09 11:09 UTC by giggles1
Modified: 2003-04-28 05:26 UTC (History)
1 user (show)

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


Attachments
output from emerge (out.txt,4.11 KB, text/plain)
2003-04-09 11:11 UTC, giggles1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description giggles1 2003-04-09 11:09:11 UTC
Emerge man-1.5l-r2 appears to apply patches and configure normally, but
compilation fails on man.c:

colorgcc -c -Wall -Wstrict-prototypes -Wmissing-prototypes -march=athlon-mp -O3
-pipe -fforce-addr -fomit-frame-pointer -funroll-loops -falign-functions=4 -I.
-DSTDC_HEADERS -DPOSIX -DDO_COMPRESS -DGREPSILENT="'q'" man.c
man.c: In function `do_global_apropos':
man.c:1107: `q' undeclared (first use in this function)


Reproducible: Always
Steps to Reproduce:
No out of the ordinary setup to my knowledge.




full output from emerge in attachment
Comment 1 giggles1 2003-04-09 11:11:58 UTC
Created attachment 10437 [details]
output from emerge
Comment 2 Seemant Kulleen (RETIRED) gentoo-dev 2003-04-10 04:05:17 UTC
does this happen without colorgcc as well?
Comment 3 giggles1 2003-04-10 10:03:37 UTC
Yes it happens even if colorgcc is unmerged.
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2003-04-10 15:27:12 UTC
I dont know what to do about that 'q' thing anymore.  I have tried to fix it
a dozen ways, and each fails somewhere else.

What version of sed installed (emerge epm; epm -q sed), and attach output of
'emerge info'.
Comment 5 giggles1 2003-04-11 10:23:47 UTC
please:/tmp# epm -q sed
sed-4.0.6
please:/tmp# emerge info
Portage 2.0.47-r10 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r4)
=================================================================
System uname: 2.4.20 i686 AMD Athlon(tm) MP 2000+
GENTOO_MIRRORS="http://gentoo.oregonstate.edu/ http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/home/portage"
PORTDIR_OVERLAY="/usr/local/portage"
USE="x86 oss apm cups mikmod nls xml2 gdbm slang ruby libwww motif X 3dnow mmx directfb sse dga opengl xv fbcon kde qt qtmt arts tcltk aalib imlib ncurses readline sdl svga lcms gif jpeg png tiff gd avi mpeg quicktime esd gtk -gnome alsa ggi dvd xmms oggvorbis encode pam ssl crypt tcpd mozilla spell truetype xml pdflib plotutils tetex guile perl python libg++ atlas pic berkdb mysql postgres odbc samba gpm zlib java"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon-mp -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -falign-functions=4"
CXXFLAGS="-march=athlon-mp -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -falign-functions=4"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j4"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"
Comment 6 giggles1 2003-04-11 10:38:30 UTC
Juts FYI, I tried with a pared down CFLAGS and USE commented out completely, and it still fails in the same way.  

Also, If I replace GREPSILENT in man.c with the char constant 'q' by hand and it compiles fine.   
Comment 7 giggles1 2003-04-14 14:11:01 UTC
OK, so I don't know why the substitution is not working, but I gave up trying to be subtle.  I change the patch: 

/usr/portage/sys-apps/man/files/man-1.5l-wrong-quotes.patch

which has the offending assignment to just use the hard coded hex ascii vallue for 'q'


--- man-1.5k/src/Makefile.in.orig       2002-12-26 06:43:39.000000000 +0200
+++ man-1.5k/src/Makefile.in    2002-12-26 06:48:18.000000000 +0200
@@ -16,7 +16,7 @@

 pager = @pager@

-GS = -DGREPSILENT=\'@grepsilent@\'
+GS = -DGREPSILENT=0x71
 DEFS = @DEFS@ $(GS)
 CWARN = -Wall -Wstrict-prototypes -Wmissing-prototypes
 CWARNNP = -Wall


and it builds fine now. I don't know what a better solution is.
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2003-04-14 15:04:10 UTC
Can you merge supersed, and then cp /bin/sed to /bin/sed.old for example,
and then link ssed to sed, and see if it works unpatched then ?
Comment 9 giggles1 2003-04-14 15:20:41 UTC
Well, man has always had the "wrong quotes" patch, so I am going to assume you mean the *original* patch, before I modified it, i.e. the one with 

+GS = -DGREPSILENT="'@grepsilent@'"

Anyhow, I tried what you suggested and it still fails, with the same error.  The actual gcc command issued looks fine, so I think maybe the problem is after automake/sed do their business.
Comment 10 Martin Schlemmer (RETIRED) gentoo-dev 2003-04-27 19:19:58 UTC
Right.  I do not want to hardcode 'q', and thus is why I have not simply changed
it in the past.  I went with your hexdecimal idea, and changed the patch
to:

-----------------------------------------------------------------
--- man-1.5k/src/Makefile.in.orig   2002-12-26 06:43:39.000000000 +0200
+++ man-1.5k/src/Makefile.in    2002-12-26 06:48:18.000000000 +0200
@@ -16,7 +16,7 @@

 pager = @pager@

-GS = -DGREPSILENT=\'@grepsilent@\'
+GS = -DGREPSILENT=$(shell echo "@grepsilent@" | hexdump -d -n 1 | gawk '{ printf("0x%x", $$2); exit 0 }')
 DEFS = @DEFS@ $(GS)
 CWARN = -Wall -Wstrict-prototypes -Wmissing-prototypes
 CWARNNP = -Wall
----------------------------------------------------------------

Which fixes it, and still will handle 'grepsilent' changing.
Comment 11 Jyrki Muukkonen 2003-04-28 05:26:58 UTC
breaks building stage2, see bug #20095