unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH v4 0/3] Fix ldc
@ 2016-09-13 10:30 Danny Milosavljevic
  2016-09-13 10:30 ` [PATCH v4 1/3] gnu: Add python-lit, python2-lit Danny Milosavljevic
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Danny Milosavljevic @ 2016-09-13 10:30 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 553 bytes --]

Fixes ldc and updates it to the latest C++-bootstrappable version.

Danny Milosavljevic (3):
  gnu: Add python-lit, python2-lit.
  gnu: Make ldc work again (patch isnan, isinf).
  gnu: Update ldc to 0.17.1.

 gnu/packages/ldc.scm                               |  31 +++--
 .../patches/ldc-0.17.1-disable-tests.patch         | 147 +++++++++++++++++++++
 gnu/packages/python.scm                            |  26 ++++
 3 files changed, 195 insertions(+), 9 deletions(-)
 create mode 100644 gnu/packages/patches/ldc-0.17.1-disable-tests.patch


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v4 1/3] gnu: Add python-lit, python2-lit.
  2016-09-13 10:30 [PATCH v4 0/3] Fix ldc Danny Milosavljevic
@ 2016-09-13 10:30 ` Danny Milosavljevic
  2016-09-13 16:42   ` Leo Famulari
  2016-09-13 10:30 ` [PATCH v4 2/3] gnu: Make ldc work again Danny Milosavljevic
  2016-09-13 10:30 ` [PATCH v4 3/3] gnu: Update ldc to 0.17.1 Danny Milosavljevic
  2 siblings, 1 reply; 14+ messages in thread
From: Danny Milosavljevic @ 2016-09-13 10:30 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 171 bytes --]


* gnu/packages/python.scm (python-lit, python2-lit): New variables.
---
 gnu/packages/python.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-python-lit-python2-lit.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-python-lit-python2-lit.patch", Size: 1233 bytes --]

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index b839f22..eb407c2 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -10327,3 +10327,29 @@ Python to manipulate OpenDocument 1.2 files.")
              (native-inputs
               `(("python2-setuptools" ,python2-setuptools)
                 ,@(package-native-inputs base))))))
