Project

General

Profile

Actions

Bug #2492

closed

make buildworld M4_YY_OUTFILE_NAME:259: error: before 'M4_YY_LEX_DECLARATION'

Added by davshao about 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
01/18/2013
Due date:
% Done:

0%

Estimated time:

Description

Using master through

commit 6964a669f396a0e6d3b96a8f232cbc932d0d5b00

Date: Thu Jan 17 19:01:19 2013 +0100

Revert "gcc4x: Update README to remove format.c from patched list"

and with /etc/make.conf:

CFLAGS+=-g
STRIP=

Clearing /usr/obj

  1. make buildworld

fails on x86_64 and i386. From x86_64 the errors are:

===> usr.bin/mklocale (bootstrap-tools)
/usr/obj/usr/src/btools_x86_64/usr/src/usr.bin/mklocale created for /usr/src/usr.bin/mklocale
yacc -d -o yacc.c /usr/src/usr.bin/mklocale/yacc.y
lex -t /usr/src/usr.bin/mklocale/lex.l > lex.c
rm -f .depend

.depend

mkdep -f .depend -a -I. -I/usr/src/usr.bin/mklocale -I/usr/src/usr.bin/mklocale/../../lib/libc -std=gnu99 yacc.c lex.c
echo mklocale: /usr/obj/usr/src/btools_x86_64/usr/lib/libc.a >> .depend
cc -O -pipe -g -I. -I/usr/src/usr.bin/mklocale -I/usr/src/usr.bin/mklocale/../../lib/libc -std=gnu99 -Wsystem-headers -Wall -Wno-pointer-sign -Wextra -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wold-style-definition -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -c yacc.c
cc -O -pipe -g -I. -I/usr/src/usr.bin/mklocale -I/usr/src/usr.bin/mklocale/../../lib/libc -std=gnu99 -Wsystem-headers -Wall -Wno-pointer-sign -Wextra -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wold-style-definition -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -c lex.c
M4_YY_OUTFILE_NAME:259: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'M4_YY_LEX_DECLARATION'
M4_YY_OUTFILE_NAME: In function 'yy_get_next_buffer':
M4_YY_OUTFILE_NAME:146: warning: implicit declaration of function 'YY_G'
M4_YY_OUTFILE_NAME:146: warning: nested extern declaration of 'YY_G'
M4_YY_OUTFILE_NAME:146: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:151: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:152: error: expected ')' before 'M4_YY_CALL_LAST_ARG'
M4_YY_OUTFILE_NAME:155: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:182: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:186: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:191: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:197: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:220: error: expected ')' before 'M4_YY_CALL_LAST_ARG'
M4_YY_OUTFILE_NAME:225: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:234: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:234: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:234: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:234: error: expected ')' before 'M4_YY_CALL_LAST_ARG'
M4_YY_OUTFILE_NAME:234: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:234: error: expected ')' before 'M4_YY_CALL_LAST_ARG'
M4_YY_OUTFILE_NAME:237: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:251: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:259: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:262: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:262: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:263: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:264: error: expected ')' before 'M4_YY_CALL_LAST_ARG'
M4_YY_OUTFILE_NAME:268: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:269: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:271: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME: In function 'yy_get_previous_state':
M4_YY_OUTFILE_NAME:286: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME: In function 'yyunput':
M4_YY_OUTFILE_NAME:348: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:352: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:353: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:355: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:357: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:362: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:363: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:365: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:366: error: expected ')' before 'M4_YY_CALL_LAST_ARG'
M4_YY_OUTFILE_NAME: In function 'input':
M4_YY_OUTFILE_NAME:397: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:430: error: expected ')' before 'M4_YY_CALL_LAST_ARG'
M4_YY_OUTFILE_NAME:449: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME: In function 'yyrestart':
M4_YY_OUTFILE_NAME:465: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME: In function 'yy_switch_to_buffer':
M4_YY_OUTFILE_NAME:493: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:494: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:497: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME: In function 'yy_load_buffer_state':
M4_YY_OUTFILE_NAME:511: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:512: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:513: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME: In function 'yy_create_buffer':
M4_YY_OUTFILE_NAME:529: error: expected ')' before 'M4_YY_CALL_LAST_ARG'
M4_YY_OUTFILE_NAME:538: error: expected ')' before 'M4_YY_CALL_LAST_ARG'
M4_YY_OUTFILE_NAME: In function 'yy_delete_buffer':
M4_YY_OUTFILE_NAME:558: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME: In function 'yypush_buffer_state':
M4_YY_OUTFILE_NAME:643: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:644: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:650: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME: In function 'yypop_buffer_state':
M4_YY_OUTFILE_NAME:668: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME: In function 'yyensure_buffer_stack':
M4_YY_OUTFILE_NAME:697: error: expected ')' before 'M4_YY_CALL_LAST_ARG'
M4_YY_OUTFILE_NAME:718: error: expected ')' before 'M4_YY_CALL_LAST_ARG'
M4_YY_OUTFILE_NAME: In function 'yy_scan_buffer':
M4_YY_OUTFILE_NAME:748: error: expected ')' before 'M4_YY_CALL_LAST_ARG'
M4_YY_OUTFILE_NAME: In function 'yy_scan_bytes':
M4_YY_OUTFILE_NAME:803: error: expected ')' before 'M4_YY_CALL_LAST_ARG'
M4_YY_OUTFILE_NAME:812: error: expected ')' before 'M4_YY_CALL_LAST_ARG'
M4_YY_OUTFILE_NAME: In function 'yylex_destroy':
M4_YY_OUTFILE_NAME:1015: error: subscripted value is neither array nor pointer
  • Error code 1
