NetBSD Problem Report #49400

From www@NetBSD.org  Mon Nov 17 14:51:01 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 72F40A6651
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 17 Nov 2014 14:51:01 +0000 (UTC)
Message-Id: <20141117145059.F1993A6699@mollari.NetBSD.org>
Date: Mon, 17 Nov 2014 14:50:59 +0000 (UTC)
From: bsiegert@NetBSD.org
Reply-To: bsiegert@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: tools/gcc fails to build on Linux
X-Send-Pr-Version: www-1.0

>Number:         49400
>Category:       toolchain
>Synopsis:       tools/gcc fails to build on Linux
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    toolchain-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 17 14:55:00 +0000 2014
>Closed-Date:    Tue Dec 25 13:45:33 +0000 2018
>Last-Modified:  Tue Dec 25 13:45:33 +0000 2018
>Originator:     Benny Siegert
>Release:        netbsd-6 branch as of 2014-11-17
>Organization:
The NetBSD Foundation
>Environment:
Linux [redacted] 3.13.0-39-generic #66-Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

>Description:
I am cross-compiling NetBSD 6 (amd64) on a GNU/Linux system (also amd64). The build of gcc 4.8, as part of the tools phase, fails with the following error:

c++ -c   -O -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I/usr/local/google/home/bsiegert/NetBSD/src/tools/gcc/../../external/gpl3/gcc/dist/gcc -I/usr/local/google/home/bsiegert/NetBSD/src/tools/gcc/../../external/gpl3/gcc/dist/gcc/build -I/usr/local/google/home/bsiegert/NetBSD/src/tools/gcc/../../external/gpl3/gcc/dist/gcc/../include -I/usr/local/google/home/bsiegert/NetBSD/src/tools/gcc/../../external/gpl3/gcc/dist/gcc/../libcpp/include -I/usr/local/google/home/bsiegert/NetBSD/src/tools/gcc/../../external/gpl3/gcc/dist/gcc/../libdecnumber -I/usr/local/google/home/bsiegert/NetBSD/src/tools/gcc/../../external/gpl3/gcc/dist/gcc/../libdecnumber/dpd -I../libdecnumber -I/usr/local/google/home/bsiegert/NetBSD/src/tools/gcc/../../external/gp
 l3/gcc/dist/gcc/../libbacktrace   -DNETBSD_TOOLS -DTARGET_SYSTEM_ROOT=0  -DTARGET_SYSTEM_ROOT_RELOCATABLE \
	-DBASEVER="\"4.8.4\"" -DDATESTAMP="\" 20141009\"" \
	-DREVISION="\"\"" \
	-DDEVPHASE="\" (prerelease)\"" -DPKGVERSION="\"(NetBSD nb1 20141012) \"" \
	-DBUGURL="\"<http://www.NetBSD.org/Misc/send-pr.html>\"" -o build/version.o /usr/local/google/home/bsiegert/NetBSD/src/tools/gcc/../../external/gpl3/gcc/dist/gcc/version.c
c++   -O -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -DGENERATOR_FILE -static-libstdc++ -static-libgcc  -o build/gengtype \
	    build/gengtype.o build/errors.o build/gengtype-lex.o build/gengtype-parse.o build/gengtype-state.o build/version.o ../build-x86_64-unknown-linux-gnu/libiberty/libiberty.a
