[PATCH] gnu: Add maradns.

  • Done
  • quality assurance status badge
Details
3 participants
  • Arun Isaac
  • Efraim Flashner
  • Mathieu Othacehe
Owner
unassigned
Submitted by
Arun Isaac
Severity
normal
A
A
Arun Isaac wrote on 22 Apr 2020 15:29
(address . guix-patches@gnu.org)(name . Arun Isaac)(address . arunisaac@systemreboot.net)
20200422132922.9539-1-arunisaac@systemreboot.net
* gnu/packages/dns.scm (maradns): New variable.
---
gnu/packages/dns.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

Toggle diff (59 lines)
diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index 0f7227ad03..75be82b3b4 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -14,6 +14,7 @@
;;; Copyright © 2019 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
+;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -949,3 +950,44 @@ could) directly register names in the Domain Name System (DNS). Some examples
of public suffixes are .com, .co.uk and pvt.k12.ma.us. This is a list of all
known public suffixes.")
(license license:mpl2.0))))
+
+(define-public maradns
+ (package
+ (name "maradns")
+ (version "3.5.0004")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://maradns.samiam.org/download/"
+ (version-major+minor version) "/"
+ version "/maradns-" version ".tar.xz"))
+ (sha256
+ (base32
+ "1zv0i6m4m05ay5zlhwq1h88hgjq2d81cjanpnb3gyhr0xhmjwk6a"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; need to be root to run tests
+ #:make-flags (list "CC=gcc"
+ (string-append "PREFIX=" %output)
+ (string-append "RPM_BUILD_ROOT=" %output))
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (invoke "./configure")))
+ (add-before 'install 'create-install-directories
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (for-each (lambda (dir)
+ (mkdir-p (string-append out dir)))
+ (list "/bin" "/sbin" "/etc"
+ "/share/man/man1"
+ "/share/man/man5"
+ "/share/man/man8"))
+ #t))))))
+ (home-page "https://maradns.samiam.org")
+ (synopsis "Small lightweight DNS server")
+ (description "MaraDNS is a small and lightweight DNS server. MaraDNS
+consists of a UDP-only authoritative DNS server for hosting domains, and a UDP
+and TCP-capable recursive DNS server for finding domains on the internet.")
+ (license license:bsd-2)))
--
2.26.1
M
M
Mathieu Othacehe wrote on 22 Apr 2020 15:49
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 40767@debbugs.gnu.org)
87lfmnock3.fsf@gmail.com
Hello,

Toggle quote (4 lines)
> + #:make-flags (list "CC=gcc"
> + (string-append "PREFIX=" %output)
> + (string-append "RPM_BUILD_ROOT=" %output))

Hard-coding CC variable this way prevents cross-compilation. If you run:

Toggle snippet (3 lines)
./pre-inst-env guix build maradns --target=aarch64-linux-gnu --target=aarch64-linux-gnu

you will obtain a native version of the binaries. Something like that
would work better:

Toggle snippet (6 lines)
(string-append "CC=" (if target
(string-append (assoc-ref %build-inputs "cross-gcc")
"/bin/" target "-gcc")
"gcc"))

As this is a recurrent problem we may need to put this snippet into a
gnu-build-system function?

Thanks,

Mathieu
E
E
Efraim Flashner wrote on 22 Apr 2020 17:09
(name . Mathieu Othacehe)(address . m.othacehe@gmail.com)
20200422150904.GN10788@E5400
On Wed, Apr 22, 2020 at 03:49:32PM +0200, Mathieu Othacehe wrote:
Toggle quote (30 lines)
>
> Hello,
>
> > + #:make-flags (list "CC=gcc"
> > + (string-append "PREFIX=" %output)
> > + (string-append "RPM_BUILD_ROOT=" %output))
>
> Hard-coding CC variable this way prevents cross-compilation. If you run:
>
> --8<---------------cut here---------------start------------->8---
> ./pre-inst-env guix build maradns --target=aarch64-linux-gnu --target=aarch64-linux-gnu
> --8<---------------cut here---------------end--------------->8---
>
> you will obtain a native version of the binaries. Something like that
> would work better:
>
> --8<---------------cut here---------------start------------->8---
> (string-append "CC=" (if target
> (string-append (assoc-ref %build-inputs "cross-gcc")
> "/bin/" target "-gcc")
> "gcc"))
> --8<---------------cut here---------------end--------------->8---
>
> As this is a recurrent problem we may need to put this snippet into a
> gnu-build-system function?
>
> Thanks,
>
> Mathieu

