Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jun 2015 22:32:45 +0200
From:      Andreas Tobler <andreast-list@fgznet.ch>
To:        Konstantin Belousov <kostikbel@gmail.com>, Justin Hibbits <jhibbits@freebsd.org>
Cc:        Garrett Cooper <yaneurabeya@gmail.com>, FreeBSD Current <freebsd-current@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Re: powerpc and powerpc64 builds broken
Message-ID:  <559059ED.80104@fgznet.ch>
In-Reply-To: <20150628193222.GP2080@kib.kiev.ua>
References:  <CAHSQbTC31gdLryKxkBoUef0gN3CBssFZNPdQgiZ_QJNK1g4NPQ@mail.gmail.com> <8C09575A-B885-4F41-BFF8-46FEC028E755@gmail.com> <CAHSQbTA2XQKu=_Kyfr0zX5g0jsbtjDHc-UKPYAdkb=5JPYYsQg@mail.gmail.com> <20150628193222.GP2080@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <yaneurabeya@gmail.com> wrote:
>>>
>>>> On Jun 28, 2015, at 10:48, Justin Hibbits <jhibbits@freebsd.org> 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=

Andreas




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?559059ED.80104>