+
+(define-public python-lit
+  (package
+    (name "python-lit")
+    (version "0.5.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "lit" version))
+        (sha256
+          (base32
+            "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
+   (build-system python-build-system)
+    (home-page "http://llvm.org/")
+    (synopsis "LLVM Software Testing Tool")
+    (description "@code{lit} is a LLVM software testing tool.")
+    (license license:ncsa)
+    (properties `((python2-variant . ,(delay python2-lit))))))
+
+(define-public python2-lit
+  (let ((base (package-with-python2 (strip-python2-variant python-lit))))
+    (package
+      (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v4 2/3] gnu: Make ldc work again
  2016-09-13 10:30 [PATCH v4 0/3] Fix ldc Danny Milosavljevic
  2016-09-13 10:30 ` [PATCH v4 1/3] gnu: Add python-lit, python2-lit Danny Milosavljevic
@ 2016-09-13 10:30 ` Danny Milosavljevic
  2016-09-13 16:53   ` Leo Famulari
  2016-09-13 10:30 ` [PATCH v4 3/3] gnu: Update ldc to 0.17.1 Danny Milosavljevic
  2 siblings, 1 reply; 14+ messages in thread
From: Danny Milosavljevic @ 2016-09-13 10:30 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 208 bytes --]


* gnu/packages/ldc.scm (ldc): Added substitution. Added zlib input. Fix llvm and clang inputs to 3.7.
---
 gnu/packages/ldc.scm | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-gnu-Make-ldc-work-again-patch-isnan-isinf.patch --]
[-- Type: text/x-patch; name="0002-gnu-Make-ldc-work-again-patch-isnan-isinf.patch", Size: 1714 bytes --]

diff --git a/gnu/packages/ldc.scm b/gnu/packages/ldc.scm
index 1709f59..560fa49 100644
--- a/gnu/packages/ldc.scm
+++ b/gnu/packages/ldc.scm
@@ -26,6 +26,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages compression)
   #:use-module (gnu packages libedit)
   #:use-module (gnu packages llvm)
   #:use-module (gnu packages textutils)
@@ -101,6 +102,14 @@ and freshness without requiring additional information from the user.")
                (and (unpack "phobos-src" "runtime/phobos")
                     (unpack "druntime-src" "runtime/druntime")
                     (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite")))))
+         (add-after 'unpack-submodule-sources 'patch-dmd2
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "dmd2/root/port.c"
+               ((" ::isnan") " isnan")
+               ((" ::isinf") " isinf")
+               (("#undef isnan") "")
+               (("#undef isinf") ""))
+             #t))
          (add-after 'unpack-submodule-sources 'patch-phobos
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "runtime/phobos/std/process.d"
@@ -115,10 +124,11 @@ and freshness without requiring additional information from the user.")
     (inputs
      `(("libconfig" ,libconfig)
        ("libedit" ,libedit)
-       ("tzdata" ,tzdata)))
+       ("tzdata" ,tzdata)
+       ("zlib" ,zlib)))
     (native-inputs
-     `(("llvm" ,llvm)
-       ("clang" ,clang)
+     `(("llvm" ,llvm-3.7)
+       ("clang" ,clang-3.7)
        ("unzip" ,unzip)
        ("phobos-src"
         ,(origin

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v4 3/3] gnu: Update ldc to 0.17.1.
  2016-09-13 10:30 [PATCH v4 0/3] Fix ldc Danny Milosavljevic
  2016-09-13 10:30 ` [PATCH v4 1/3] gnu: Add python-lit, python2-lit Danny Milosavljevic
  2016-09-13 10:30 ` [PATCH v4 2/3] gnu: Make ldc work again Danny Milosavljevic
@ 2016-09-13 10:30 ` Danny Milosavljevic
  2016-09-13 16:55   ` Leo Famulari
  2016-09-13 19:25   ` Efraim Flashner
  2 siblings, 2 replies; 14+ messages in thread
From: Danny Milosavljevic @ 2016-09-13 10:30 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 328 bytes --]


* gnu/packages/ldc.scm (ldc): Update to 0.17.1.
---
 gnu/packages/ldc.scm                               |  15 ++-
 .../patches/ldc-0.17.1-disable-tests.patch         | 147 +++++++++++++++++++++
 2 files changed, 156 insertions(+), 6 deletions(-)
 create mode 100644 gnu/packages/patches/ldc-0.17.1-disable-tests.patch


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0003-gnu-Update-ldc-to-0.17.1.patch --]
[-- Type: text/x-patch; name="0003-gnu-Update-ldc-to-0.17.1.patch", Size: 8047 bytes --]

diff --git a/gnu/packages/ldc.scm b/gnu/packages/ldc.scm
index 560fa49..70b2c5e 100644
--- a/gnu/packages/ldc.scm
+++ b/gnu/packages/ldc.scm
@@ -29,6 +29,7 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages libedit)
   #:use-module (gnu packages llvm)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages textutils)
   #:use-module (gnu packages zip))
 
@@ -76,7 +77,7 @@ and freshness without requiring additional information from the user.")
 (define-public ldc
   (package
     (name "ldc")
-    (version "0.16.1")
+    (version "0.17.1")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -85,7 +86,7 @@ and freshness without requiring additional information from the user.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1jvilxx0rpqmkbja4m69fhd5g09697xq7vyqp2hz4hvxmmmv4j40"))))
+                "0rwggnbr60jbajfdw11kx058llmwljiss8rrv8df07vaygiv845i"))))
     (build-system cmake-build-system)
     ;; LDC currently only supports the x86_64 and i686 architectures.
     (supported-systems '("x86_64-linux" "i686-linux"))
@@ -130,6 +131,8 @@ and freshness without requiring additional information from the user.")
      `(("llvm" ,llvm-3.7)
        ("clang" ,clang-3.7)
        ("unzip" ,unzip)
+       ("python-wrapper" ,python-wrapper) ; Needed for running tests
+       ("python-lit" ,python-lit) ; Needed for running tests
        ("phobos-src"
         ,(origin
            (method url-fetch)
@@ -138,8 +141,8 @@ and freshness without requiring additional information from the user.")
                  version ".tar.gz"))
            (sha256
             (base32
-             "0sgdj0536c4nb118yiw1f8lqy5d3g3lpg9l99l165lk9xy45l9z4"))
-           (patches (search-patches "ldc-disable-tests.patch"))))
+             "17nb1yvqblqj3q42c8nlnwvy823fw6kna28n2b48j4m6kd2w0nan"))
+           (patches (search-patches "ldc-0.17.1-disable-tests.patch"))))
        ("druntime-src"
         ,(origin
            (method url-fetch)
@@ -148,7 +151,7 @@ and freshness without requiring additional information from the user.")
                  version ".tar.gz"))
            (sha256
             (base32
-             "0z4mkyddx6c4sy1vqgqvavz55083dsxws681qkh93jh1rpby9yg6"))))
+             "129j7mfd0vnzaw7i6hr5waxm5cb0qcm8gyawy2xy5avlv8hrw5m4"))))
        ("dmd-testsuite-src"
         ,(origin
            (method url-fetch)
@@ -157,7 +160,7 @@ and freshness without requiring additional information from the user.")
                  version ".tar.gz"))
            (sha256
             (base32
-             "0yc6miidzgl9k33ygk7xcppmfd6kivqj02cvv4fmkbs3qz4yy3z1"))))))
+             "18h16lwwmr3k9dh7mcip17il72mz680wnygv9d0mdnivczn80zyv"))))))
     (home-page "http://wiki.dlang.org/LDC")
     (synopsis "LLVM compiler for the D programming language")
     (description
diff --git a/gnu/packages/patches/ldc-0.17.1-disable-tests.patch b/gnu/packages/patches/ldc-0.17.1-disable-tests.patch
new file mode 100644
index 0000000..ee73077
--- /dev/null
+++ b/gnu/packages/patches/ldc-0.17.1-disable-tests.patch
@@ -0,0 +1,147 @@
+Only in b/std: algorithm
+Only in b/std: array.d
+Only in b/std: ascii.d
+Only in b/std: base64.d
+Only in b/std: bigint.d
+Only in b/std: bitmanip.d
+Only in b/std: c
+Only in b/std: compiler.d
+Only in b/std: complex.d
+Only in b/std: concurrency.d
+Only in b/std: container
+Only in b/std: conv.d
+Only in b/std: cstream.d
+Only in b/std: csv.d
+diff -ru a/std/datetime.d b/std/datetime.d
+--- a/std/datetime.d	2016-08-02 23:56:13.969292202 +0200
++++ b/std/datetime.d	2016-08-02 23:57:39.078408313 +0200
+@@ -28080,9 +28080,6 @@
+         import std.algorithm : sort;
+         import std.range : retro;
+         import std.format : format;
+-
+-        name = strip(name);
+-
+         enforce(tzDatabaseDir.exists(), new DateTimeException(format("Directory %s does not exist.", tzDatabaseDir)));
+         enforce(tzDatabaseDir.isDir, new DateTimeException(format("%s is not a directory.", tzDatabaseDir)));
+ 
+@@ -28094,7 +28091,10 @@
+             immutable file = buildNormalizedPath(tzDatabaseDir, tzFilename);
+         }
+         else
+-            immutable file = buildNormalizedPath(tzDatabaseDir, name);
++        {
++            auto filename = "./" ~ strip(name); // make sure the prefix is not stripped
++            immutable file = buildNormalizedPath(tzDatabaseDir, filename);
++        }
+ 
+         enforce(file.exists(), new DateTimeException(format("File %s does not exist.", file)));
+         enforce(file.isFile, new DateTimeException(format("%s is not a file.", file)));
+Only in b/std: datetime.d.orig
+Only in b/std: demangle.d
+Only in b/std: digest
+Only in b/std: encoding.d
+Only in b/std: exception.d
+Only in b/std: experimental
+Only in b/std: file.d
+Only in b/std: format.d
+Only in b/std: functional.d
+Only in b/std: getopt.d
+Only in b/std: internal
+Only in b/std: json.d
+Only in b/std: math.d
+Only in b/std: mathspecial.d
+Only in b/std: meta.d
+Only in b/std: metastrings.d
+Only in b/std: mmfile.d
+Only in b/std: net
+Only in b/std: numeric.d
+Only in b/std: outbuffer.d
+Only in b/std: parallelism.d
+diff -ru a/std/path.d b/std/path.d
+--- a/std/path.d	2016-08-02 23:56:03.781158908 +0200
++++ b/std/path.d	2016-08-02 23:54:06.111624406 +0200
+@@ -3724,8 +3724,8 @@
+         }
+         else
+         {
+-            assert(expandTilde("~root") == "/root", expandTilde("~root"));
+-            assert(expandTilde("~root/") == "/root/", expandTilde("~root/"));
++            //assert(expandTilde("~root") == "/root", expandTilde("~root"));
++            //assert(expandTilde("~root/") == "/root/", expandTilde("~root/"));
+         }
+         assert(expandTilde("~Idontexist/hey") == "~Idontexist/hey");
+     }
+Only in b/std: path.d.orig
+Only in b/std: process.d
+Only in b/std: random.d
+Only in b/std: range
+Only in b/std: regex
+Only in b/std: signals.d
+diff -ru a/std/socket.d b/std/socket.d
+--- a/std/socket.d	2016-08-02 23:56:22.881408857 +0200
++++ b/std/socket.d	2016-08-03 10:09:44.761019447 +0200
+@@ -501,18 +501,19 @@
+ version(CRuntime_Bionic) {} else
+ unittest
+ {
+-    softUnittest({
++    pragma(msg, "test disabled on GNU Guix");
++    //softUnittest({
+         Protocol proto = new Protocol;
+-        assert(proto.getProtocolByType(ProtocolType.TCP));
++        //assert(proto.getProtocolByType(ProtocolType.TCP));
+         //writeln("About protocol TCP:");
+         //writefln("\tName: %s", proto.name);
+         // foreach(string s; proto.aliases)
+         // {
+         //      writefln("\tAlias: %s", s);
+         // }
+-        assert(proto.name == "tcp");
+-        assert(proto.aliases.length == 1 && proto.aliases[0] == "TCP");
+-    });
++        //assert(proto.name == "tcp");
++        //assert(proto.aliases.length == 1 && proto.aliases[0] == "TCP");
++    //});
+ }
+ 
+ 
+@@ -842,6 +843,8 @@
+ 
+ unittest
+ {
++    pragma(msg, "test disabled on GNU Guix");
++    /*
+     InternetHost ih = new InternetHost;
+ 
+     ih.getHostByAddr(0x7F_00_00_01);
+@@ -872,6 +875,7 @@
+         //      writefln("aliases[%d] = %s", i, s);
+         // }
+     });
++    */
+ }
+ 
+ 
+Only in b/std: socket.d.orig
+Only in b/std: socketstream.d
+Only in b/std: stdint.d
+Only in b/std: stdiobase.d
+Only in b/std: stdio.d
+Only in b/std: stream.d
+Only in b/std: string.d
+Only in b/std: syserror.d
+Only in b/std: system.d
+Only in b/std: traits.d
+Only in b/std: typecons.d
+Only in b/std: typelist.d
+Only in b/std: typetuple.d
+Only in b/std: uni.d
+Only in b/std: uri.d
+Only in b/std: utf.d
+Only in b/std: uuid.d
+Only in b/std: variant.d
+Only in b/std: windows
+Only in b/std: xml.d
+Only in b/std: zip.d
+Only in b/std: zlib.d

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH v4 1/3] gnu: Add python-lit, python2-lit.
  2016-09-13 10:30 ` [PATCH v4 1/3] gnu: Add python-lit, python2-lit Danny Milosavljevic
@ 2016-09-13 16:42   ` Leo Famulari
  0 siblings, 0 replies; 14+ messages in thread