would (which "gcc") work when cross compiling?

--
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl6gXg0ACgkQQarn3Mo9
g1FoVxAAvs2eK0yKJ5KryGBCY11/3DuKsdTVDpW8kTZV4TTdCOHdEKGIkIOv6Mnc
g2ob8efSC+2hfguYzXUawDwbH1D9k8EpXTuSJ+y6mYhSfcsZcG3ssfxekSTZmupU
m765ANgc51YdfDMwUV525vbrRd0IC8CcQwoOILyuCfb5+2lByTEmSNl/SoV+tduu
auc6EqCsqIYpD0FgsGTbYiyLaBcISxuP0N7h+4bCf3v6kRHJKCXM1GFzjwbpgWBG
rGEboJVQ8XlFEfqy/pqNXDf05Iv5pA8f3kSDLXXwbqyKr48LCnxcM6oNlqOPgMJ2
XTjkY0ybufEwTyQFkK99SWMK96PlGxH6EbLzPMbtNNCw+gTRzKGhei0yaIck/eXF
ACmr4vdUPuEX4tEBP/Zq6QWL9yoG+bzEkGnlT9zCi+JlKmUP582YuAm+gD7fIwtt
GLLXx9gvds2vDyfZm7VE1GqRv0T7bW7ETWHBxs15JBeG8FM7aNfrwl78ah8yiafF
SsQv7EqR83TTRRL+PuodT/Zng99MtFTBSE4nJNO7bgPPqQgSdl32dEW+SLkQQshp
YdSUH5wnrOwap+fi8Zh3+bWxbtfpj5j+4gvDIsgcwm6R67KWzkKzC+aUmjg/uEoq
7opU/NugnmZ+5G5ZetNQXRjs0YulsF6SJ6vsmi/DDRsOzE8G0cY=
=NseI
-----END PGP SIGNATURE-----


M
M
Mathieu Othacehe wrote on 22 Apr 2020 19:26
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87v9lrxwhs.fsf@gmail.com
Toggle quote (2 lines)
> would (which "gcc") work when cross compiling?

When cross-compiling the cross gcc is named target-gcc
(aarch64-linux-gnu-gcc for instance), so (which "gcc") would return the
native compiler, not the cross one.

Note that when using autoconf/autotools, cross-compilation is working
fine because we pass "--host=target" and it manages to find the native
and cross-compiler from that.

This issue only arises when raw Makefile are using hard-coded CC=gcc to
build stuff.

Thanks,

Mathieu
A
A
Arun Isaac wrote on 22 Apr 2020 21:01
(name . Mathieu Othacehe)(address . m.othacehe@gmail.com)(address . 40767@debbugs.gnu.org)
cu7y2qnwdia.fsf@systemreboot.net
Toggle quote (2 lines)
> Hello,

Thanks for the patch review!

Toggle quote (6 lines)
>> + #:make-flags (list "CC=gcc"
>> + (string-append "PREFIX=" %output)
>> + (string-append "RPM_BUILD_ROOT=" %output))
>
> Hard-coding CC variable this way prevents cross-compilation.

Oops, I overlooked that.

Toggle quote (16 lines)
> If you run:
>
> --8<---------------cut here---------------start------------->8---
> ./pre-inst-env guix build maradns --target=aarch64-linux-gnu --target=aarch64-linux-gnu
> --8<---------------cut here---------------end--------------->8---
>
> you will obtain a native version of the binaries. Something like that
> would work better:
>
> --8<---------------cut here---------------start------------->8---
> (string-append "CC=" (if target
> (string-append (assoc-ref %build-inputs "cross-gcc")
> "/bin/" target "-gcc")
> "gcc"))
> --8<---------------cut here---------------end--------------->8---

Sure, I'll fix this. Any other changes?

Toggle quote (3 lines)
> As this is a recurrent problem we may need to put this snippet into a
> gnu-build-system function?

