NetBSD Problem Report #44846
From www@NetBSD.org Sat Apr 9 15:38:14 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 101D663C077
for <gnats-bugs@gnats.NetBSD.org>; Sat, 9 Apr 2011 15:38:14 +0000 (UTC)
Message-Id: <20110409153813.529CA63BEAA@www.NetBSD.org>
Date: Sat, 9 Apr 2011 15:38:13 +0000 (UTC)
From: ftigeot@wolfpond.org
Reply-To: ftigeot@wolfpond.org
To: gnats-bugs@NetBSD.org
Subject: lang/mono needs some patches to compile on DragonFly
X-Send-Pr-Version: www-1.0
>Number: 44846
>Category: pkg
>Synopsis: lang/mono needs some patches to compile on DragonFly
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: marino
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Apr 09 15:40:01 +0000 2011
>Closed-Date: Sat Oct 15 02:10:58 +0000 2011
>Last-Modified: Sat Oct 15 02:10:58 +0000 2011
>Originator: François Tigeot
>Release: DragonFly
>Organization:
>Environment:
DragonFly dfly64.zefyris.com 2.9-DEVELOPMENT DragonFly v2.9.1.1067.gecc6d0-DEVELOPMENT #2: Sat Apr 9 17:08:27 CEST 2011 ftigeot@dfly64.zefyris.com:/usr/obj/usr/src/sys/X86_64_GENERIC_SMP x86_64
>Description:
lang/mono does not build on DragonFly hosts.
The attached patches fix some of the compilation errors.
>How-To-Repeat:
Try to build lang/mono on a DragonFly host
>Fix:
- modify patches/patch-ad:
Index: patch-ad
===================================================================
RCS file: /cvsroot/pkgsrc/lang/mono/patches/patch-ad,v
retrieving revision 1.21
diff -u -r1.21 patch-ad
--- patch-ad 29 Dec 2010 05:41:20 -0000 1.21
+++ patch-ad 9 Apr 2011 15:36:27 -0000
@@ -1,5 +1,6 @@
-$NetBSD: patch-ad,v 1.21 2010/12/29 05:41:20 obache Exp $
---- mono/utils/mono-sigcontext.h.orig 2010-11-12 10:24:41.000000000 +0000
+$NetBSD$
+
+--- mono/utils/mono-sigcontext.h.orig 2011-01-04 17:39:55 +0000
+++ mono/utils/mono-sigcontext.h
@@ -8,14 +8,14 @@
@@ -18,9 +19,12 @@
#define UCONTEXT_REG_EAX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_eax)
#define UCONTEXT_REG_EBX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_ebx)
#define UCONTEXT_REG_ECX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_ecx)
-@@ -101,6 +101,20 @@
+@@ -99,8 +99,22 @@
+ #define UCONTEXT_REG_R13(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__r13)
+ #define UCONTEXT_REG_R14(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__r14)
#define UCONTEXT_REG_R15(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__r15)
- #elif defined(__FreeBSD__)
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
#define UCONTEXT_GREGS(ctx) ((guint64*)&(((ucontext_t*)(ctx))->uc_mcontext))
+#elif defined(__NetBSD__)
+ #define UCONTEXT_REG_RAX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_RAX])
and add this new patch to patches/
$NetBSD$
--- mono/mini/mini-amd64.h.orig 2011-01-04 17:39:55 +0000
+++ mono/mini/mini-amd64.h
@@ -288,7 +288,7 @@ typedef struct {
#define MONO_ARCH_NOMAP32BIT
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined(__DragonFly__)
#define REG_RAX 7
#define REG_RCX 4
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->dfly-pkg-people
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Sat, 09 Apr 2011 21:58:20 +0000
Responsible-Changed-Why:
Dragonfly PR
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/44846: lang/mono needs some patches to compile on DragonFly
Date: Fri, 13 May 2011 20:49:52 +0900
On Sun, 10 Apr 2011 00:40:01 +0900, <ftigeot@wolfpond.org> wrote:
> and add this new patch to patches/
>
> $NetBSD$
>
> --- mono/mini/mini-amd64.h.orig 2011-01-04 17:39:55 +0000
> +++ mono/mini/mini-amd64.h
> @@ -288,7 +288,7 @@ typedef struct {
> #define MONO_ARCH_NOMAP32BIT
>-#elif defined (__FreeBSD__)
> +#elif defined (__FreeBSD__) || defined(__DragonFly__)
> #define REG_RAX 7
> #define REG_RCX 4
It may be result in broken, I feel
REG_RSP should be 24 (DragonFly), not 23 (FreeBSD)
REG_RIP should be 21 (DragonFly), not 20 (FreeBSD)
Instead of using it, how about change patch-ad as followings?
Index: patches/patch-ad
===================================================================
RCS file: /cvsroot/pkgsrc/lang/mono/patches/patch-ad,v
retrieving revision 1.21
diff -u -r1.21 patch-ad
--- patches/patch-ad 29 Dec 2010 05:41:20 -0000 1.21
+++ patches/patch-ad 13 May 2011 11:37:37 -0000
@@ -1,5 +1,9 @@
$NetBSD: patch-ad,v 1.21 2010/12/29 05:41:20 obache Exp $
---- mono/utils/mono-sigcontext.h.orig 2010-11-12 10:24:41.000000000 +0000
+
+* treat DragonFly same as FreeBSD.
+* add NetBSD support.
+
+--- mono/utils/mono-sigcontext.h.orig 2011-02-23 19:21:01 +0000
+++ mono/utils/mono-sigcontext.h
@@ -8,14 +8,14 @@
@@ -18,10 +22,26 @@
#define UCONTEXT_REG_EAX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_eax)
#define UCONTEXT_REG_EBX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_ebx)
#define UCONTEXT_REG_ECX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_ecx)
-@@ -101,6 +101,20 @@
+@@ -99,8 +99,34 @@
+ #define UCONTEXT_REG_R13(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__r13)
+ #define UCONTEXT_REG_R14(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__r14)
#define UCONTEXT_REG_R15(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__r15)
- #elif defined(__FreeBSD__)
- #define UCONTEXT_GREGS(ctx) ((guint64*)&(((ucontext_t*)(ctx))->uc_mcontext))
+-#elif defined(__FreeBSD__)
+-#define UCONTEXT_GREGS(ctx) ((guint64*)&(((ucontext_t*)(ctx))->uc_mcontext))
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
++ #define UCONTEXT_REG_RAX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_rax)
++ #define UCONTEXT_REG_RBX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_rbx)
++ #define UCONTEXT_REG_RCX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_rcx)
++ #define UCONTEXT_REG_RDX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_rdx)
++ #define UCONTEXT_REG_RBP(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_rbp)
++ #define UCONTEXT_REG_RSP(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_rsp)
++ #define UCONTEXT_REG_RSI(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_rsi)
++ #define UCONTEXT_REG_RDI(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_rdi)
++ #define UCONTEXT_REG_RIP(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_rip)
++ #define UCONTEXT_REG_R12(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_r12)
++ #define UCONTEXT_REG_R13(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_r13)
++ #define UCONTEXT_REG_R14(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_r14)
++ #define UCONTEXT_REG_R15(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_r15)
+#elif defined(__NetBSD__)
+ #define UCONTEXT_REG_RAX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_RAX])
+ #define UCONTEXT_REG_RBX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_RBX])
--
OBATA Akio / obache@NetBSD.org
From: Francois Tigeot <ftigeot@wolfpond.org>
To: gnats-bugs@NetBSD.org
Cc: dfly-pkg-people@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org,
ftigeot@wolfpond.org
Subject: Re: pkg/44846: lang/mono needs some patches to compile on DragonFly
Date: Sun, 31 Jul 2011 11:03:26 +0200
On Fri, May 13, 2011 at 11:50:04AM +0000, OBATA Akio wrote:
> The following reply was made to PR pkg/44846; it has been noted by GNATS.
>
> From: "OBATA Akio" <obache@netbsd.org>
> To: gnats-bugs@netbsd.org
> Cc:
> Subject: Re: pkg/44846: lang/mono needs some patches to compile on DragonFly
> Date: Fri, 13 May 2011 20:49:52 +0900
>
> It may be result in broken, I feel
> REG_RSP should be 24 (DragonFly), not 23 (FreeBSD)
> REG_RIP should be 21 (DragonFly), not 20 (FreeBSD)
>
> Instead of using it, how about change patch-ad as followings?
Your patch is good, please commit it when you get a chance :-)
--
Francois Tigeot
Responsible-Changed-From-To: dfly-pkg-people->marino
Responsible-Changed-By: marino@NetBSD.org
Responsible-Changed-When: Sat, 15 Oct 2011 01:27:14 +0000
Responsible-Changed-Why:
Marino is DragonFly specialist.
From: "John Marino" <marino@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/44846 CVS commit: pkgsrc/lang/mono
Date: Sat, 15 Oct 2011 02:04:00 +0000
Module Name: pkgsrc
Committed By: marino
Date: Sat Oct 15 02:04:00 UTC 2011
Modified Files:
pkgsrc/lang/mono: distinfo
pkgsrc/lang/mono/patches: patch-ad
Log Message:
PR#44846: Fix lang/mono for x86_64 DragonFly
The patch-ad modification was independently created by myself before I
knew about this PR. The mono build has been broken for several months,
but with this patch along with modifications for the linker, mono now
builds on an x86_64 DragonFly machine.
To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 pkgsrc/lang/mono/distinfo
cvs rdiff -u -r1.21 -r1.22 pkgsrc/lang/mono/patches/patch-ad
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: marino@NetBSD.org
State-Changed-When: Sat, 15 Oct 2011 02:10:58 +0000
State-Changed-Why:
patch-ad committed as requested.
>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.