From: Leo Famulari @ 2016-09-13 16:42 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

On Tue, Sep 13, 2016 at 12:30:40PM +0200, Danny Milosavljevic wrote:
> 
> * gnu/packages/python.scm (python-lit, python2-lit): New variables.

Pushed as 243db8245e6 with some minor indentation adjustments and an
expanded description. Thanks!

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v4 2/3] gnu: Make ldc work again
  2016-09-13 10:30 ` [PATCH v4 2/3] gnu: Make ldc work again Danny Milosavljevic
@ 2016-09-13 16:53   ` Leo Famulari
  2016-09-13 18:09     ` Leo Famulari
  2016-09-13 19:05     ` Roel Janssen
  0 siblings, 2 replies; 14+ messages in thread
From: Leo Famulari @ 2016-09-13 16:53 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

On Tue, Sep 13, 2016 at 12:30:41PM +0200, Danny Milosavljevic wrote:
> * gnu/packages/ldc.scm (ldc): Added substitution. Added zlib input. Fix llvm and clang inputs to 3.7.

LDC built with this patch. I'm currently in the test suite. If it passes
on my computer, I'd like to push this patch unless there are objections.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v4 3/3] gnu: Update ldc to 0.17.1.
  2016-09-13 10:30 ` [PATCH v4 3/3] gnu: Update ldc to 0.17.1 Danny Milosavljevic
@ 2016-09-13 16:55   ` Leo Famulari
  2016-09-13 19:44     ` Danny Milosavljevic
  2016-09-13 19:25   ` Efraim Flashner
  1 sibling, 1 reply; 14+ messages in thread