I think that's a good idea. The build phase of the gnu-build-system
should include this snippet.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAl6glJ0ACgkQLiXui2GA
K7MnAggAhADLc3nzWBLga72Mzop/cAX+DgbnkeM+WGUUooEpsSIAIgoles1CXfVf
NzMpWQ7MOzKXv7KpD4b1PfBNU2DwJhpM16Q5kGr0RbsmtYBcHbP/7Sb1gZzP4kBH
lEfCTYT/iOkZakiJVuGh6yckxGaxdjFp+ZIrmjHpefLBFPccUdC429nsw5ImtLNQ
G9nWmBF1eGM+lERJXBruTYlHwwZrdsbSbpdyBhjoWN1UT581TrylvE6kiFz0WH9B
W1MNfgb/8uuTHLu3MQk9Okn8golvhoEla2UsKcHGnZ2BX2UeZmy62oF6mWmshMO3
aM/lqtg9ZzwOmdrRHSVjzikj82tXjg==
=zXlA
-----END PGP SIGNATURE-----

M
M
Mathieu Othacehe wrote on 23 Apr 2020 10:37
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 40767@debbugs.gnu.org)
87blnioawj.fsf@gmail.com
Hello,

Toggle quote (2 lines)
> Sure, I'll fix this. Any other changes?

No other than that, this LGTM :).

Mathieu
A
A
Arun Isaac wrote on 25 Apr 2020 00:13
(name . Mathieu Othacehe)(address . m.othacehe@gmail.com)(address . 40767@debbugs.gnu.org)
cu77dy4wmzh.fsf@systemreboot.net
Pushed with discussed change. Thank you for the review!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAl6jZKIACgkQLiXui2GA
K7NZegf/couAa+RVKOOMLTBxPyYBB6c57x50i9RglZmPCbePFD57quDtb5aP7haf
dHyMkH91Zt6eDWkuLxK2JyaqzzVEBQQVvtSnvNgpRrHNLUmSGhH8y9GnIUUdfGs2
EabLVNmWyekk52maq61Gxx0dy5jZDyCJiBZDJcpOpbthc2smsGO4ilONOAXUvDqG
NceIwFJsrUNBRA4EI8FiaxyRigSBb4Xm7siKJwx9XaMUE58Jky0XWXzxQ41+Hvf0
R1xcowKysX0t8OwQM1Rb2izeKHMYRxPuq099Lvj/XPAuq13mwyTk/ic1bAkcf+8S
J/LC8re0w5FkqBocZ9cy0DYeo+A/2Q==
=+0F3
-----END PGP SIGNATURE-----

A
A
Arun Isaac wrote on 25 Apr 2020 00:15
(address . 40767-done@debbugs.gnu.org)
cu74kt8wmwi.fsf@systemreboot.net
Closing this issue.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAl6jZQ0ACgkQLiXui2GA
K7PRuQf9ExK8PeJrrjCA8PK42shRqoWWpWw4Utn3Q8oi1DwboTXK8toBaucE+7ur
U8pP1PVF+CddSlNcl138gYoabxaAy425MIOmTPSNqkJMjpcLvzL9T3vhZLI5D9FG
eC1YHQn8uvTRmuZyljdqKPklDNibvby0nS/4BGREkh7HjIbuklTB+OpvrgYmSdNQ
7kUhbIy+MxSZU+jenO9CajeFInRAUInTks3DCDnIS14nLyosghidL2BqhfTNIthT
yalrdrUVwKkVVcUUBHt6J9Sn/W8eQk8se6PpQLwgFw2dkuT+FrS7DUSZTyPGzDja
ARp1j1dDvrx7hwcvNYWOiNGmm/mtRA==
=zVfe
-----END PGP SIGNATURE-----

Closed
M
M
Mathieu Othacehe wrote on 25 Apr 2020 10:13
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 40767@debbugs.gnu.org)
87y2qkx9sh.fsf@gmail.com
Hello,

Toggle quote (2 lines)
> Pushed with discussed change. Thank you for the review!

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

