From owner-freebsd-current@freebsd.org Mon Jun 29 05:33:17 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02A8198DB10; Mon, 29 Jun 2015 05:33:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79B97166C; Mon, 29 Jun 2015 05:33:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t5T5Wn65047358 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 29 Jun 2015 08:32:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t5T5Wn65047358 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t5T5Wn9C047357; Mon, 29 Jun 2015 08:32:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 29 Jun 2015 08:32:48 +0300 From: Konstantin Belousov To: Andreas Tobler Cc: Justin Hibbits , Garrett Cooper , FreeBSD Current , FreeBSD PowerPC ML Subject: Re: powerpc and powerpc64 builds broken Message-ID: <20150629053248.GQ2080@kib.kiev.ua> References: <8C09575A-B885-4F41-BFF8-46FEC028E755@gmail.com> <20150628193222.GP2080@kib.kiev.ua> <559059ED.80104@fgznet.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <559059ED.80104@fgznet.ch> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2015 05:33:17 -0000 On Sun, Jun 28, 2015 at 10:32:45PM +0200, Andreas Tobler wrote: > On 28.06.15 21:32, Konstantin Belousov wrote: > > On Sun, Jun 28, 2015 at 12:09:25PM -0700, Justin Hibbits wrote: > >> On Sun, Jun 28, 2015 at 11:36 AM, Garrett Cooper wrote: > >>> > >>>> On Jun 28, 2015, at 10:48, Justin Hibbits wrote: > >>>> > >>>> Both powerpc and powerpc64 builds are broken in the same way, in > >>>> usr.bin/mkesdb. It was working correctly as of just before BSDCan, I > >>>> successfully built world and kernel on June 6. > >>>> > >>>> The error seen at this point is: > >>>> > >>>> cc -O2 -pipe -I/home/chmeee/freebsd/head/usr.bin/mkesdb > >>>> -I/home/chmeee/freebsd/head/usr.bin/mkesdb/../mkesdb > >>>> -I/home/chmeee/freebsd/head/usr.bin/mkesdb/../../lib/libc/iconv > >>>> -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall > >>>> -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes > >>>> -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual > >>>> -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align > >>>> -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls > >>>> -Wold-style-definition -Wno-pointer-sign > >>>> -L/home/chmeee/world/zhabar/home/chmeee/freebsd/head/usr.bin/mkesdb/../../lib/libc > >>>> -o mkesdb lex.o yacc.o > >>>> /home/chmeee/world/zhabar/home/chmeee/freebsd/head/tmp/usr/bin/ld: > >>>> undefined reference to symbol `_end' (try adding -lc) > >>>> /home/chmeee/world/zhabar/home/chmeee/freebsd/head/tmp/lib/libc.so.7: > >>>> could not read symbols: Bad value > >>>> > >>>> I've seen this both locally on my G5, and on the Power8 in the FreeBSD cluster. > >>> > >>> - What does file say when you run it on libc.so.7? > >> > >> /usr/obj/usr/src/lib/libc/libc.so.7: ELF 64-bit MSB shared object, > >> 64-bit PowerPC or cisco 7500, version 1 (FreeBSD), dynamically linked, > >> not stripped > > I think a libc linker could try for that command line lives in > > /home/chmeee/world/zhabar/home/chmeee/freebsd/head/lib/libc/libc.so > > or in > > /home/chmeee/world/zhabar/home/chmeee/freebsd/head/tmp/lib/libc.so > > > > But, the reason for your troubles seems to come from the > > usr.bin/mkesdb/Makefile. Why does it explicitely adds LDFLAGS to point > > to objdir/.../libc, I have no idea. > > > Neither me. > > Here with this mods it compiles: > > Either: > > --- Makefile (revision 284911) > +++ Makefile (working copy) > @@ -3,7 +3,7 @@ > .PATH: ${.CURDIR}/../../lib/libc/iconv > > PROG= mkesdb > -LDFLAGS+= -L${.OBJDIR}/../../lib/libc > +LDFLAGS+= -L${.OBJDIR}/../../lib/libc/libc > > NO_WMISSING_VARIABLE_DECLARATIONS= > > > Or: > > Index: Makefile > =================================================================== > --- Makefile (revision 284911) > +++ Makefile (working copy) > @@ -3,7 +3,7 @@ > .PATH: ${.CURDIR}/../../lib/libc/iconv > > PROG= mkesdb > -LDFLAGS+= -L${.OBJDIR}/../../lib/libc > +LDFLAGS+= -L${.CURDIR}/../../lib/libc > > NO_WMISSING_VARIABLE_DECLARATIONS= No, I mean that LDFLAGS explicitely listing supposed location for libc is wrong, too much wrong. If mkesd is special, it might need to become a bootstrap tool. But the hackery above is too fragile and it is surprising that it went unnoticed for such long time (after the citrus enablement).