From: Leo Famulari @ 2016-09-13 16:55 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

On Tue, Sep 13, 2016 at 12:30:42PM +0200, Danny Milosavljevic wrote:
> * gnu/packages/ldc.scm (ldc): Update to 0.17.1.

With this patch, LDC fails to build on my x86_64 machine with the
familiar errors about isnan and isinf:

[ 11%] Building CXX object CMakeFiles/LDCShared.dir/dmd2/scope.c.o
/gnu/store/frrj3bfbmg5vrd0flh9cf8j64h7cr2v4-gcc-4.9.3/bin/c++   -DDMDV2 -DHAVE_SC_ARG_MAX -DIN_LLVM -DLDC_INSTALL_PREFIX=\"/gnu/store/4p7hh4a7dyp2wg7zd08lvlxafayrjznx-ldc-0.17.1\" -DLDC_LLVM_VER=307 -DLLVM_INTRINSIC_TD_PATH=\"/gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include\" -DOPAQUE_VTBLS -D__LITTLE_ENDIAN__ -I/tmp/guix-build-ldc-0.17.1.drv-0/ldc-0.17.1/. -I/tmp/guix-build-ldc-0.17.1.drv-0/ldc-0.17.1/dmd2 -I/tmp/guix-build-ldc-0.17.1.drv-0/ldc-0.17.1/dmd2/root -I/tmp/guix-build-ldc-0.17.1.drv-0/build/dmd2 -I/tmp/guix-build-ldc-0.17.1.drv-0/ldc-0.17.1 -isystem /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include -isystem /gnu/store/1v4anv1dwvskkav1zj08gicwaibachr1-libconfig-1.5/include  -O2 -g -DNDEBUG   -I/gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include  -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -O3 -DNDEBUG -fno-exceptions -fno-rtti  -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS   -w -DPOSIX -DLDC_POSIX  -o CMakeFiles/LDCShared.dir/dmd2/scope.c.o -c /tmp/guix-build-ldc-0.17.1.drv-0/ldc-0.17.1/dmd2/scope.c
/tmp/guix-build-ldc-0.17.1.drv-0/ldc-0.17.1/dmd2/root/port.c: In static member function ‘static int Port::isNan(double)’:
/tmp/guix-build-ldc-0.17.1.drv-0/ldc-0.17.1/dmd2/root/port.c:773:19: error: ‘isnan’ was not declared in this scope
     return isnan(r);
                   ^
