NetBSD Problem Report #51479
From wiz@yt.nih.at Fri Sep 16 10:28:35 2016
Return-Path: <wiz@yt.nih.at>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(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 7396C7A288
for <gnats-bugs@gnats.NetBSD.org>; Fri, 16 Sep 2016 10:28:35 +0000 (UTC)
Message-Id: <20160916090235.89C9B2AC0DF@yt.nih.at>
Date: Fri, 16 Sep 2016 11:02:35 +0200 (CEST)
From: Thomas Klausner <wiz@NetBSD.org>
Reply-To: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Subject: qemu-2.7.0 does not build with stack protection
X-Send-Pr-Version: 3.95
>Number: 51479
>Category: pkg
>Synopsis: qemu-2.7.0 does not build with stack protection
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Sep 16 10:30:00 +0000 2016
>Closed-Date: Thu Dec 29 23:00:20 +0000 2016
>Last-Modified: Thu Dec 29 23:20:01 +0000 2016
>Originator: Thomas Klausner
>Release: NetBSD 7.99.37
>Organization:
Curiosity is the very basis of education and if you tell me that
curiosity killed the cat, I say only that the cat died nobly.
- Arnold Edinborough
>Environment:
Architecture: x86_64
Machine: amd64
>Description:
When building with stack protection turned on, qemu-2.7.0 does not build.
2.6.1 was fine.
The error is:
ld: warning: -z ,relro ignored.
ld: warning: -z ,now ignored.
Building optionrom/linuxboot.img
CC qga/channel-posix.o
ld: warning: -z ,relro ignored.
ld: warning: -z ,now ignored.
Building optionrom/linuxboot_dma.img
ld: warning: -z ,relro ignored.
ld: warning: -z ,now ignored.
linuxboot_dma.o: In function `bios_cfg_read_entry':
/scratch/emulators/qemu/work/qemu-2.7.0/pc-bios/optionrom/linuxboot_dma.c:165: undefined reference to `__stack_chk_guard'
/scratch/emulators/qemu/work/qemu-2.7.0/pc-bios/optionrom/linuxboot_dma.c:181: undefined reference to `__stack_chk_fail_local'
linuxboot_dma.o: In function `load_kernel':
/scratch/emulators/qemu/work/qemu-2.7.0/pc-bios/optionrom/linuxboot_dma.c:224: undefined reference to `__stack_chk_guard'
/scratch/emulators/qemu/work/qemu-2.7.0/pc-bios/optionrom/linuxboot_dma.c:298: undefined reference to `__stack_chk_fail_local'
Makefile:49: recipe for target 'linuxboot_dma.img' failed
make[1]: *** [linuxboot_dma.img] Error 1
>How-To-Repeat:
Build with:
PKGSRC_MKPIE= yes
PKGSRC_USE_FORTIFY= yes
PKGSRC_USE_RELRO= yes
PKGSRC_USE_SSP= all
in /etc/mk.conf, though probably only PKGSRC_USE_SSP is necessary
for this error.
>Fix:
Yes, please.
>Release-Note:
>Audit-Trail:
From: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/51479: qemu-2.7.0 does not build with stack protection
Date: Wed, 21 Sep 2016 14:23:06 +0200
On Fri, Sep 16, 2016 at 11:02:35AM +0200, Thomas Klausner wrote:
> Build with:
> PKGSRC_MKPIE= yes
> PKGSRC_USE_FORTIFY= yes
> PKGSRC_USE_RELRO= yes
> PKGSRC_USE_SSP= all
> in /etc/mk.conf, though probably only PKGSRC_USE_SSP is necessary
Just to confirm, the build finishes when I turn off PKGSRC_USE_SSP.
Thomas
State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Thu, 29 Dec 2016 23:00:20 +0000
State-Changed-Why:
ixed.
From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51479 CVS commit: pkgsrc/emulators/qemu
Date: Thu, 29 Dec 2016 22:59:39 +0000
Module Name: pkgsrc
Committed By: wiz
Date: Thu Dec 29 22:59:39 UTC 2016
Modified Files:
pkgsrc/emulators/qemu: Makefile
Log Message:
Fix build with SSP.
Closes my PR 51479.
To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.159 pkgsrc/emulators/qemu/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>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-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.