Toggle snippet (12 lines)
../rng/rng-alg-fst.c: In function ‘rngKeySetupEnc’:
../rng/rng-alg-fst.c:104:34: error: ‘Te4’ undeclared (first use in this function); did you mean ‘STe4’?
(Te4[(temp >> 16) & 0xff] & 0xff000000) ^
^~~
STe4
../rng/rng-alg-fst.c:104:34: note: each undeclared identifier is reported only once for each function it appears in
../rng/rng-alg-fst.c:125:27: error: ‘Te0’ undeclared (first use in this function); did you mean ‘Te4’?
STe0[i] = Te0[i];
^~~
Te4

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

Could you have a look?

Thanks,

Mathieu
A
A
Arun Isaac wrote on 25 Apr 2020 12:58
(name . Mathieu Othacehe)(address . m.othacehe@gmail.com)(address . 40767@debbugs.gnu.org)
cu7zhazvnko.fsf@systemreboot.net
Toggle quote (3 lines)
> 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.

Toggle quote (2 lines)
> Also, please be careful to stay under the 78 column limit.

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

Thanks!
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(-)

Toggle diff (42 lines)
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
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAl6kF+gACgkQLiXui2GA
K7MWdggAyXPugEiNmM8M27E69Ii9+DUae2tLZCV18v2zvo9K13YBqONq+iPt01M6
qh736jJ8xfugsaXHQ5XcO9gRTJ3bffgYiTuj63bjV9GXo87lvMR4TwbZ+S6WXOxD
WZS+p3TkVBbnIND5UZRG5+k8WOzREaTakvhL/LpFz4r1/X0aUICVnBIYiwN6dqCt
ECcpz4OlIROPu6jv7vuWnVMAtK072bSSmdaUPe2+fjSecKrEG8JBDzg5Vp9qDzKu
7G13Ri/InWrv5UbgytGerNJlStJK/tP8rlmt5ziMo2v7Pp6/bfSVv9czfbMDHJVw
/1mQSz10DhU1mglm50Hs0Ld0PujyJQ==
=TpSb
-----END PGP SIGNATURE-----

M
M
Mathieu Othacehe wrote on 25 Apr 2020 14:43
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 40767@debbugs.gnu.org)
87v9lng2hx.fsf@gmail.com
Toggle quote (2 lines)
> Yes, I checked before pushing. guix lint reported no warnings.

Then we may have to fix guix lint because it seems to me that this
snippet is above limit:

Toggle snippet (5 lines)
(string-append (assoc-ref %build-inputs "cross-gcc")
"/bin/" ,(%current-target-system) "-gcc")


Nice fix, thank you :)

Toggle quote (7 lines)
> "/share/man/man8"))
> #t))))))
> + (native-inputs
> + `(,@(if (%current-target-system)
> + `(("gcc" ,gcc))
> + '())))

You don't need this bit, the native gcc is also present when
cross-compiling. Otherwise, LGTM!

Mathieu
A
A
Arun Isaac wrote on 25 Apr 2020 20:03
(name . Mathieu Othacehe)(address . m.othacehe@gmail.com)(address . 40767@debbugs.gnu.org)
cu7tv17v3wy.fsf@systemreboot.net
Toggle quote (5 lines)
>> Yes, I checked before pushing. guix lint reported no warnings.
>
> Then we may have to fix guix lint because it seems to me that this
> snippet is above limit:

guix lint checks for lines longer than 90 characters. Perhaps that's the
new policy? See the function report-long-line in guix/lint.scm. It even
has a comment noting that we don't warn at 80 characters.

Toggle quote (3 lines)
> You don't need this bit, the native gcc is also present when
> cross-compiling. Otherwise, LGTM!

Removed. Please find attached the updated patch.
From c155043bd6f78add7bbf660b6ad4a592be89b694 Mon Sep 17 00:00:00 2001
From: Arun Isaac <arunisaac@systemreboot.net>
Date: Sat, 25 Apr 2020 15:53:52 +0530
Subject: [PATCH v2] gnu: maradns: Fix cross compilation.

* gnu/packages/dns.scm (maradns)[arguments]: Build make_32bit_tables for the
host.
---
gnu/packages/dns.scm | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

Toggle diff (31 lines)
diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index 80ed1f0b49..7364a1e885 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)
--
2.26.1
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAl6ke20ACgkQLiXui2GA
K7O9oAf+MdsOH2WTpRzUbpEcplADLKYMAa7J5xhjGdAJ2SicvNPeay/rASwhWZyR
W6UFLkkrS2mrdBRUbYmSM6+kq6Z0q9UJuBvdxk6x3w5+jkB64a4nHjfd5vGxKHXY
Pr7DlGL0vDa0RkcPQaW/3yj001Vux8384thYyOCLU+QBhIBRoB2bpLOPD9F411uN
+UbH58m/HuD4iHf0r8OArMDi3HWvs71rBXi3UyzqHoTfthT49ASTkYWiVyaNjGYW
e+VUiZ7XEsKDBh6zqHVQQBBnqTc6AMtgjh1C163wWTuAXf9xSaK/aKKszfVPTFCC
ikBAYWRjYE1/WK3xYQ6iCT9UA06e9A==
=Ch6+
-----END PGP SIGNATURE-----