Stop.
make: stopped in /usr/src/usr.bin/mklocale
sh /usr/src/tools/install.sh -o root -g wheel -m 555 mklocale /usr/obj/usr/src/btools_x86_64/usr/bin
install: mklocale: No such file or directory
  • Error code 71
Stop.
make: stopped in /usr/src/usr.bin/mklocale
  • Error code 1
Stop.
make: stopped in /usr/src
.CURDIR='/usr/src'
.OBJDIR='/usr/src'
.MAKE='make'
MAKE_VERSION='20121010'
LD_LIBRARY_PATH=''
MACHINE_ARCH='x86_64'
MACHINE='x86_64'
MAKEFILE='Makefile.inc1'
.TARGETS='bootstrap-tools'
.ERROR_TARGET='bstrap-usr.bin/mklocale'
.ERROR_META_FILE=''
.MAKE.LEVEL='2'
.MAKE.MODE=''
  • Error code 1
Stop.
make: stopped in /usr/src
.CURDIR='/usr/src'
.OBJDIR='/usr/src'
.MAKE='make'
MAKE_VERSION='20121010'
LD_LIBRARY_PATH=''
MACHINE_ARCH='x86_64'
MACHINE='x86_64'
MAKEFILE='Makefile.inc1'
.TARGETS='buildworld'
.ERROR_TARGET='_bootstrap-tools'
.ERROR_META_FILE=''
.MAKE.LEVEL='1'
.MAKE.MODE=''
  • Error code 1
Actions #1

Updated by marino about 11 years ago

Did you follow the suggestion of http://leaf.dragonflybsd.org/mailarchive/users/2013-01/msg00028.html ?

specifically:
"However, if buildworld fails for you in the bootstrap stages (stage 1 or
maybe stage 2c) with M4 errors then this should fix the problem:

(assuming /usr/src is the latest)
> cd /usr/src/usr.bin/m4
> make
> make install clean"

Actions #2

Updated by ftigeot about 11 years ago

Issue confirmed on a DragonFly 3.2 system.

A buildworld of the current -master branch from 3.2 fails with the same error:

--- lex.o ---
cc -O -pipe -I. -I/usr/src/usr.bin/compile_et/../../contrib/com_err -std=gnu89 -c lex.c
M4_YY_OUTFILE_NAME:256: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'M4_YY_LEX_DECLARATION'
M4_YY_OUTFILE_NAME: In function 'yy_get_next_buffer':
M4_YY_OUTFILE_NAME:146: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:151: error: subscripted value is neither array nor pointer
M4_YY_OUTFILE_NAME:152: error: expected ')' before 'M4_YY_CALL_LAST_ARG'
[...]

Actions #3

Updated by marino about 11 years ago

standby, will need to tweak a recent commit to make the m4 trick work again.

Actions #4

Updated by marino about 11 years ago

Okay, this technique should work for those upgrading from 3.2 branch or pre-m4 import on 3.3 branch:

1. Update /usr/src to HEAD (or at least to 51dc126e91494039d4b328bfc3528ba18a49c317)

2.

cd /usr/src/usr.bin/m4
make
make install
make clean cleandepend

3. Then do a full buildworld

Actions #5

Updated by davshao about 11 years ago

I am trying to update from essentially master through:

commit 5ef3096fc9d29b31912566a3fb43e27392ea7943
Date: Mon Jan 14 01:25:46 2013 +0100

tws(4): Add MSI support.

to master through:

commit c31d710ca93dc20f645dd32fa13f70d23c65f87b
Date: Sat Jan 19 22:21:12 2013 +0100

Unfortunately using on x86_64
  1. make buildworld
    I still get

===> usr.bin/mklocale (bootstrap-tools)
/usr/obj/usr/src/btools_x86_64/usr/src/usr.bin/mklocale created for /usr/src/usr.bin/mklocale
yacc -d -o yacc.c /usr/src/usr.bin/mklocale/yacc.y
lex -t /usr/src/usr.bin/mklocale/lex.l > lex.c
rm -f .depend

.depend

mkdep -f .depend -a -I. -I/usr/src/usr.bin/mklocale -I/usr/src/usr.bin/mklocale/../../lib/libc -std=gnu99 yacc.c lex.c
echo mklocale: /usr/obj/usr/src/btools_x86_64/usr/lib/libc.a >> .depend
cc -O -pipe -g -I. -I/usr/src/usr.bin/mklocale -I/usr/src/usr.bin/mklocale/../../lib/libc -std=gnu99 -Wsystem-headers -Wall -Wno-pointer-sign -Wextra -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wold-style-definition -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -c yacc.c
cc -O -pipe -g -I. -I/usr/src/usr.bin/mklocale -I/usr/src/usr.bin/mklocale/../../lib/libc -std=gnu99 -Wsystem-headers -Wall -Wno-pointer-sign -Wextra -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wold-style-definition -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -c lex.c
M4_YY_OUTFILE_NAME:259: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'M4_YY_LEX_DECLARATION'
M4_YY_OUTFILE_NAME: In function 'yy_get_next_buffer':
M4_YY_OUTFILE_NAME:146: warning: implicit declaration of function 'YY_G'
M4_YY_OUTFILE_NAME:146: warning: nested extern declaration of 'YY_G'
...

Actions #6

Updated by marino about 11 years ago

that error is indicating the old M4 is still being used.
If you have the latest M4, you shouldn't see that error in the bootstrap stage.
Are you sure you did step 2 correctly?

Actions #7

Updated by davshao about 11 years ago

With the patches today I believe this bug report can be closed. Thanks!

With the manual step beforehand of

  1. cd /usr/src/usr.bin/m4
  2. make
  3. make install clean

on both x86_64 and i386, starting from master through

commit 5ef3096fc9d29b31912566a3fb43e27392ea7943
Date: Mon Jan 14 01:25:46 2013 +0100

tws(4): Add MSI support.

I was able to successfully using even a parallel buildworld through master

commit 579191cb924fc646f2dc7339ef03e5a22355f227
Date: Sun Jan 20 00:02:26 2013 +0100

libdmsg: Mark some return values unused.

Perhaps a note should be added to /usr/src/UPDATING?

Actions #8

Updated by marino about 11 years ago

  • Status changed from New to Closed

This shouldn't be an issue at all anymore with dillon's bootstrap work.
closing report.

Actions

Also available in: Atom PDF