/tmp/guix-build-ldc-0.17.1.drv-0/ldc-0.17.1/dmd2/root/port.c:773:19: note: suggested alternative:
In file included from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/Support/DataTypes.h:35:0,
                 from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/Support/SwapByteOrder.h:19,
                 from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/Support/MathExtras.h:18,
                 from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/ADT/SmallVector.h:20,
                 from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/ADT/ArrayRef.h:14,
                 from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/ADT/APInt.h:19,
                 from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/ADT/APFloat.h:20,
                 from /tmp/guix-build-ldc-0.17.1.drv-0/ldc-0.17.1/dmd2/root/port.c:677:
/gnu/store/frrj3bfbmg5vrd0flh9cf8j64h7cr2v4-gcc-4.9.3/include/c++/cmath:632:5: note:   ‘std::isnan’
     isnan(_Tp __x)
     ^
/tmp/guix-build-ldc-0.17.1.drv-0/ldc-0.17.1/dmd2/root/port.c: In static member function ‘static int Port::isNan(longdouble)’:
/tmp/guix-build-ldc-0.17.1.drv-0/ldc-0.17.1/dmd2/root/port.c:789:19: error: ‘isnan’ was not declared in this scope
     return isnan(r);
                   ^
/tmp/guix-build-ldc-0.17.1.drv-0/ldc-0.17.1/dmd2/root/port.c:789:19: note: suggested alternative:
In file included from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/Support/DataTypes.h:35:0,
                 from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/Support/SwapByteOrder.h:19,
                 from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/Support/MathExtras.h:18,
                 from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/ADT/SmallVector.h:20,
                 from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/ADT/ArrayRef.h:14,
                 from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/ADT/APInt.h:19,
                 from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/ADT/APFloat.h:20,
                 from /tmp/guix-build-ldc-0.17.1.drv-0/ldc-0.17.1/dmd2/root/port.c:677:
