First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 8934
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Martin Schlemmer (RETIRED) <azarah@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Chris Bainbridge (RETIRED) <chrb@gentoo.org>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 8934 depends on: Show dependency tree
Bug 8934 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2002-10-09 10:29 0000
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 From Martin Schlemmer (RETIRED) 2002-10-12 19:30:26 0000 -------
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 From Chris Bainbridge (RETIRED) 2002-10-13 10:34:54 0000 -------
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 From Martin Schlemmer (RETIRED) 2002-10-13 12:42:20 0000 -------
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 From Martin Schlemmer (RETIRED) 2002-10-13 12:43:06 0000 -------
BTW: what is your MAKEOPTS set to?  I also have a pentium4, and do not
experience
this problem ....

------- Comment #5 From Chris Bainbridge (RETIRED) 2002-10-13 13:10:37 0000 -------
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 From Martin Schlemmer (RETIRED) 2002-10-13 14:21:14 0000 -------
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 From Martin Schlemmer (RETIRED) 2002-10-14 13:13:33 0000 -------
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 From Chris Bainbridge (RETIRED) 2002-10-16 11:36:02 0000 -------
doh, we all missed it... does this mean we can close the bug now? 

------- Comment #9 From Martin Schlemmer (RETIRED) 2002-10-16 23:33:16 0000 -------
Nope .. my patch works, but is not the corret one .. I still need to update it.

First Last Prev Next    No search results available      Search page      Enter new bug