GNU bug report logs -
#47582
[PATCH 1/2] gnu: lksctp-tools: Fix build of include file.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 47582 in the body.
You can then email your comments to 47582 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#47582
; Package
guix-patches
.
(Sat, 03 Apr 2021 15:26:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Hartmut Goebel <h.goebel <at> crazy-compilers.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sat, 03 Apr 2021 15:26:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/patches/lksctp-tools-1.0.18-fix-header-file-name.patch:
New file.
* gnu/local.mk[patches]: Add it.
* gnu/packages/networking.scm(/lksctp-tools)[source]: Use this patch.
---
gnu/local.mk | 1 +
gnu/packages/networking.scm | 2 ++
...tp-tools-1.0.18-fix-header-file-name.patch | 32 +++++++++++++++++++
3 files changed, 35 insertions(+)
create mode 100644 gnu/packages/patches/lksctp-tools-1.0.18-fix-header-file-name.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index deb4ddcede..728c0fc718 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1264,6 +1264,7 @@ dist_patch_DATA = \
%D%/packages/patches/libffi-float128-powerpc64le.patch \
%D%/packages/patches/libvirt-create-machine-cgroup.patch \
%D%/packages/patches/libziparchive-add-includes.patch \
+ %D%/packages/patches/lksctp-tools-1.0.18-fix-header-file-name.patch \
%D%/packages/patches/localed-xorg-keyboard.patch \
%D%/packages/patches/kdiagram-Fix-missing-link-libraries.patch \
%D%/packages/patches/kiki-level-selection-crash.patch \
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 7dd484fa94..a227cb2d3e 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -448,6 +448,8 @@ performance across unpredictable networks, such as the Internet.")
(url "https://github.com/sctp/lksctp-tools")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
+ (patches
+ (search-patches "lksctp-tools-1.0.18-fix-header-file-name.patch"))
(sha256
(base32 "1x4fwzrlzvfa3vcpja97m8w5g9ir2zrh4zs7zksminrnmdrs0dsr"))))
(build-system gnu-build-system)
diff --git a/gnu/packages/patches/lksctp-tools-1.0.18-fix-header-file-name.patch b/gnu/packages/patches/lksctp-tools-1.0.18-fix-header-file-name.patch
new file mode 100644
index 0000000000..1ebe6c803d
--- /dev/null
+++ b/gnu/packages/patches/lksctp-tools-1.0.18-fix-header-file-name.patch
@@ -0,0 +1,32 @@
+From 378560050a8f93786c590cc99a55461666205b61 Mon Sep 17 00:00:00 2001
+From: Xin Long <lucien.xin <at> gmail.com>
+Date: Fri, 24 Aug 2018 01:13:32 +0800
+Subject: [PATCH] build: fix netinet/sctp.h not to be installed
+
+After libcnetinet_HEADERS was set to sctp.h.in, netinet/sctp.h can
+no longer be installed into ${includedir}.
+
+Since "AC_CONFIG_HEADERS([src/include/netinet/sctp.h])" is already
+added into configure.ac, there's no need to generate sctp.h by
+automake.
+
+So we simply set libcnetinet_HEADERS back to sctp.h.
+
+Fixes: 9607dd85e70a ("netinet/sctp.h: dynamically build based on system setup")
+Signed-off-by: Xin Long <lucien.xin <at> gmail.com>
+Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner <at> gmail.com>
+---
+ src/include/netinet/Makefile.am | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/include/netinet/Makefile.am b/src/include/netinet/Makefile.am
+index ca0aac2..965db8c 100644
+--- a/src/include/netinet/Makefile.am
++++ b/src/include/netinet/Makefile.am
+@@ -11,5 +11,4 @@ libcnetinetdir = $(includedir)/netinet
+ # API.
+ include_HEADERS =
+
+-libcnetinet_HEADERS = sctp.h.in
+-BUILT_SOURCES = sctp.h
++libcnetinet_HEADERS = sctp.h
--
2.21.4
Information forwarded
to
guix-patches <at> gnu.org
:
bug#47582
; Package
guix-patches
.
(Sat, 03 Apr 2021 15:29:02 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/networking.scm(python-pysctp): New variable.
---
gnu/packages/networking.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index a227cb2d3e..f8ab1bbddb 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -473,6 +473,40 @@ sockets, and also some helper utilities around SCTP.")
;; Others.
license:gpl2+))))
+(define-public python-pysctp
+(package
+ (name "python-pysctp")
+ (version "0.6.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pysctp" version))
+ (sha256
+ (base32 "14h2qlmfi24bizhvvqkfqfa78pzm3911ibrzy9k94i97xy1978dy"))))
+ (build-system python-build-system)
+ (inputs
+ `(("lksctp-tools" ,lksctp-tools)))
+ (arguments
+ `(#:tests? #f ;; require network
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-setup.py
+ (lambda _
+ (substitute* "setup.py"
+ (("include_dirs\\s*=.*")
+ (string-append "include_dirs = ['.'] + '"
+ (getenv "C_INCLUDE_PATH") "'.split(':'),"))
+ (("library_dirs\\s*=.*")
+ (string-append "library_dirs = '"
+ (getenv "LIBRARY_PATH") "'.split(':'),")))
+ #t)))))
+ (home-page "https://github.com/p1sec/pysctp")
+ (synopsis "Python module for the SCTP protocol stack and library")
+ (description
+ "@code{pysctp} implements the SCTP socket API. You need a SCTP-aware
+kernel (most are).")
+ (license license:lgpl2.1+)))
+
(define-public knockd
(package
(name "knockd")
--
2.21.4
Information forwarded
to
guix-patches <at> gnu.org
:
bug#47582
; Package
guix-patches
.
(Sat, 03 Apr 2021 15:29:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#47582
; Package
guix-patches
.
(Sat, 03 Apr 2021 16:13:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 47582 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sat, 2021-04-03 at 17:28 +0200, Hartmut Goebel wrote:
> * gnu/packages/networking.scm(python-pysctp): New variable.
> ---
> gnu/packages/networking.scm | 34 ++++++++++++++++++++++++++++++++++
> 1 file changed, 34 insertions(+)
>
> [...]
> + #:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'patch-setup.py
> + (lambda _
> + (substitute* "setup.py"
> + (("include_dirs\\s*=.*")
> + (string-append "include_dirs = ['.'] + '"
> + (getenv "C_INCLUDE_PATH") "'.split(':'),"))
> + (("library_dirs\\s*=.*")
> + (string-append "library_dirs = '"
> + (getenv "LIBRARY_PATH") "'.split(':'),")))
> + #t)))))
Phases do not need to return #t anymore. IIUC the warning message that results
if it is left out has been removed on core-updates.
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#47582
; Package
guix-patches
.
(Sat, 03 Apr 2021 17:38:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 47582 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Am 03.04.21 um 18:12 schrieb Maxime Devos:
> Phases do not need to return #t anymore. IIUC the warning message that results
> if it is left out has been removed on core-updates.
Okay, will do. Any other remarks?
--
Regards
Hartmut Goebel
| Hartmut Goebel | h.goebel <at> crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#47582
; Package
guix-patches
.
(Sat, 03 Apr 2021 19:02:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 47582 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sat, 2021-04-03 at 19:37 +0200, Hartmut Goebel wrote:
> Am 03.04.21 um 18:12 schrieb Maxime Devos:
> > Phases do not need to return #t anymore. IIUC the warning message that results
> > if it is left out has been removed on core-updates.
>
> Okay, will do. Any other remarks?
About the following code:
> + (substitute* "setup.py"
> + (("include_dirs\\s*=.*")
> + (string-append "include_dirs = ['.'] + '"
> + (getenv "C_INCLUDE_PATH") "'.split(':'),"))
> + (("library_dirs\\s*=.*")
> + (string-append "library_dirs = '"
> + (getenv "LIBRARY_PATH") "'.split(':'),")))
When cross-compiling, this code should most likely use CROSS_C_INCLUDE_PATH
and CROSS_LIBRARY_PATH instead. (Admittedly, python-build-system does not
support cross-compilation yet, so this is not important ... yet.)
Suggestion: replace (getenv "C_INCLUDE_PATH") with
(getenv ,(if (%current-target-system)
"CROSS_C_INCLUDE_PATH"
"C_INCLUDE_PATH")).
Likewise for LIBRARY_PATH.
Some aesthetic nitpicks (YMMV):
> + (synopsis "Python module for the SCTP protocol stack and library")
A space has been doubled.
> * gnu/packages/networking.scm(python-pysctp): New variable.
I would put a space between .scm and (python-pysctp). Most commit messages
do.
+(define-public python-pysctp
+(package
+ (name "python-pysctp")
+ ...
Indentation is wrong here. See 16.5.4 Formatting Code for how to automatically
indent code.
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#47582
; Package
guix-patches
.
(Sun, 11 Apr 2021 15:08:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 47582 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Thanks for the review. I applied most of the changes and poushed as
03e80cf42240f65346713ff414eb2ca628ef0884
If did not apply
> Suggestion: replace (getenv "C_INCLUDE_PATH") with
> (getenv ,(if (%current-target-system)
> "CROSS_C_INCLUDE_PATH"
> "C_INCLUDE_PATH")).
> Likewise for LIBRARY_PATH.
since "CROSS_C" is used on 14 times in gnu/packages/*.scm and not at all
in guix/build*. So I assume this is not the way to implement
cross-compiling :-)
--
Regards
Hartmut Goebel
| Hartmut Goebel | h.goebel <at> crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
[signature.asc (application/pgp-signature, attachment)]
Reply sent
to
Hartmut Goebel <h.goebel <at> crazy-compilers.com>
:
You have taken responsibility.
(Sun, 11 Apr 2021 15:08:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Hartmut Goebel <h.goebel <at> crazy-compilers.com>
:
bug acknowledged by developer.
(Sun, 11 Apr 2021 15:08:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 47582-close <at> debbugs.gnu.org (full text, mbox):
Information forwarded
to
guix-patches <at> gnu.org
:
bug#47582
; Package
guix-patches
.
(Sun, 11 Apr 2021 15:52:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 47582 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sun, 2021-04-11 at 17:07 +0200, Hartmut Goebel wrote:
> Thanks for the review. I applied most of the changes and poushed as
> 03e80cf42240f65346713ff414eb2ca628ef0884
>
> If did not apply
>
> > Suggestion: replace (getenv "C_INCLUDE_PATH") with
> > (getenv ,(if (%current-target-system)
> > "CROSS_C_INCLUDE_PATH"
> > "C_INCLUDE_PATH")).
> > Likewise for LIBRARY_PATH.
I could be wrong about how/when "CROSS_C_INCLUDE_PATH" or "C_INCLUDE_PATH" should
be used.
I don't agree with the following reasoning however:
> since "CROSS_C" is used on 14 times in gnu/packages/*.scm and not at all
> in guix/build*. So I assume this is not the way to implement
> cross-compiling :-)
... as many (much more than 14) packages have cross-compilation bugs.
For example, try searching for "CC=gcc". Practically all usages are incorrect,
they should use ,(string-append "CC=" (cc-for-target)) instead.
gcc = *not* the cross-compiler
(cc-for-target): when cross-compiling, something like "aarch64-linux-gnu-gcc",
otherwise simply "gcc".
I've submitted a patch adding a linter, and a patch series fixing some of the
buggy packages (at least instances of "CC=gcc", there may be other bugs).
Links:
https://issues.guix.gnu.org/47676,
https://issues.guix.gnu.org/47693
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 10 May 2021 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 324 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.