build/gengtype.o: In function `adjust_field_type(type*, options*)':
gengtype.c:(.text+0x1b00): undefined reference to `lexer_line'
gengtype.c:(.text+0x1b37): undefined reference to `lexer_line'
gengtype.c:(.text+0x1c3a): undefined reference to `lexer_line'
gengtype.c:(.text+0x1cfe): undefined reference to `lexer_line'
gengtype.c:(.text+0x1d9a): undefined reference to `lexer_line'
build/gengtype.o:gengtype.c:(.text+0x1ddd): more undefined references to `lexer_line' follow
build/gengtype-parse.o: In function `require(int)':
gengtype-parse.c:(.text+0x1a3): undefined reference to `yylex(char const**)'
build/gengtype-parse.o: In function `require2(int, int)':
gengtype-parse.c:(.text+0x214): undefined reference to `yylex(char const**)'
build/gengtype-parse.o: In function `string_seq()':
gengtype-parse.c:(.text+0x30e): undefined reference to `yylex(char const**)'
build/gengtype-parse.o: In function `consume_balanced(int, int)':
gengtype-parse.c:(.text+0x360): undefined reference to `yylex(char const**)'
gengtype-parse.c:(.text+0x3fd): undefined reference to `yylex(char const**)'
build/gengtype-parse.o:gengtype-parse.c:(.text+0x425): more undefined references to `yylex(char const**)' follow
build/gengtype-parse.o: In function `type(options**, bool)':
gengtype-parse.c:(.text+0xca3): undefined reference to `lexer_line'
gengtype-parse.c:(.text+0xcc0): undefined reference to `yylex(char const**)'
gengtype-parse.c:(.text+0xcf2): undefined reference to `yylex(char const**)'
gengtype-parse.c:(.text+0xd26): undefined reference to `yylex(char const**)'
gengtype-parse.c:(.text+0xd68): undefined reference to `lexer_line'
gengtype-parse.c:(.text+0xd7e): undefined reference to `lexer_line'
gengtype-parse.c:(.text+0xda0): undefined reference to `yylex(char const**)'
gengtype-parse.c:(.text+0xdd9): undefined reference to `yylex(char const**)'
gengtype-parse.c:(.text+0xe0b): undefined reference to `yylex(char const**)'
gengtype-parse.c:(.text+0xe84): undefined reference to `yylex(char const**)'
gengtype-parse.c:(.text+0xef2): undefined reference to `yylex(char const**)'
build/gengtype-parse.o:gengtype-parse.c:(.text+0xf1f): more undefined references to `yylex(char const**)' follow
build/gengtype-parse.o: In function `type(options**, bool)':
gengtype-parse.c:(.text+0x108e): undefined reference to `lexer_line'
gengtype-parse.c:(.text+0x10c2): undefined reference to `yylex(char const**)'
gengtype-parse.c:(.text+0x10eb): undefined reference to `yylex(char const**)'
gengtype-parse.c:(.text+0x1125): undefined reference to `lexer_line'
gengtype-parse.c:(.text+0x114b): undefined reference to `lexer_line'
gengtype-parse.c:(.text+0x116d): undefined reference to `yylex(char const**)'
gengtype-parse.c:(.text+0x11f6): undefined reference to `yylex(char const**)'
gengtype-parse.c:(.text+0x1221): undefined reference to `lexer_line'
gengtype-parse.c:(.text+0x1237): undefined reference to `lexer_line'
gengtype-parse.c:(.text+0x1257): undefined reference to `yylex(char const**)'
gengtype-parse.c:(.text+0x1294): undefined reference to `yylex(char const**)'
build/gengtype-parse.o: In function `absdecl()':
gengtype-parse.c:(.text+0x1354): undefined reference to `yylex(char const**)'
build/gengtype-parse.o: In function `inner_declarator(type*, char const**, options**, bool)':
gengtype-parse.c:(.text+0x13bd): undefined reference to `yylex(char const**)'
build/gengtype-parse.o: In function `parse_file(char const*)':
gengtype-parse.c:(.text+0x142c): undefined reference to `yybegin(char const*)'
gengtype-parse.c:(.text+0x143f): undefined reference to `yylex(char const**)'
gengtype-parse.c:(.text+0x14b3): undefined reference to `yylex(char const**)'
gengtype-parse.c:(.text+0x1572): undefined reference to `lexer_line'
gengtype-parse.c:(.text+0x15c4): undefined reference to `yylex(char const**)'
gengtype-parse.c:(.text+0x1667): undefined reference to `lexer_line'
gengtype-parse.c:(.text+0x16a1): undefined reference to `lexer_toplevel_done'
gengtype-parse.c:(.text+0x16b6): undefined reference to `yyend()'
collect2: error: ld returned 1 exit status
nbgmake[1]: *** [build/gengtype] Error 1
nbgmake[1]: Leaving directory `/usr/local/google/home/bsiegert/NetBSD/src/tools/gcc/obj/build/gcc'
nbgmake: *** [all-gcc] Error 2

>How-To-Repeat:
./build.sh -N 1 -m amd64 -U tools

as an unprivileged user
>Fix:

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Tue, 25 Dec 2018 13:45:33 +0000
State-Changed-Why:
Closing as extremely likely fixed: I've done many builds on linux and this bug was reported in 2014, so submitter likely doesn't have the same setup. Feel free to report another bug if you are having problems still.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.