/gnu/store/frrj3bfbmg5vrd0flh9cf8j64h7cr2v4-gcc-4.9.3/include/c++/cmath:632:5: note:   ‘std::isnan’
     isnan(_Tp __x)
     ^
/tmp/guix-build-ldc-0.17.1.drv-0/ldc-0.17.1/dmd2/root/port.c: In static member function ‘static int Port::isInfinity(double)’:
/tmp/guix-build-ldc-0.17.1.drv-0/ldc-0.17.1/dmd2/root/port.c:817:19: error: ‘isinf’ was not declared in this scope
     return isinf(r);
                   ^
/tmp/guix-build-ldc-0.17.1.drv-0/ldc-0.17.1/dmd2/root/port.c:817:19: note: suggested alternative:
In file included from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/Support/DataTypes.h:35:0,
                 from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/Support/SwapByteOrder.h:19,
                 from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/Support/MathExtras.h:18,
                 from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/ADT/SmallVector.h:20,
                 from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/ADT/ArrayRef.h:14,
                 from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/ADT/APInt.h:19,
                 from /gnu/store/vy5wrh1igqlcswxi6bmfdl16frpjw7nf-llvm-3.7.1/include/llvm/ADT/APFloat.h:20,
                 from /tmp/guix-build-ldc-0.17.1.drv-0/ldc-0.17.1/dmd2/root/port.c:677:
/gnu/store/frrj3bfbmg5vrd0flh9cf8j64h7cr2v4-gcc-4.9.3/include/c++/cmath:614:5: note:   ‘std::isinf’
     isinf(_Tp __x)
     ^
make[2]: *** [CMakeFiles/LDCShared.dir/build.make:1517: CMakeFiles/LDCShared.dir/dmd2/root/port.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/tmp/guix-build-ldc-0.17.1.drv-0/build'
make[1]: *** [CMakeFiles/Makefile2:220: CMakeFiles/LDCShared.dir/all] Error 2
make[1]: Leaving directory '/tmp/guix-build-ldc-0.17.1.drv-0/build'
make: *** [Makefile:164: all] Error 2
phase `build' failed after 50.8 seconds
builder for `/gnu/store/h01skxl6jasx9ckf47abgsq9s4v3my4i-ldc-0.17.1.drv' failed with exit code 1
@ build-failed /gnu/store/h01skxl6jasx9ckf47abgsq9s4v3my4i-ldc-0.17.1.drv - 1 builder for `/gnu/store/h01skxl6jasx9ckf47abgsq9s4v3my4i-ldc-0.17.1.drv' failed with exit code 1
guix build: error: build failed: build of `/gnu/store/h01skxl6jasx9ckf47abgsq9s4v3my4i-ldc-0.17.1.drv' failed

> diff --git a/gnu/packages/patches/ldc-0.17.1-disable-tests.patch b/gnu/packages/patches/ldc-0.17.1-disable-tests.patch

Can you add a comment to this patch explaining where it came from and
what it does?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v4 2/3] gnu: Make ldc work again
  2016-09-13 16:53   ` Leo Famulari
@ 2016-09-13 18:09     ` Leo Famulari
  2016-09-13 19:20       ` Ricardo Wurmus
  2016-09-13 19:05     ` Roel Janssen
  1 sibling, 1 reply; 14+ messages in thread
From: Leo Famulari @ 2016-09-13 18:09 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

