NetBSD Problem Report #45018
From www@NetBSD.org Sat Jun 4 00:14:38 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 90DA463BECE
for <gnats-bugs@gnats.NetBSD.org>; Sat, 4 Jun 2011 00:14:38 +0000 (UTC)
Message-Id: <20110604001437.2AE3B63BA4F@www.NetBSD.org>
Date: Sat, 4 Jun 2011 00:14:37 +0000 (UTC)
From: kojiro@hello-channel.com
Reply-To: kojiro@hello-channel.com
To: gnats-bugs@NetBSD.org
Subject: QEMU fails to build because of the i386 linker script
X-Send-Pr-Version: www-1.0
>Number: 45018
>Category: pkg
>Synopsis: QEMU fails to build because of the i386 linker script
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jun 04 00:15:00 +0000 2011
>Closed-Date: Sat Jun 29 02:24:00 +0000 2013
>Last-Modified: Sat Jun 29 02:24:00 +0000 2013
>Originator: Daniel Loffgren
>Release: current
>Organization:
>Environment:
NetBSD Koharu 5.99.15 NetBSD 5.99.15 (GENERIC) #0: Sun Aug 2 05:53:27 UTC 2009 builds@b7.netbsd.org:/home/builds/ab/HEAD/i386/200908020000Z-obj/home/builds/ab/HEAD/src/sys/arch/i386/compile/GENERIC i386
>Description:
On build, qemu will fail to build with:
ld:/usr/pkgsrc/emulators/qemu/work/qemu-0.13.0/i386.ld:45: parse error
gmake[1]: *** [qemu-sparc] Error 1
gmake: *** [subdir-sparc-bsd-user] Error 2
gmake: *** Waiting for unfinished jobs....
>How-To-Repeat:
Attempt to build the latest qemu from pkgsrc
>Fix:
This is caused by the addition of some linker script code that was added to x86_64 that were also added to the i386 linker scripts, but aren't used. My patch below fixes the build.
--- i386.ld.orig 2010-10-15 15:56:09.000000000 -0500
+++ i386.ld 2011-06-03 19:10:07.000000000 -0500
@@ -39,20 +39,8 @@
.rela.fini : { *(.rela.fini) }
.rel.bss : { *(.rel.bss) }
.rela.bss : { *(.rela.bss) }
- .rel.plt :
- {
- *(.rel.plt)
- PROVIDE_HIDDEN (__rel_iplt_start = .);
- *(.rel.iplt)
- PROVIDE_HIDDEN (__rel_iplt_end = .);
- }
- .rela.plt :
- {
- *(.rela.plt)
- PROVIDE_HIDDEN (__rela_iplt_start = .);
- *(.rela.iplt)
- PROVIDE_HIDDEN (__rela_iplt_end = .);
- }
+ .rel.plt : { *(.rel.plt) }
+ .rela.plt : { *(.rela.plt) }
.init : { *(.init) } =0x47ff041f
.text :
{
>Release-Note:
>Audit-Trail:
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/45018: QEMU fails to build because of the i386 linker script
Date: Thu, 09 Jun 2011 21:29:13 +0900
On Sat, 04 Jun 2011 09:15:00 +0900, <kojiro@hello-channel.com> wrote:
>> Environment:
> NetBSD Koharu 5.99.15 NetBSD 5.99.15 (GENERIC) #0: Sun Aug 2 05:53:27 UTC 2009 builds@b7.netbsd.org:/home/builds/ab/HEAD/i386/200908020000Z-obj/home/builds/ab/HEAD/src/sys/arch/i386/compile/GENERIC i386
>
>> Description:
> On build, qemu will fail to build with:
>
> ld:/usr/pkgsrc/emulators/qemu/work/qemu-0.13.0/i386.ld:45: parse error
> gmake[1]: *** [qemu-sparc] Error 1
> gmake: *** [subdir-sparc-bsd-user] Error 2
> gmake: *** Waiting for unfinished jobs....
I cannot reproduce it on 5.1 release. NetBSD-current(old?) specific issue?
--
OBATA Akio / obache@NetBSD.org
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/45018: QEMU fails to build because of the i386 linker script
Date: Sat, 18 Jun 2011 10:21:37 +0900
Not recorded in GNATS.
------- Forwarded message -------
From: "Daniel Loffgren" <kojiro@hello-channel.com>
To: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org, obache@netbsd.org
Cc:
Subject: Re: pkg/45018: QEMU fails to build because of the i386 linker script
Date: Sat, 18 Jun 2011 09:07:52 +0900
You are right, I just built it on an up-to-date NetBSD-current machine, and it all worked perfectly. I double checked and pkgsrc is up-to-date on this machine, although it is running a much older version of current. I noticed that the linker versions between the two machines differ. It would appear that this linker script was modified here to fix building with the newer glibc, but I am guessing it breaks the old stuff. I will look further into it and see if I can find a fix that works both ways, and solves the root problem.
On Jun 9, 2011, at 7:30 AM, OBATA Akio wrote:
> The following reply was made to PR pkg/45018; it has been noted by GNATS.
>
> From: "OBATA Akio" <obache@netbsd.org>
> To: gnats-bugs@netbsd.org
> Cc:
> Subject: Re: pkg/45018: QEMU fails to build because of the i386 linker script
> Date: Thu, 09 Jun 2011 21:29:13 +0900
>
> On Sat, 04 Jun 2011 09:15:00 +0900, <kojiro@hello-channel.com> wrote:
>
>>> Environment:
>> NetBSD Koharu 5.99.15 NetBSD 5.99.15 (GENERIC) #0: Sun Aug 2 05:53:27 UTC 2009 builds@b7.netbsd.org:/home/builds/ab/HEAD/i386/200908020000Z-obj/home/builds/ab/HEAD/src/sys/arch/i386/compile/GENERIC i386
>>
>>> Description:
>> On build, qemu will fail to build with:
>>
>> ld:/usr/pkgsrc/emulators/qemu/work/qemu-0.13.0/i386.ld:45: parse error
>> gmake[1]: *** [qemu-sparc] Error 1
>> gmake: *** [subdir-sparc-bsd-user] Error 2
>> gmake: *** Waiting for unfinished jobs....
>
> I cannot reproduce it on 5.1 release. NetBSD-current(old?) specific issue?
>
> --
> OBATA Akio / obache@NetBSD.org
State-Changed-From-To: open->closed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sat, 29 Jun 2013 02:24:00 +0000
State-Changed-Why:
As noted in pkgsrc/emulators/qemu0/Makefile, this happened only on
5.99.x -current before binutils-2.19 was imported:
---
.if ${OPSYS} == "NetBSD"
.if (!empty(OS_VERSION:M5.99.*) || !empty(OS_VERSION:M[6-9].*))
# XXX
# i386 and x86_64 user emul require newer binutils for PROVIDE_HIDDEN()
# http://git.qemu.org/qemu.git/commit/?id=845f2c2812d9ed24b36c02a3d06ee83aeafe8b49
# but binutils-2.19 was enabled around 5.99.22:
# http://cvsweb.NetBSD.org/bsdweb.cgi/src/share/mk/bsd.own.mk#rev1.594
---
and no worth to handle old -current version numbers.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.