Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 8934 - sys-apps/diffutils-2.8.4 fails with `LOCALEDIR' undeclared
Summary: sys-apps/diffutils-2.8.4 fails with `LOCALEDIR' undeclared
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-09 10:29 UTC by Chris Bainbridge (RETIRED)
Modified: 2002-11-16 12:41 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Bainbridge (RETIRED) gentoo-dev 2002-10-09 10:29:20 UTC
on a recent emerge -u world: 
 
[stuff cut, config etc.] 
 
Making all in src 
make[2]: Entering directory 
`/var/tmp/portage/diffutils-2.8.4/work/diffutils-2.8.4/src' 
(echo '#define DEFAULT_DIFF_PROGRAM "/usr/bin/'`echo diff|sed 's,x,x,'`'"' && 
\ 
 echo '#define LOCALEDIR "/usr/share/locale"') >paths.h 
 
[stuff cut, gcc compiles files ok, then] 
 
source='ifdef.c' object='ifdef.o' libtool=no \ 
depfile='.deps/ifdef.Po' tmpdepfile='.deps/ifdef.TPo' \ 
depmode=gcc3 /bin/sh ../config/depcomp \ 
gcc -DHAVE_CONFIG_H -I. -I. -I..  -I../lib -I../lib   -march=pentium4 -mmmx 
-msse2 -mfpmath=sse -O3 -pipe -c `test -f 'ifdef.c' || echo './'`ifdef.c 
diff.c: In function `main': 
diff.c:270: `LOCALEDIR' undeclared (first use in this function) 
diff.c:270: (Each undeclared identifier is reported only once 
diff.c:270: for each function it appears in.)
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2002-10-12 19:30:26 UTC
Change CFLAGS to something more sensible (like -march=pentium3 -O2 -pipe)
and please try again.  -march=pentium4, -msse2 among things is known to
break gcc-3.2.
Comment 2 Chris Bainbridge (RETIRED) gentoo-dev 2002-10-13 10:34:54 UTC
This has nothing to do with compiler cpu optimizations since it breaks in the   
parser. After a bit of investigation work I've found the problem,   
src/Makefile.in does:   
   
paths.h:   
        (echo '#define DEFAULT_DIFF_PROGRAM "$(bindir)/'`echo diff|sed   
'$(transform)'`'"' && \   
         echo '#define LOCALEDIR "$(localedir)"') >$@   
   
When make -j is used this gets run in a subshell and theres a race condition   
between  paths.h being created and used. The solution is to add to the 
unpack() in the ebuild file:   
   
        cd src   
        cp Makefile.in Makefile.in.orig   
        sed -e 's:(echo:{ echo:g' Makefile.in.orig | sed -e "s:'):'; }:g"   
>Makefile.in   
   
This should be reported as a bug in diffutils upstream as well.   
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2002-10-13 12:42:20 UTC
Yeah, well, it is usually a good place to start :P

Anyhow, this means that changing 'emake' to 'make' fixes this problem
for you ?
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2002-10-13 12:43:06 UTC
BTW: what is your MAKEOPTS set to?  I also have a pentium4, and do not experience
this problem ....
Comment 5 Chris Bainbridge (RETIRED) gentoo-dev 2002-10-13 13:10:37 UTC
Yup, just doing 'make' works, though its not an ideal solution. My MAKEOPTS is    
set to "-j6". I've just sent a bug report to gnu utils bug 
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2002-10-13 14:21:14 UTC
Ok.  We can do this two ways.  -j2 seems to work, so either make it -j2
for now, or else use 'make' for the moment.  CHeck if -j2 works for you,
then we can use that as default for the time being.
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2002-10-14 13:13:33 UTC
Ok, latest version or -r1 do fix this, but I see the GNU guys did see
the fix.  Damn me, but I added my one liner above it, but did not see
the problem.


---
Never mind all that debugging.  Make is behaving perfectly.  It's a bug
in Makefile.am.



			plain text document attachment (diff.out), "Makefile.am diff"

--- Makefile.am-dist    2002-10-14 11:29:10.000000000 -0400
+++ Makefile.am 2002-10-14 11:29:25.000000000 -0400
@@ -37,7 +37,7 @@
 
 MOSTLYCLEANFILES = paths.h
 
-cmp.$(OBJEXT) diff3.$(OBJECT) diff.$(OBJECT) sdiff.$(OBJECT): paths.h
+cmp.$(OBJEXT) diff3.$(OBJEXT) diff.$(OBJEXT) sdiff.$(OBJEXT): paths.h
 paths.h:
        (echo '#define DEFAULT_DIFF_PROGRAM "$(bindir)/'`echo diff|sed
'$(transform)'`'"' && \
         echo '#define LOCALEDIR "$(localedir)"') >$@



-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@gnu.org>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
Comment 8 Chris Bainbridge (RETIRED) gentoo-dev 2002-10-16 11:36:02 UTC
doh, we all missed it... does this mean we can close the bug now? 
Comment 9 Martin Schlemmer (RETIRED) gentoo-dev 2002-10-16 23:33:16 UTC
Nope .. my patch works, but is not the corret one .. I still need to update it.