On Tue, Sep 13, 2016 at 12:53:39PM -0400, Leo Famulari wrote:
> On Tue, Sep 13, 2016 at 12:30:41PM +0200, Danny Milosavljevic wrote:
> > * gnu/packages/ldc.scm (ldc): Added substitution. Added zlib input. Fix llvm and clang inputs to 3.7.
> 
> LDC built with this patch. I'm currently in the test suite. If it passes
> on my computer, I'd like to push this patch unless there are objections.

The test suite passed. If there are no more comments in the next day or
two, I will push this patch with some edits to the commit message.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v4 2/3] gnu: Make ldc work again
  2016-09-13 16:53   ` Leo Famulari
  2016-09-13 18:09     ` Leo Famulari
@ 2016-09-13 19:05     ` Roel Janssen
  1 sibling, 0 replies; 14+ messages in thread
From: Roel Janssen @ 2016-09-13 19:05 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel


Leo Famulari writes:

> On Tue, Sep 13, 2016 at 12:30:41PM +0200, Danny Milosavljevic wrote:
>> * gnu/packages/ldc.scm (ldc): Added substitution. Added zlib input. Fix llvm and clang inputs to 3.7.
>
> LDC built with this patch. I'm currently in the test suite. If it passes
> on my computer, I'd like to push this patch unless there are objections.

+1.

I'm in the test phase as well.  Especially because the upgrade to 0.17.1
does not seem to work, I would like to push this patch.

Thanks Danny for your work.

Kind regards,
Roel Janssen

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v4 2/3] gnu: Make ldc work again
  2016-09-13 18:09     ` Leo Famulari
@ 2016-09-13 19:20       ` Ricardo Wurmus
  2016-09-13 19:25         ` Leo Famulari
  0 siblings, 1 reply; 14+ messages in thread
From: Ricardo Wurmus @ 2016-09-13 19:20 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel


Leo Famulari <leo@famulari.name> writes:

> On Tue, Sep 13, 2016 at 12:53:39PM -0400, Leo Famulari wrote:
>> On Tue, Sep 13, 2016 at 12:30:41PM +0200, Danny Milosavljevic wrote:
>> > * gnu/packages/ldc.scm (ldc): Added substitution. Added zlib input. Fix llvm and clang inputs to 3.7.
>> 
>> LDC built with this patch. I'm currently in the test suite. If it passes
>> on my computer, I'd like to push this patch unless there are objections.
>
> The test suite passed. If there are no more comments in the next day or
> two, I will push this patch with some edits to the commit message.

The patch looks good to me (aside from the commit message).

~~ Ricardo

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v4 3/3] gnu: Update ldc to 0.17.1.
  2016-09-13 10:30 ` [PATCH v4 3/3] gnu: Update ldc to 0.17.1 Danny Milosavljevic
  2016-09-13 16:55   ` Leo Famulari
@ 2016-09-13 19:25   ` Efraim Flashner
  1 sibling, 0 replies; 14+ messages in thread
From: Efraim Flashner @ 2016-09-13 19:25 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]

https://wiki.dlang.org/LDC
https://github.com/ldc-developers/ldc/releases/tag/v0.17.1

After 0.17.1 is working on guix *someone* should change the supported
platforms to include arm.  Based on the wiki it sounds like maybe we
should try building it on mips also.


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v4 2/3] gnu: Make ldc work again
  2016-09-13 19:20       ` Ricardo Wurmus
@ 2016-09-13 19:25         ` Leo Famulari
  2016-09-13 20:01           ` Roel Janssen
  0 siblings, 1 reply; 14+ messages in thread
From: Leo Famulari @ 2016-09-13 19:25 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

On Tue, Sep 13, 2016 at 09:20:05PM +0200, Ricardo Wurmus wrote:
> 
> Leo Famulari <leo@famulari.name> writes:
> 
> > On Tue, Sep 13, 2016 at 12:53:39PM -0400, Leo Famulari wrote:
> >> On Tue, Sep 13, 2016 at 12:30:41PM +0200, Danny Milosavljevic wrote:
> >> > * gnu/packages/ldc.scm (ldc): Added substitution. Added zlib input. Fix llvm and clang inputs to 3.7.
> >> 
> >> LDC built with this patch. I'm currently in the test suite. If it passes
> >> on my computer, I'd like to push this patch unless there are objections.
> >
> > The test suite passed. If there are no more comments in the next day or
> > two, I will push this patch with some edits to the commit message.
> 
> The patch looks good to me (aside from the commit message).

