[core-updates] Meson-build system fails to install license

  • Done
  • quality assurance status badge
Details
2 participants
  • Dariqq
  • Ludovic Courtès
Owner
unassigned
Submitted by
Dariqq
Severity
normal
D
D
Dariqq wrote on 17 May 11:26 +0200
Meson-build system fails to install license files
(address . bug-guix@gnu.org)
3ec197ca-3e22-4108-8277-9960a4be88be@posteo.net
Hi Guix,

I was trying to update a package using meson build system to its newest
version and noticed in the build log

starting phase `install-license-files'
installing 0 license files from '.'
phase `install-license-files' succeeded after 0.0 seconds

Also other packages built using meson don't seem to have license files
in the output.

I think the problem is that the "." directory is the "build" directory
and not the source directory because in meson configure phase we change
directory to the build-dir.

The install-license-files function has an argument for specifying
out-of-source builds and calling it with that set to #t seems to be able
to find license files in the source directory in my limited testing.

Another option would be to specify the build dir in the ninja
invocations without changing to it.

As meson only supports out-of-source builds I think this should be
changed though I am unsure how to best do this.
L
L
Ludovic Courtès wrote on 25 May 11:37 +0200
(name . Dariqq)(address . dariqq@posteo.net)(address . 70999@debbugs.gnu.org)
87plta2px1.fsf@gnu.org
Hi Dariqq,

Dariqq <dariqq@posteo.net> skribis:

Toggle quote (5 lines)
> The install-license-files function has an argument for specifying
> out-of-source builds and calling it with that set to #t seems to be
> able to find license files in the source directory in my limited
> testing.

Yes, ‘meson-build-system’ should pass #:out-of-source? #t exactly like
‘cmake-build-system’ does. That should solve the problem.

Thanks,
Ludo’.
D
D
Dariqq wrote on 25 May 16:02 +0200
[PATCH] build-system/meson: Add #:out-of-source? argument to build system.
(address . 70999@debbugs.gnu.org)
55230dcd23f65c3caa3ea61ed2b18c672b389211.1716645739.git.dariqq@posteo.net
Meson currently supports only out-of-source builds. Add the argument out-of-source? with default to #t such that the install-license-files phase searches for the license files in the source directory.

* guix/build-system/meson.scm (meson-build): Add out-of-source? argument.
(meson-cross-build): Likewise.

Change-Id: Ib59d9d93b34fd567f05f5f9a10293f6ab924e399
---
I have tested this with the tio package (both natively building and cross compiling) and seems to work. This will cause a lot of rebuild!
For the position of the argument I've put it above build-type to match the order in cmake-build-system.

guix/build-system/meson.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

Toggle diff (41 lines)
diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm
index bf9ca15ecc..6c085fa1fe 100644
--- a/guix/build-system/meson.scm
+++ b/guix/build-system/meson.scm
@@ -176,6 +176,7 @@ (define* (meson-build name inputs
(outputs '("out"))
(configure-flags ''())
(search-paths '())
+ (out-of-source? #t)
(build-type "debugoptimized")
(tests? #t)
(test-options ''())
@@ -225,6 +226,7 @@ (define* (meson-build name inputs
#$(if (pair? configure-flags)
(sexp->gexp configure-flags)
configure-flags)
+ #:out-of-source? #$out-of-source?
#:build-type #$build-type
#:tests? #$tests?
#:test-options #$(sexp->gexp test-options)
@@ -257,7 +259,7 @@ (define* (meson-cross-build name
(configure-flags ''())
(search-paths '())
(native-search-paths '())
-
+ (out-of-source? #t)
(build-type "debugoptimized")
(tests? #f)
(test-options ''())
@@ -338,6 +340,7 @@ (define* (meson-cross-build name
,@#$(if (pair? configure-flags)
(sexp->gexp configure-flags)
configure-flags))
+ #:out-of-source? #$out-of-source?
#:build-type #$build-type
#:tests? #$tests?
#:test-options #$(sexp->gexp test-options)

base-commit: 9756d9d6345fb142944261174453ab0a597cc2e7
--
2.41.0
D
D
Dariqq wrote on 26 Jun 17:34 +0200
control message for bug #70999
(address . control@debbugs.gnu.org)
de3e3370-ea6b-4a72-958c-94cee9859d29@posteo.net
retitle 70999 [core-updates] Meson-build system fails to install license
files
quit
D
D
Dariqq wrote on 6 Aug 21:50 +0200
(no subject)
bd7f0aff-6940-4118-90e9-c5e63f190f46@posteo.net
Closing as the patch was resent in #71785 assigned to guix-patches and
is now included in core-updates as commit
473590fc4cd9d5a833913ce3f7835eeedcecac21
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 70999@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 70999
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch