NetBSD Problem Report #47356

From www@NetBSD.org  Wed Dec 19 19:22:15 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 1BD6F63E58E
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 19 Dec 2012 19:22:15 +0000 (UTC)
Message-Id: <20121219192213.E822E63E58E@www.NetBSD.org>
Date: Wed, 19 Dec 2012 19:22:13 +0000 (UTC)
From: imre@vdsz.com
Reply-To: imre@vdsz.com
To: gnats-bugs@NetBSD.org
Subject: lang/polyml dumps core on NetBSD/amd64
X-Send-Pr-Version: www-1.0

>Number:         47356
>Category:       pkg
>Synopsis:       lang/polyml dumps core on NetBSD/amd64
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    asau
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 19 19:25:00 +0000 2012
>Last-Modified:  Tue Dec 25 11:39:54 +0000 2012
>Originator:     Imre Vadasz
>Release:        6.99.15
>Organization:
>Environment:
NetBSD Wega 6.99.15 NetBSD 6.99.15 (GENERIC) #32: Tue Dec 18 15:05:19 CET 2012  vadaszi@Pollux:/volatile/netbsd/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
lang/polyml dumps core on NetBSD/amd64, which was also documented in the Makefile of this package.
>How-To-Repeat:
Install lang/polyml-5.5 on NetBSD/amd64 then run poly and watch it dump core.
>Fix:
This patch of lang/polyml adds a patch on libpolyml/elfexport.h to include an explicit cast to a 64bit value (ELF64_Xword) when the ELF64_R_INFO macro from elf64.h is used (linux has such a cast in its elf64.h, NetBSD does not).

Index: lang/polyml/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/polyml/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- lang/polyml/Makefile        8 Oct 2012 14:34:06 -0000       1.8
+++ lang/polyml/Makefile        19 Dec 2012 19:01:16 -0000
@@ -10,7 +10,6 @@
 COMMENT=       Poly/ML is an implementation of Standard ML

 # ONLY_FOR_PLATFORM=	*-*-i386 *-*-x86_64 *-*-sparc *-*-powerpc
-# Dumps core on NetBSD/amd64

 GNU_CONFIGURE= yes
 CONFIGURE_ARGS=        --with-system-libffi
Index: lang/polyml/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/lang/polyml/distinfo,v
retrieving revision 1.4
diff -u -r1.4 distinfo
--- lang/polyml/distinfo        8 Oct 2012 14:33:32 -0000       1.4
+++ lang/polyml/distinfo        19 Dec 2012 19:01:16 -0000
@@ -4,3 +4,4 @@
 RMD160 (polyml.5.5.tar.gz) = a2daf4230e7643c1febb455dea0c4f5682096d63
 Size (polyml.5.5.tar.gz) = 5504389 bytes
 SHA1 (patch-libpolyml_elfexport.cpp) = b32d52ea2a0b00b15cab1ec3aff0dac84add1d56
+SHA1 (patch-libpolyml_elfexport.h) = fd3ce501509231949f293905bbb7856817a2ee36
cvs diff: Diffing lang/polyml/patches
Index: lang/polyml/patches/patch-libpolyml_elfexport.h
===================================================================
RCS file: lang/polyml/patches/patch-libpolyml_elfexport.h
diff -N lang/polyml/patches/patch-libpolyml_elfexport.h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ lang/polyml/patches/patch-libpolyml_elfexport.h     19 Dec 2012 19:01:16 -0000
@@ -0,0 +1,11 @@
+--- libpolyml/elfexport.h        2007-09-11 16:27:04.000000000 +0200
++++ libpolyml/elfexport.h   2012-11-07 16:20:22.475426587 +0100
+@@ -37,7 +37,7 @@
+ #define ElfXX_Sym   Elf64_Sym
+ #define ElfXX_Ehdr  Elf64_Ehdr
+ #define ElfXX_Shdr  Elf64_Shdr
+-#define ELFXX_R_INFO(_y, _z)    ELF64_R_INFO(_y, _z)
++#define ELFXX_R_INFO(_y, _z)    ELF64_R_INFO((Elf64_Xword)(_y), _z)
+ #define ELFXX_ST_INFO(_y, _z)   ELF64_ST_INFO(_y, _z)
+ #define ELFCLASSXX      ELFCLASS64
+ #else

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->asau
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Tue, 25 Dec 2012 11:39:54 +0000
Responsible-Changed-Why:
Over to maintainer.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.