M
M
Mathieu Othacehe wrote on 26 Apr 2020 11:05
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 40767@debbugs.gnu.org)
87mu6yfwgu.fsf@gmail.com
Toggle quote (4 lines)
> guix lint checks for lines longer than 90 characters. Perhaps that's the
> new policy? See the function report-long-line in guix/lint.scm. It even
> has a comment noting that we don't warn at 80 characters.

Yes it's to avoid false positives with hashes and URLs. On the other
hand, in .dir-locals.el, fill-column variable is set to 78. Maybe we
would need to be more explicit in the "Coding style" section of the
manual.

Toggle quote (11 lines)
> - (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"))))

Nitpicking, you can use the target argument instead of
%current-target-system, this way:

Toggle snippet (11 lines)
(lambda* (#:key native-inputs target #: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 target
(substitute* "rng/Makefile"
(("\\$\\(CC\\) -o make_32bit_tables")
(string-append (assoc-ref native-inputs "gcc")
"/bin/gcc -o make_32bit_tables")))))

Feel free to go ahead with this one,

Thanks,

Mathieu
A
A
Arun Isaac wrote on 26 Apr 2020 11:51
(name . Mathieu Othacehe)(address . m.othacehe@gmail.com)(address . 40767@debbugs.gnu.org)
cu7o8reval1.fsf@systemreboot.net
Toggle quote (9 lines)
>> guix lint checks for lines longer than 90 characters. Perhaps that's the
>> new policy? See the function report-long-line in guix/lint.scm. It even
>> has a comment noting that we don't warn at 80 characters.
>
> Yes it's to avoid false positives with hashes and URLs. On the other
> hand, in .dir-locals.el, fill-column variable is set to 78. Maybe we
> would need to be more explicit in the "Coding style" section of the
> manual.

Do please raise this in guix-devel and we could get some consensus on
this.

Toggle quote (17 lines)
> Nitpicking, you can use the target argument instead of
> %current-target-system, this way:
>
> --8<---------------cut here---------------start------------->8---
> (lambda* (#:key native-inputs target #: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 target
> (substitute* "rng/Makefile"
> (("\\$\\(CC\\) -o make_32bit_tables")
> (string-append (assoc-ref native-inputs "gcc")
> "/bin/gcc -o make_32bit_tables")))))
> --8<---------------cut here---------------end--------------->8---
>
> Feel free to go ahead with this one,

Pushed with suggested change. Thanks! :-)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAl6lWaoACgkQLiXui2GA
K7NASgf/fabkg7eew649wJ0XJdc6ho5W871BwlcFHWme/zcNWBosIfA85pnI88Eh
ONqPZPcM0NiUeWUt6teN0/WFZ6kfBsWD6C8FP/mfP0TqvyjqA0x8I4iCeINfutOi
ZnSpCR6u8b9zZBher4tlp6I5Ut6g75BXKnesitFFGbfNfIcvaaMKlETByE95DqMV
OhcDi4VwXwwBUtqeLEECUrSHHpQ1JGswonI75/qaUJHETjEnSCeJqeSgfwI2fi7n
ComFYikAH2WlQAqF/wZ1B9+1kLK37SIPxy/ZLMYHi7nxDd817G0DpvxGLh1txqO+
shHAAIm3w9QG1L6nrqF2STTCfjsEVA==
=xSo8
-----END PGP SIGNATURE-----

?