Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 45320 - in tar-1.13.25-r3 error when compiling a lib/getdate.c generated from lib/getdate.y
Summary: in tar-1.13.25-r3 error when compiling a lib/getdate.c generated from lib/get...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High blocker (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-21 14:32 UTC by Shai Revzen
Modified: 2004-10-03 03:17 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 Shai Revzen 2004-03-21 14:32:17 UTC
When rebuilding tar it regenerates lib/getdate.c from lib/getdate.y 
The c-file is invalid, and produces a compiler error. 
NOTE: this problem may be masked if you (mistakenly) put the lib/getdate.c file in the tarball -- it is NOT a source file -- just an intermediate.


Reproducible: Always
Steps to Reproduce:
1. Untar the tarball in location of your choice
2. configure
3. rm lib/getdate.c
3. make

Actual Results:  
cd . && \
  bison -y  getdate.y && \
  mv -f y.tab.c getdate.c
source='getdate.c' object='getdate.o' libtool=no \
depfile='.deps/getdate.Po' tmpdepfile='.deps/getdate.TPo' \
depmode=gcc3 /bin/sh ../depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../intl    -g -O2 -c `test -f getdate.c || echo './'`getdate.c
getdate.y: In function `yyparse':
getdate.y:381: error: syntax error before '}' token
getdate.y:387: error: syntax error before '}' token
getdate.y:393: error: syntax error before '}' token
make[2]: *** [getdate.o] Error 1

and make stops

Expected Results:  
cd . && \
  bison -y  getdate.y && \
  mv -f y.tab.c getdate.c
source='getdate.c' object='getdate.o' libtool=no \
depfile='.deps/getdate.Po' tmpdepfile='.deps/getdate.TPo' \
depmode=gcc3 /bin/sh ../depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../intl    -g -O2 -c `test -f getdate.c || ec
ho './'`getdate.c

and make continues fine

Here's a patch to fix this; note the missing semicolons in the .y file:

*** tar-1.13.25/lib/getdate.y
--- tar-1.13.25/lib/getdate.y
***************
*** 378,396 ****
    | tSNUMBER tDAY_UNIT
        { PC.rel_day += $1.value * $2; }
    | tDAY_UNIT
!       { PC.rel_day += $1 }
    | tUNUMBER tHOUR_UNIT
        { PC.rel_hour += $1.value * $2; }
    | tSNUMBER tHOUR_UNIT
        { PC.rel_hour += $1.value * $2; }
    | tHOUR_UNIT
!       { PC.rel_hour += $1 }
    | tUNUMBER tMINUTE_UNIT
        { PC.rel_minutes += $1.value * $2; }
    | tSNUMBER tMINUTE_UNIT
        { PC.rel_minutes += $1.value * $2; }
    | tMINUTE_UNIT
!       { PC.rel_minutes += $1 }
    | tUNUMBER tSEC_UNIT
        { PC.rel_seconds += $1.value * $2; }
    | tSNUMBER tSEC_UNIT
--- 378,396 ----
    | tSNUMBER tDAY_UNIT
        { PC.rel_day += $1.value * $2; }
    | tDAY_UNIT
!       { PC.rel_day += $1; }
    | tUNUMBER tHOUR_UNIT
        { PC.rel_hour += $1.value * $2; }
    | tSNUMBER tHOUR_UNIT
        { PC.rel_hour += $1.value * $2; }
    | tHOUR_UNIT
!       { PC.rel_hour += $1; }
    | tUNUMBER tMINUTE_UNIT
        { PC.rel_minutes += $1.value * $2; }
    | tSNUMBER tMINUTE_UNIT
        { PC.rel_minutes += $1.value * $2; }
    | tMINUTE_UNIT
!       { PC.rel_minutes += $1; }
    | tUNUMBER tSEC_UNIT
        { PC.rel_seconds += $1.value * $2; }
    | tSNUMBER tSEC_UNIT
Comment 1 SpanKY gentoo-dev 2004-10-03 03:17:15 UTC
use tar-1.14 ... if it fails too, please re-open