all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#62916] [PATCH core-updates 1/2] gnu: gcc: do not build gcov.
  2023-04-17 22:20 [bug#62916] [PATCH core-updates 0/2] Try to fix p11-kit compilation to mingw Vivien Kraus via Guix-patches via
@ 2023-04-17 22:09 ` Vivien Kraus via Guix-patches via
  2023-04-25 16:11   ` [bug#62916] [PATCH core-updates 0/2] Try to fix p11-kit compilation to mingw Ludovic Courtès
  2023-04-17 22:17 ` [bug#62916] [PATCH core-updates 2/2] NOT WORKING gnu: p11-kit: switch to meson-build-system Vivien Kraus via Guix-patches via
  1 sibling, 1 reply; 8+ messages in thread
From: Vivien Kraus via Guix-patches via @ 2023-04-17 22:09 UTC (permalink / raw)
  To: 62916

* gnu/packages/gcc.scm (gcc-configure-flags-for-triplet): Disable gcov when
targetting mingw.
---
 gnu/packages/gcc.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 5b1ef83ce6..c6575bf9db 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -88,6 +88,10 @@ (define (gcc-configure-flags-for-triplet target)
              (string-prefix? "powerpc-" target))
          '("--with-long-double-128"))
 
+        ;; See https://bugs.gentoo.org/show_bug.cgi?id=843989
+        ((target-mingw? target)
+         '("--disable-gcov"))
+
         (else
          ;; TODO: Add `arm.*-gnueabi', etc.
          '())))
-- 
2.39.2




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

* [bug#62916] [PATCH core-updates 2/2] NOT WORKING gnu: p11-kit: switch to meson-build-system.
  2023-04-17 22:20 [bug#62916] [PATCH core-updates 0/2] Try to fix p11-kit compilation to mingw Vivien Kraus via Guix-patches via
  2023-04-17 22:09 ` [bug#62916] [PATCH core-updates 1/2] gnu: gcc: do not build gcov Vivien Kraus via Guix-patches via
@ 2023-04-17 22:17 ` Vivien Kraus via Guix-patches via
  1 sibling, 0 replies; 8+ messages in thread
From: Vivien Kraus via Guix-patches via @ 2023-04-17 22:17 UTC (permalink / raw)
  To: 62916

* gnu/packages/tls.scm (p11-kit): Switch to meson build system.
---
 gnu/packages/tls.scm | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index d41efe23b0..eaa18b9064 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -150,12 +150,9 @@ (define-public p11-kit
                            "download/" version "/p11-kit-" version ".tar.xz"))
        (sha256
         (base32 "1y5fm9gwhkh902r26p90qf1g2h1ziqrk4hgf9i9sxm2wzlz7ignq"))))
-    (build-system gnu-build-system)
+    (build-system meson-build-system)
     (native-inputs
-     (append (list pkg-config)
-             (if (hurd-target?)
-                 (list autoconf automake gettext-minimal libtool)
-                 '())))
+     (list pkg-config))
     (inputs
      (append (list libffi libtasn1)
              (if (hurd-target?)
@@ -165,7 +162,7 @@ (define-public p11-kit
      (list #:configure-flags
            ;; Use the default certificates so that users such as flatpak
            ;; find them.  See <https://issues.guix.gnu.org/49957>.
-           #~'("--with-trust-paths=/etc/ssl/certs/ca-certificates.crt")
+           #~'("-Dtrust_paths=/etc/ssl/certs/ca-certificates.crt")
            #:phases #~(modify-phases %standard-phases
                         #$@(if (hurd-target?)
                                #~((add-after 'unpack 'apply-hurd-patch
@@ -178,15 +175,7 @@ (define patch
                                   (replace 'bootstrap
                                     (lambda _
                                       (invoke "autoreconf" "-fiv"))))
-                               #~())
-                        (add-before 'check 'prepare-tests
-                          (lambda _
-                            ;; "test-runtime" expects XDG_RUNTIME_DIR to be set up
-                            ;; and looks for .cache and other directories (only).
-                            ;; For simplicity just drop it since it is irrelevant
-                            ;; in the build container.
-                            (substitute* "Makefile"
-                              (("test-runtime\\$\\(EXEEXT\\)") "")))))))
+                               #~()))))
     (home-page "https://p11-glue.github.io/p11-glue/p11-kit.html")
     (synopsis "PKCS#11 library")
     (description
-- 
2.39.2




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

* [bug#62916] [PATCH core-updates 0/2] Try to fix p11-kit compilation to mingw
@ 2023-04-17 22:20 Vivien Kraus via Guix-patches via
  2023-04-17 22:09 ` [bug#62916] [PATCH core-updates 1/2] gnu: gcc: do not build gcov Vivien Kraus via Guix-patches via
  2023-04-17 22:17 ` [bug#62916] [PATCH core-updates 2/2] NOT WORKING gnu: p11-kit: switch to meson-build-system Vivien Kraus via Guix-patches via
  0 siblings, 2 replies; 8+ messages in thread
From: Vivien Kraus via Guix-patches via @ 2023-04-17 22:20 UTC (permalink / raw)
  To: 62916

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 919 bytes --]

Dear guix,

On core-updates, p11-kit still uses the gnu build system. However, it does not
seem to be recommended anymore: the README now documents the meson build
system, and the makefiles are broken when targetting mingw.

For reference, on AUR:
https://aur.archlinux.org/packages/mingw-w64-p11-kit

p11-kit comes early in the dependency chain. It being broken means that
we can’t cross-compile gnutls, curl and other packages.

However, there is some kind of dependency cycle when using the meson build
system (modules? Packages? I don’t know). Can someone help me sort that out?

Best regards,

Vivien

Vivien Kraus (2):
  gnu: gcc: do not build gcov.
  NOT WORKING gnu: p11-kit: switch to meson-build-system.

 gnu/packages/gcc.scm |  4 ++++
 gnu/packages/tls.scm | 19 ++++---------------
 2 files changed, 8 insertions(+), 15 deletions(-)


base-commit: a6d2b54d3920d8858b5b36e4e4364088ed340107
-- 
2.39.2




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

* [bug#62916] [PATCH v2 1/1] gnu: p11-kit: fix build on mingw.
  2023-04-25 16:16     ` [bug#62916] [PATCH v2 0/1] Fix p11-kit build system for mingw Vivien Kraus via Guix-patches via
@ 2023-04-25 15:50       ` Vivien Kraus via Guix-patches via
  2023-04-25 21:33       ` [bug#62916] [PATCH v3 0/1] Simpler fix for p11-kit@mingw Vivien Kraus via Guix-patches via
  1 sibling, 0 replies; 8+ messages in thread
From: Vivien Kraus via Guix-patches via @ 2023-04-25 15:50 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 62916

* gnu/packages/patches/p11-kit-fix-build-system-for-mingw.patch: New patch. It
makes sure that all symbols are defined when linking objects.
* gnu/packages/tls.scm (p11-kit) [on target-mingw?] [phase
'apply-mingw-patch]: New phase, similar to what’s done with hurd.
* gnu/packages/tls.scm (p11-kit) [native-inputs]: also add the autotools on mingw.
---
 gnu/local.mk                                  |   3 +-
 .../p11-kit-fix-build-system-for-mingw.patch  | 108 ++++++++++++++++++
 gnu/packages/tls.scm                          |  14 ++-
 3 files changed, 123 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/p11-kit-fix-build-system-for-mingw.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 66dd240ba9..355c09caa4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1696,7 +1696,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/sqlite-hurd.patch			\
   %D%/packages/patches/strace-readlink-tests.patch		\
   %D%/packages/patches/sunxi-tools-remove-sys-io.patch	\
-  %D%/packages/patches/p11-kit-hurd.patch			\
+  %D%/packages/patches/p11-kit-hurd.patch		        \
+  %D%/packages/patches/p11-kit-fix-build-system-for-mingw.patch \
   %D%/packages/patches/patch-hurd-path-max.patch		\
   %D%/packages/patches/perl-5.14-autosplit-default-time.patch	\
   %D%/packages/patches/perl-5.14-module-pluggable-search.patch	\
diff --git a/gnu/packages/patches/p11-kit-fix-build-system-for-mingw.patch b/gnu/packages/patches/p11-kit-fix-build-system-for-mingw.patch
new file mode 100644
index 0000000000..cc02fdf1b3
--- /dev/null
+++ b/gnu/packages/patches/p11-kit-fix-build-system-for-mingw.patch
@@ -0,0 +1,108 @@
+From e350540c9e2259e2f66cbaf7c6dc347f03acac40 Mon Sep 17 00:00:00 2001
+From: Vivien Kraus <vivien@planete-kraus.eu>
+Date: Tue, 25 Apr 2023 17:41:47 +0200
+Subject: [PATCH] Fix the build system to avoid undefined references on mingw.
+
+---
+ p11-kit/Makefile.am | 23 ++++++++++++-----------
+ trust/Makefile.am   |  5 ++---
+ 2 files changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/p11-kit/Makefile.am b/p11-kit/Makefile.am
+index 7fe7a6c..017edd3 100644
+--- a/p11-kit/Makefile.am
++++ b/p11-kit/Makefile.am
+@@ -13,6 +13,7 @@ COMMON_SRCS = \
+ 	p11-kit/conf.c p11-kit/conf.h \
+ 	p11-kit/iter.c \
+ 	p11-kit/log.c p11-kit/log.h \
++	p11-kit/lists.c \
+ 	p11-kit/filter.c p11-kit/filter.h \
+ 	p11-kit/modules.c p11-kit/modules.h \
+ 	p11-kit/pkcs11.h \
+@@ -80,6 +81,7 @@ COMMON_CFLAGS = \
+ COMMON_LIBS = \
+ 	libp11-common.la \
+ 	libp11-library.la \
++	libp11-tool.la \
+ 	$(LIBFFI_LIBS) \
+ 	$(LTLIBINTL) \
+ 	$(NULL)
+@@ -125,7 +127,8 @@ libp11_kit_testable_la_SOURCES = \
+ 	$(libp11_kit_internal_la_SOURCES) \
+ 	$(libp11_kit_la_SOURCES) \
+ 	$(NULL)
+-libp11_kit_testable_la_LIBADD = $(COMMON_LIBS)
++libp11_kit_testable_la_LIBADD = $(COMMON_LIBS) \
++	libp11-tool.la
+ 
+ pkcs11_gnu_sources = \
+ 	p11-kit/uri.gnu.c \
+@@ -238,14 +241,12 @@ EXTRA_DIST += \
+ bin_PROGRAMS += p11-kit/p11-kit
+ 
+ p11_kit_p11_kit_SOURCES = \
+-	p11-kit/lists.c \
+ 	p11-kit/p11-kit.c \
+ 	$(NULL)
+ 
+ p11_kit_p11_kit_LDADD = \
+-	libp11-kit.la \
+-	libp11-tool.la \
+-	libp11-common.la \
++	libp11-kit-internal.la \
++        $(COMMON_LIBS) \
+ 	$(LTLIBINTL) \
+ 	$(NULL)
+ 
+@@ -257,12 +258,12 @@ private_PROGRAMS += p11-kit/p11-kit-remote
+ 
+ p11_kit_p11_kit_remote_SOURCES = \
+ 	p11-kit/remote.c \
++	$(libp11_kit_la_SOURCES) \
+ 	$(NULL)
+ 
+ p11_kit_p11_kit_remote_LDADD = \
+-	libp11-tool.la \
+-	libp11-common.la \
+-	libp11-kit.la \
++	libp11-kit-internal.la \
++        $(COMMON_LIBS) \
+ 	$(NULL)
+ 
+ check_PROGRAMS += p11-kit/p11-kit-remote-testable
+@@ -278,12 +279,12 @@ private_PROGRAMS += p11-kit/p11-kit-server
+ 
+ p11_kit_p11_kit_server_SOURCES = \
+ 	p11-kit/server.c \
++	$(libp11_kit_la_SOURCES) \
+ 	$(NULL)
+ 
+ p11_kit_p11_kit_server_LDADD = \
+-	libp11-tool.la \
+-	libp11-common.la \
+-	libp11-kit.la \
++	libp11-kit-internal.la \
++        $(COMMON_LIBS) \
+ 	$(LIBSYSTEMD_LIBS) \
+ 	$(NULL)
+ 
+diff --git a/trust/Makefile.am b/trust/Makefile.am
+index 6ff5d12..f5d87f5 100644
+--- a/trust/Makefile.am
++++ b/trust/Makefile.am
+@@ -84,9 +84,8 @@ bin_PROGRAMS += trust/trust
+ 
+ trust_trust_LDADD = \
+ 	libtrust-data.la \
+-	libp11-kit.la \
+-	libp11-common.la \
+-	libp11-tool.la \
++	libp11-kit-internal.la \
++        $(COMMON_LIBS) \
+ 	$(LTLIBINTL) \
+ 	$(LIBTASN1_LIBS) \
+ 	$(HASH_LIBS) \
+-- 
+2.39.2
+
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index e0da7757e0..2cd43c6957 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -153,7 +153,7 @@ (define-public p11-kit
     (build-system gnu-build-system)
     (native-inputs
      (append (list pkg-config)
-             (if (hurd-target?)
+             (if (or (target-mingw?) (hurd-target?))
                  (list autoconf automake gettext-minimal libtool)
                  '())))
     (inputs
@@ -179,6 +179,18 @@ (define patch
                                     (lambda _
                                       (invoke "autoreconf" "-fiv"))))
                                #~())
+                        #$@(if (target-mingw?)
+                               #~((add-after 'unpack 'apply-mingw-patch
+                                    (lambda* (#:key inputs #:allow-other-keys)
+                                      (define patch
+                                        #$(local-file
+                                           (search-patch "p11-kit-fix-build-system-for-mingw.patch")))
+                                      (invoke "patch" "-p1" "--batch" "-i"
+                                              patch)))
+                                  (replace 'bootstrap
+                                    (lambda _
+                                      (invoke "autoreconf" "-fiv"))))
+                               #~())
                         (add-before 'check 'prepare-tests
                           (lambda _
                             ;; "test-runtime" expects XDG_RUNTIME_DIR to be set up
-- 
2.39.2




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

* [bug#62916] [PATCH v3 1/1] gnu: p11-kit: fix build on mingw.
  2023-04-25 21:33       ` [bug#62916] [PATCH v3 0/1] Simpler fix for p11-kit@mingw Vivien Kraus via Guix-patches via
@ 2023-04-25 15:50         ` Vivien Kraus via Guix-patches via
  0 siblings, 0 replies; 8+ messages in thread
From: Vivien Kraus via Guix-patches via @ 2023-04-25 15:50 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 62916

* gnu/packages/patches/p11-kit-fix-build-system-for-mingw.patch: New patch. It
makes sure that all symbols are defined when linking objects.
* gnu/packages/tls.scm (p11-kit) [on target-mingw?] [phase
'apply-mingw-patch]: New phase, similar to what’s done with hurd.
* gnu/packages/tls.scm (p11-kit) [native-inputs]: also add the autotools on mingw.
---
 gnu/packages/tls.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index e0da7757e0..38126e2326 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -165,7 +165,10 @@ (define-public p11-kit
      (list #:configure-flags
            ;; Use the default certificates so that users such as flatpak
            ;; find them.  See <https://issues.guix.gnu.org/49957>.
-           #~'("--with-trust-paths=/etc/ssl/certs/ca-certificates.crt")
+           #~'("--with-trust-paths=/etc/ssl/certs/ca-certificates.crt"
+               #$@(if (target-mingw?)
+                      #~("--disable-ld-version-script")
+                      #~()))
            #:phases #~(modify-phases %standard-phases
                         #$@(if (hurd-target?)
                                #~((add-after 'unpack 'apply-hurd-patch
-- 
2.39.2




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

* [bug#62916] [PATCH core-updates 0/2] Try to fix p11-kit compilation to mingw
  2023-04-17 22:09 ` [bug#62916] [PATCH core-updates 1/2] gnu: gcc: do not build gcov Vivien Kraus via Guix-patches via
@ 2023-04-25 16:11   ` Ludovic Courtès
  2023-04-25 16:16     ` [bug#62916] [PATCH v2 0/1] Fix p11-kit build system for mingw Vivien Kraus via Guix-patches via
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2023-04-25 16:11 UTC (permalink / raw)
  To: Vivien Kraus; +Cc: 62916

Hi,

Vivien Kraus <vivien@planete-kraus.eu> skribis:

> * gnu/packages/gcc.scm (gcc-configure-flags-for-triplet): Disable gcov when
> targetting mingw.

Pushed this one as 74038cf66e3a8cdcd9d97a81d9176c3cdefdaaf7.

The p11-kit story isn’t good, but I’m not sure how to address it.  When
we find a way, we can add a feature branch to rebuild everything that
depends on it though.

Thanks!

Ludo’.




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

* [bug#62916] [PATCH v2 0/1] Fix p11-kit build system for mingw
  2023-04-25 16:11   ` [bug#62916] [PATCH core-updates 0/2] Try to fix p11-kit compilation to mingw Ludovic Courtès
@ 2023-04-25 16:16     ` Vivien Kraus via Guix-patches via
  2023-04-25 15:50       ` [bug#62916] [PATCH v2 1/1] gnu: p11-kit: fix build on mingw Vivien Kraus via Guix-patches via
  2023-04-25 21:33       ` [bug#62916] [PATCH v3 0/1] Simpler fix for p11-kit@mingw Vivien Kraus via Guix-patches via
  0 siblings, 2 replies; 8+ messages in thread
From: Vivien Kraus via Guix-patches via @ 2023-04-25 16:16 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 62916

Hi!

> The p11-kit story isn’t good, but I’m not sure how to address it.  When
> we find a way, we can add a feature branch to rebuild everything that
> depends on it though.

I just found out how to fix the makefiles, and the moment I was about to send
the patch, I received your reply. This V2 does not fix the core issue, but at
least it builds on mingw now! The core problem in the build system is that
every auxiliary program is a mix of re-compiled common sources, static
libraries, and the main shared object. I decided to use static libraries
everywhere I can. This is gross but at least it links now, so this is a W I
guess?

What do you think?

Best regards,

Vivien

Vivien Kraus (1):
  gnu: p11-kit: fix build on mingw.

 gnu/local.mk                                  |   3 +-
 .../p11-kit-fix-build-system-for-mingw.patch  | 108 ++++++++++++++++++
 gnu/packages/tls.scm                          |  14 ++-
 3 files changed, 123 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/p11-kit-fix-build-system-for-mingw.patch


base-commit: 74038cf66e3a8cdcd9d97a81d9176c3cdefdaaf7
-- 
2.39.2




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

* [bug#62916] [PATCH v3 0/1] Simpler fix for p11-kit@mingw
  2023-04-25 16:16     ` [bug#62916] [PATCH v2 0/1] Fix p11-kit build system for mingw Vivien Kraus via Guix-patches via
  2023-04-25 15:50       ` [bug#62916] [PATCH v2 1/1] gnu: p11-kit: fix build on mingw Vivien Kraus via Guix-patches via
@ 2023-04-25 21:33       ` Vivien Kraus via Guix-patches via
  2023-04-25 15:50         ` [bug#62916] [PATCH v3 1/1] gnu: p11-kit: fix build on mingw Vivien Kraus via Guix-patches via
  1 sibling, 1 reply; 8+ messages in thread
From: Vivien Kraus via Guix-patches via @ 2023-04-25 21:33 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 62916

I noticed that the only problem was the way to generate the list of symbols
for the DLL. So I don’t have to fix anything in the build system.

Vivien Kraus (1):
  gnu: p11-kit: fix build on mingw.

 gnu/packages/tls.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


base-commit: 74038cf66e3a8cdcd9d97a81d9176c3cdefdaaf7
-- 
2.39.2




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

end of thread, other threads:[~2023-04-26  0:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-17 22:20 [bug#62916] [PATCH core-updates 0/2] Try to fix p11-kit compilation to mingw Vivien Kraus via Guix-patches via
2023-04-17 22:09 ` [bug#62916] [PATCH core-updates 1/2] gnu: gcc: do not build gcov Vivien Kraus via Guix-patches via
2023-04-25 16:11   ` [bug#62916] [PATCH core-updates 0/2] Try to fix p11-kit compilation to mingw Ludovic Courtès
2023-04-25 16:16     ` [bug#62916] [PATCH v2 0/1] Fix p11-kit build system for mingw Vivien Kraus via Guix-patches via
2023-04-25 15:50       ` [bug#62916] [PATCH v2 1/1] gnu: p11-kit: fix build on mingw Vivien Kraus via Guix-patches via
2023-04-25 21:33       ` [bug#62916] [PATCH v3 0/1] Simpler fix for p11-kit@mingw Vivien Kraus via Guix-patches via
2023-04-25 15:50         ` [bug#62916] [PATCH v3 1/1] gnu: p11-kit: fix build on mingw Vivien Kraus via Guix-patches via
2023-04-17 22:17 ` [bug#62916] [PATCH core-updates 2/2] NOT WORKING gnu: p11-kit: switch to meson-build-system Vivien Kraus via Guix-patches via

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.