unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Arun Isaac <arunisaac@systemreboot.net>
To: Mathieu Othacehe <m.othacehe@gmail.com>
Cc: 40767@debbugs.gnu.org
Subject: [bug#40767] [PATCH] gnu: Add maradns.
Date: Sat, 25 Apr 2020 16:28:47 +0530	[thread overview]
Message-ID: <cu7zhazvnko.fsf@systemreboot.net> (raw)
In-Reply-To: <87y2qkx9sh.fsf@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 289 bytes --]


> I still have the following error when cross-building for
> aarch64-linux-gnu or arm-linux-gnueabihf:

Please find attached a patch fixing this issue.

> Also, please be careful to stay under the 78 column limit.

Yes, I checked before pushing. guix lint reported no warnings.

Thanks!


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-maradns-Fix-cross-compilation.patch --]
[-- Type: text/x-patch, Size: 2237 bytes --]

From 3b59165f196b32f130150db7a7167dc2fadae315 Mon Sep 17 00:00:00 2001
From: Arun Isaac <arunisaac@systemreboot.net>
Date: Sat, 25 Apr 2020 15:53:52 +0530
Subject: [PATCH] gnu: maradns: Fix cross compilation.

* gnu/packages/dns.scm (maradns)[native-inputs]: Add gcc when cross compiling.
[arguments]: Build make_32bit_tables for the host.
---
 gnu/packages/dns.scm | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index 80ed1f0b49..8cb6a2f3fa 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -43,6 +43,7 @@
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages datastructures)
   #:use-module (gnu packages flex)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages groff)
@@ -979,7 +980,15 @@ known public suffixes.")
        #:phases
        (modify-phases %standard-phases
          (replace 'configure
-           (lambda _
+           (lambda* (#:key native-inputs #:allow-other-keys)
+             ;; make_32bit_tables generates a header file that is used during
+             ;; compilation. Hence, during cross compilation, it should be
+             ;; built for the host system.
+             (when ,(%current-target-system)
+               (substitute* "rng/Makefile"
+                 (("\\$\\(CC\\) -o make_32bit_tables")
+                  (string-append (assoc-ref native-inputs "gcc")
+                                 "/bin/gcc -o make_32bit_tables"))))
              (invoke "./configure")))
          (add-before 'install 'create-install-directories
            (lambda* (#:key outputs #:allow-other-keys)
@@ -991,6 +1000,10 @@ known public suffixes.")
                                "/share/man/man5"
                                "/share/man/man8"))
                #t))))))
+    (native-inputs
+     `(,@(if (%current-target-system)
+             `(("gcc" ,gcc))
+             '())))
     (home-page "https://maradns.samiam.org")
     (synopsis "Small lightweight DNS server")
     (description "MaraDNS is a small and lightweight DNS server.  MaraDNS
-- 
2.26.1


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

  reply	other threads:[~2020-04-25 10:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22 13:29 [bug#40767] [PATCH] gnu: Add maradns Arun Isaac
2020-04-22 13:49 ` Mathieu Othacehe
2020-04-22 15:09   ` Efraim Flashner
2020-04-22 17:26     ` Mathieu Othacehe
2020-04-22 19:01   ` Arun Isaac
2020-04-23  8:37     ` Mathieu Othacehe
2020-04-24 22:13       ` Arun Isaac
2020-04-25  8:13         ` Mathieu Othacehe
2020-04-25 10:58           ` Arun Isaac [this message]
2020-04-25 12:43             ` Mathieu Othacehe
2020-04-25 18:03               ` Arun Isaac
2020-04-26  9:05                 ` Mathieu Othacehe
2020-04-26  9:51                   ` Arun Isaac
2020-04-24 22:15       ` bug#40767: " Arun Isaac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cu7zhazvnko.fsf@systemreboot.net \
    --to=arunisaac@systemreboot.net \
    --cc=40767@debbugs.gnu.org \
    --cc=m.othacehe@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).