pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/45246: lang/ocaml fails to build with binutils 2.21



>Number:         45246
>Category:       pkg
>Synopsis:       lang/ocaml fails to build with binutils 2.21
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 13 15:05:00 +0000 2011
>Originator:     Florian Walpen
>Release:        DragonFly BSD 2.10.1
>Organization:
>Environment:
DragonFly alpha.home 2.10-RELEASE DragonFly v2.10.1.4.gc607a-RELEASE #0: Sat 
Apr 30 02:06:55 CEST 2011     
root%alpha.home@localhost:/usr/obj/usr/src/sys/FLOW  i386

pkgsrc-current as of 08/13/2011
>Description:
lang/ocaml as of version 3.12.0 (pkgsrc-current) has a problem building with 
binutils 2.21.

This is known and fixed in ocaml 3.12.1, see 
http://caml.inria.fr/mantis/view.php?id=5237

While we stay at version 3.12.0 we should incorporate the solution from the 
ocaml bugtracker, see patches below.
>How-To-Repeat:
Build lang/ocaml from pkgsrc-current on a system with binutils 2.21 (e.g. 
DragonFly BSD 2.10.1).
>Fix:
Apply the following diff to patch the lang/ocaml patches.
The diff stems from a "git diff -u" to pkgsrc-current and applies to the pkgsrc 
root.
Adds a new patch and changes an existing one to incorporate the solution from 
the ocaml bug tracker.


diff --git a/lang/ocaml/distinfo b/lang/ocaml/distinfo
index 0840f11..678a104 100644
--- a/lang/ocaml/distinfo
+++ b/lang/ocaml/distinfo
@@ -3,7 +3,7 @@ $NetBSD: distinfo,v 1.55 2011/07/20 14:10:09 riastradh Exp $
 SHA1 (ocaml-3.12.0.tar.bz2) = 33ebbfb1115806f117808f37e40d206c8994943d
 RMD160 (ocaml-3.12.0.tar.bz2) = 3d10d5f7431d8200688fa74122e7ed528126a0fa
 Size (ocaml-3.12.0.tar.bz2) = 2639049 bytes
-SHA1 (patch-aa) = 858f326fe4db7971a05b3b001c6aecc02ecb2903
+SHA1 (patch-aa) = eae08e6ddb743d4a7e234587ff6d3e7fcd0b0f9e
 SHA1 (patch-ab) = e91cbb94c0897ffd02daebc19835a24c257dccd9
 SHA1 (patch-ac) = efe8290b394f40d6675fc9d57557c49ddafdb239
 SHA1 (patch-ad) = f2c1dcc3c31db31e2484fdea1076692a63252a87
@@ -11,6 +11,7 @@ SHA1 (patch-ag) = f1b751098d3693b92feb26cda87970426bffcaf1
 SHA1 (patch-ah) = 3165bbcdb98d09f5161912e51a3131486aa0b488
 SHA1 (patch-aj) = 6fd989f1e5dd1263890c14459dd4ab85d75e86cd
 SHA1 (patch-an) = 8fb8efecd2b3f0ec6f913a0840f4cfebcbb6161e
+SHA1 (patch-asmcomp_amd64_emit.mlp) = cf0a9236262097d9f3bde1f204e7f4cbb5d01393
 SHA1 (patch-at) = 4b16f924f9bad771ac06137ae0b05ca35276b92a
 SHA1 (patch-au) = 1e36bcdf39d40e781273ea51df213db05ff46c89
 SHA1 (patch-av) = f56c8924b81a620602bc5a67b0c4459b721701d2
diff --git a/lang/ocaml/patches/patch-aa b/lang/ocaml/patches/patch-aa
index 2fc07b9..e7cadeb 100644
--- a/lang/ocaml/patches/patch-aa
+++ b/lang/ocaml/patches/patch-aa
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- asmcomp/i386/emit.mlp.orig 2007-03-07 10:14:29.000000000 +0100
+--- asmcomp/i386/emit.mlp.orig 2010-01-20 16:26:46 +0000
 +++ asmcomp/i386/emit.mlp
-@@ -860,7 +860,7 @@ let emit_profile () =
+@@ -861,7 +861,7 @@ let emit_profile () =
        `       movl    %esp, %ebp\n`;
        `       pushl   %ecx\n`;
        `       pushl   %edx\n`;
@@ -11,3 +11,19 @@ $NetBSD$
        `       popl    %edx\n`;
        `       popl    %ecx\n`;
        `       popl    %eax\n`
+@@ -905,12 +905,12 @@ let fundecl fundecl =
+   emit_all true fundecl.fun_body;
+   List.iter emit_call_gc !call_gc_sites;
+   emit_call_bound_errors ();
+-  List.iter emit_float_constant !float_constants;
+-  match Config.system with
++  begin match Config.system with
+     "linux_elf" | "bsd_elf" | "gnu" ->
+       `       .type   {emit_symbol fundecl.fun_name},@function\n`;
+       `       .size   {emit_symbol fundecl.fun_name},.-{emit_symbol 
fundecl.fun_name}\n`
+-  | _ -> ()
++  | _ -> () end;
++  List.iter emit_float_constant !float_constants
+ 
+ 
+ (* Emission of data *)
diff --git a/lang/ocaml/patches/patch-asmcomp_amd64_emit.mlp 
b/lang/ocaml/patches/patch-asmcomp_amd64_emit.mlp
new file mode 100644
index 0000000..059172e
--- /dev/null
+++ b/lang/ocaml/patches/patch-asmcomp_amd64_emit.mlp
@@ -0,0 +1,29 @@
+$NetBSD$
+
+--- asmcomp/amd64/emit.mlp.orig        2010-06-02 08:55:35 +0000
++++ asmcomp/amd64/emit.mlp
+@@ -688,17 +688,18 @@ let fundecl fundecl =
+   emit_all true fundecl.fun_body;
+   List.iter emit_call_gc !call_gc_sites;
+   emit_call_bound_errors ();
++  begin match Config.system with
++    "linux" | "gnu" ->
++      `       .type   {emit_symbol fundecl.fun_name},@function\n`;
++      `       .size   {emit_symbol fundecl.fun_name},.-{emit_symbol 
fundecl.fun_name}\n`
++    | _ -> ()
++  end;
+   if !float_constants <> [] then begin
+     if macosx
+     then `    .literal8\n`
+     else `    .section        .rodata.cst8,\"a\",@progbits\n`;
+     List.iter emit_float_constant !float_constants
+-  end;
+-  match Config.system with
+-    "linux" | "gnu" ->
+-      `       .type   {emit_symbol fundecl.fun_name},@function\n`;
+-      `       .size   {emit_symbol fundecl.fun_name},.-{emit_symbol 
fundecl.fun_name}\n`
+-  | _ -> ()
++  end
+ 
+ (* Emission of data *)
+ 



Home | Main Index | Thread Index | Old Index