Okay, considering the comments from you and Roel, I pushed with an
altered commit message as 812b3c1f8a3717fd9fc540663912c5e9a144db5b.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v4 3/3] gnu: Update ldc to 0.17.1.
  2016-09-13 16:55   ` Leo Famulari
@ 2016-09-13 19:44     ` Danny Milosavljevic
  0 siblings, 0 replies; 14+ messages in thread
From: Danny Milosavljevic @ 2016-09-13 19:44 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Sigh. Yeah, I've researched a bit why that happens.

The story is this:

glibc wanted to have isinf work with double AND float etc without conversion. Therefore, there is a special gcc construct where you can find out what type a parameter is IN A MACRO. Therefore, in C, isnan is a macro and so is isinf. The include file defining it is <math.h>

However, in C++ there's a include file <cmath>. This one provides normal functions in the namespace "std" (since overloads are possible in C++).

dmd2 undefs isinf which is why the C version doesn't work anymore (that's stupid, really. What were they thinking?). But then they dont use the namespace std so it won't use that one either. "::isinf" is DEFINITELY wrong - no idea how that ever worked. It won't find the macro that way AND it won't find the function in namespace std either (since <nothing>:: definitely says you want the one without namespace).

Some LLVM versions include <cmath> somewhere in their header files - so dmd2 is forced to use cmath rather than math.h even though they *want* to use math.h and the source code says so.

Therefore, I now use the C++ std::isinf - I hope LLVM won't change their mind again because then it will break again.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v4 2/3] gnu: Make ldc work again
  2016-09-13 19:25         ` Leo Famulari
@ 2016-09-13 20:01           ` Roel Janssen
  0 siblings, 0 replies; 14+ messages in thread
From: Roel Janssen @ 2016-09-13 20:01 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel


Leo Famulari writes:

> On Tue, Sep 13, 2016 at 09:20:05PM +0200, Ricardo Wurmus wrote:
>> 
>> Leo Famulari <leo@famulari.name> writes:
>> 
>> > On Tue, Sep 13, 2016 at 12:53:39PM -0400, Leo Famulari wrote:
>> >> On Tue, Sep 13, 2016 at 12:30:41PM +0200, Danny Milosavljevic wrote:
>> >> > * gnu/packages/ldc.scm (ldc): Added substitution. Added zlib input. Fix llvm and clang inputs to 3.7.
>> >> 
>> >> LDC built with this patch. I'm currently in the test suite. If it passes
>> >> on my computer, I'd like to push this patch unless there are objections.
>> >
>> > The test suite passed. If there are no more comments in the next day or
>> > two, I will push this patch with some edits to the commit message.
>> 
>> The patch looks good to me (aside from the commit message).
>
> Okay, considering the comments from you and Roel, I pushed with an
> altered commit message as 812b3c1f8a3717fd9fc540663912c5e9a144db5b.

It built fine here.  Thanks for pushing.

Kind regards,
Roel Janssen

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-09-13 20:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-13 10:30 [PATCH v4 0/3] Fix ldc Danny Milosavljevic
2016-09-13 10:30 ` [PATCH v4 1/3] gnu: Add python-lit, python2-lit Danny Milosavljevic
2016-09-13 16:42   ` Leo Famulari
2016-09-13 10:30 ` [PATCH v4 2/3] gnu: Make ldc work again Danny Milosavljevic
2016-09-13 16:53   ` Leo Famulari
2016-09-13 18:09     ` Leo Famulari
2016-09-13 19:20       ` Ricardo Wurmus
2016-09-13 19:25         ` Leo Famulari
2016-09-13 20:01           ` Roel Janssen
2016-09-13 19:05     ` Roel Janssen
2016-09-13 10:30 ` [PATCH v4 3/3] gnu: Update ldc to 0.17.1 Danny Milosavljevic
2016-09-13 16:55   ` Leo Famulari
2016-09-13 19:44     ` Danny Milosavljevic
2016-09-13 19:25   ` Efraim Flashner

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).