* [bug#74406] [PATCH 0/1] antlr4 package does not refer to java executable by full path
@ 2024-11-17 19:15 Rutherther via Guix-patches via
2024-11-17 19:17 ` [bug#74405] [PATCH 1/1] gnu: antlr4: Pass full path to java in bin executable Rutherther via Guix-patches via
2024-12-04 22:17 ` Rutherther
0 siblings, 2 replies; 9+ messages in thread
From: Rutherther via Guix-patches via @ 2024-11-17 19:15 UTC (permalink / raw)
To: 74406; +Cc: Rutherther, Julien Lepiller
Hello,
this seems to me like a bug - the package antlr4 refers
to "java" in bin/antlr4 that is produced. I think it should
refer to #$icedtea/bin/java. It seems to me quite probable
this was a mistake, since there was java written multiple
times in phases, where it's available in PATH automatically.
Rutherther (1):
gnu: antlr4: Pass full path to java in bin executable
gnu/packages/java.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
base-commit: d108a7aac2c51f21c55cb8ea8801629a97f5242a
--
2.46.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#74405] [PATCH 1/1] gnu: antlr4: Pass full path to java in bin executable
2024-11-17 19:15 [bug#74406] [PATCH 0/1] antlr4 package does not refer to java executable by full path Rutherther via Guix-patches via
@ 2024-11-17 19:17 ` Rutherther via Guix-patches via
2024-12-04 22:17 ` Rutherther
1 sibling, 0 replies; 9+ messages in thread
From: Rutherther via Guix-patches via @ 2024-11-17 19:17 UTC (permalink / raw)
To: 74405; +Cc: Rutherther, Julien Lepiller
The executable outputted by antlr4 package does not
refer to full path of java, but to standalone "java".
That means the package expects java to be in PATH.
Since it's an application, requiring java to run,
it should rather refer to full path of java executable
it was built with/for.
* gnu/packages/java.scm: (antrl4)[arguments]: Change "java" in bin/antlr4 for full path
Change-Id: I311b9ec54a90fc7251eb8fcb62b232e843853e64
---
gnu/packages/java.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index df57385ea7..8607b62bea 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -8866,13 +8866,14 @@ (define-public antlr4
(add-after 'install 'bin-install
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
- (bin (string-append (assoc-ref outputs "out") "/bin")))
+ (bin (string-append (assoc-ref outputs "out") "/bin"))
+ (java (search-input-file inputs "bin/java")))
(mkdir-p bin)
(with-output-to-file (string-append bin "/antlr4")
(lambda _
(display
(string-append "#!" (which "sh") "\n"
- "java -cp " jar "/antlr4.jar:"
+ java " -cp " jar "/antlr4.jar:"
(string-join
(apply
append
--
2.46.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [bug#74405] [PATCH 0/1] qt-build-system: Wrap with build variables to allow %outputs in arguments
@ 2024-12-04 22:17 ` Rutherther
0 siblings, 0 replies; 9+ messages in thread
From: Rutherther via Guix-patches via @ 2024-12-04 19:12 UTC (permalink / raw)
To: 74405
Cc: Rutherther, Rutherther, Maxim Cournoyer,
å®ææ¦
It is impossible to refer to %outputs in arguments like #:configure-flags
(ie. `(assoc-ref %outputs "out")` leads to unbound-variable %outputs).
I think the issue is in qt using different system than build systems such
as cmake or gnu. Since I am unsure about the reason for qt not having
the same structure, I am submitting this to guix devel for discussion,
as well as opening a patch in case this is fine to be merged. If not,
could someone please explain what the reason behind not adding
inputs and outputs is, and what is the alternative?
Regards,
Rutherther
Rutherther (1):
guix: qt: add inputs and outputs build variables in qt-build
guix/build-system/qt.scm | 54 +++++++++++++++++++++-------------------
1 file changed, 28 insertions(+), 26 deletions(-)
base-commit: 006679d1e6ca7acea0629b4f019c8cf89cde08be
--
2.46.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 0/1] qt-build-system: Wrap with build variables to allow %outputs in arguments
@ 2024-12-04 22:17 ` Rutherther
0 siblings, 0 replies; 9+ messages in thread
From: Rutherther @ 2024-12-04 22:17 UTC (permalink / raw)
To: guix-devel; +Cc: Rutherther
It is impossible to refer to %outputs in arguments like #:configure-flags
(ie. `(assoc-ref %outputs "out")` leads to unbound-variable %outputs).
I think the issue is in qt using different system than build systems such
as cmake or gnu. Since I am unsure about the reason for qt not having
the same structure, I am submitting this to guix devel for discussion,
as well as opening a patch in case this is fine to be merged. If not,
could someone please explain what the reason behind not adding
inputs and outputs is, and what is the alternative?
Regards,
Rutherther
Rutherther (1):
guix: qt: add inputs and outputs build variables in qt-build
guix/build-system/qt.scm | 54 +++++++++++++++++++++-------------------
1 file changed, 28 insertions(+), 26 deletions(-)
base-commit: 006679d1e6ca7acea0629b4f019c8cf89cde08be
--
2.46.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#74405] [PATCH 0/1] qt-build-system: Wrap with build variables to allow %outputs in arguments
2024-12-04 22:17 ` Rutherther
(?)
@ 2024-12-04 19:14 ` Rutherther via Guix-patches via
-1 siblings, 0 replies; 9+ messages in thread
From: Rutherther via Guix-patches via @ 2024-12-04 19:14 UTC (permalink / raw)
To: 74405
So sorry, I meant to make a new issue, but instead,
I accidentally sent it to this one thanks to mumi
being so easy to use, and not noticing I didn't switch
to a new issue. :(
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#74695] [PATCH 1/1] guix: qt: add inputs and outputs build variables in qt-build
2024-12-04 22:17 ` Rutherther
(?)
(?)
@ 2024-12-04 19:15 ` Rutherther via Guix-patches via
-1 siblings, 0 replies; 9+ messages in thread
From: Rutherther via Guix-patches via @ 2024-12-04 19:15 UTC (permalink / raw)
To: 74695
Cc: Rutherther, Maxim Cournoyer,
å®ææ¦
Qt build doesn't provide build-variables of inputs and outputs,
so it's not possible to refer to %outputs in arguments of
a package that uses qt-build-system. This patch unifies
qt-build-system's behavior with other build systems like
cmake-build-system or gnu-build-system.
* guix/build-system/qt.scm (qt-build): Wrap with with-build-variables to
provide variables to arguments
Change-Id: I65853a5831ce7b5dc7ebe10807c6e61bb89cab36
---
guix/build-system/qt.scm | 54 +++++++++++++++++++++-------------------
1 file changed, 28 insertions(+), 26 deletions(-)
diff --git a/guix/build-system/qt.scm b/guix/build-system/qt.scm
index d1f721c54e..5f9a5019ae 100644
--- a/guix/build-system/qt.scm
+++ b/guix/build-system/qt.scm
@@ -152,32 +152,34 @@ (define* (qt-build name inputs
(with-imported-modules imported-modules
#~(begin
(use-modules #$@(sexp->gexp modules))
- (qt-build #:source #+source
- #:system #$system
- #:outputs #$(outputs->gexp outputs)
- #:inputs #$(input-tuples->gexp inputs)
- #:search-paths '#$(sexp->gexp
- (map search-path-specification->sexp
- search-paths))
- #:phases #$(if (pair? phases)
- (sexp->gexp phases)
- phases)
- #:qtbase #+qtbase
- #:qt-wrap-excluded-outputs #$qt-wrap-excluded-outputs
- #:qt-wrap-excluded-inputs #$qt-wrap-excluded-inputs
- #:configure-flags #$configure-flags
- #:make-flags #$make-flags
- #:out-of-source? #$out-of-source?
- #:build-type #$build-type
- #:tests? #$tests?
- #:test-target #$test-target
- #:parallel-build? #$parallel-build?
- #:parallel-tests? #$parallel-tests?
- #:validate-runpath? #$validate-runpath?
- #:patch-shebangs? #$patch-shebangs?
- #:strip-binaries? #$strip-binaries?
- #:strip-flags #$strip-flags
- #:strip-directories #$strip-directories))))
+
+ #$(with-build-variables inputs outputs
+ #~(qt-build #:source #+source
+ #:system #$system
+ #:outputs %outputs
+ #:inputs %build-inputs
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
+ #:qtbase #+qtbase
+ #:qt-wrap-excluded-outputs #$qt-wrap-excluded-outputs
+ #:qt-wrap-excluded-inputs #$qt-wrap-excluded-inputs
+ #:configure-flags #$configure-flags
+ #:make-flags #$make-flags
+ #:out-of-source? #$out-of-source?
+ #:build-type #$build-type
+ #:tests? #$tests?
+ #:test-target #$test-target
+ #:parallel-build? #$parallel-build?
+ #:parallel-tests? #$parallel-tests?
+ #:validate-runpath? #$validate-runpath?
+ #:patch-shebangs? #$patch-shebangs?
+ #:strip-binaries? #$strip-binaries?
+ #:strip-flags #$strip-flags
+ #:strip-directories #$strip-directories)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
system #:graft? #f)))
--
2.46.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/1] qt-build-system: Wrap with build variables to allow %outputs in arguments
2024-12-04 22:17 ` Rutherther
` (2 preceding siblings ...)
(?)
@ 2024-12-05 6:18 ` John Kehayias via Development of GNU Guix and the GNU System distribution.
2024-12-05 7:35 ` Rutherther
-1 siblings, 1 reply; 9+ messages in thread
From: John Kehayias via Development of GNU Guix and the GNU System distribution. @ 2024-12-05 6:18 UTC (permalink / raw)
To: Rutherther; +Cc: guix-devel
Hi Rutherther,
On Wed, Dec 04, 2024 at 11:17 PM, Rutherther wrote:
> It is impossible to refer to %outputs in arguments like #:configure-flags
> (ie. `(assoc-ref %outputs "out")` leads to unbound-variable %outputs).
You should be able to use gexps, e.g. #$output (see
<https://guix.gnu.org/manual/devel/en/html_node/G_002dExpressions.html>
for more details). That is actually the preferred way now, though
there are still instances of assoc-ref.
I believe the commit in question is
<https://git.savannah.gnu.org/cgit/guix.git/commit?id=7d873f194ca69d6096d28d7a224ab78e83e34fe1>.
> I think the issue is in qt using different system than build systems such
> as cmake or gnu. Since I am unsure about the reason for qt not having
> the same structure, I am submitting this to guix devel for discussion,
> as well as opening a patch in case this is fine to be merged. If not,
> could someone please explain what the reason behind not adding
> inputs and outputs is, and what is the alternative?
>
Though perhaps you are getting at that you'd expect the older way to
still work? Perhaps qt-build purposefully left the older procedure
behind as it should have much fewer dependents (which may rely on the
old assoc-ref)?
Hope that helps! The short of it is to use gexps :)
John
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/1] qt-build-system: Wrap with build variables to allow %outputs in arguments
2024-12-05 6:18 ` [PATCH 0/1] qt-build-system: Wrap with build variables to allow %outputs in arguments John Kehayias via Development of GNU Guix and the GNU System distribution.
@ 2024-12-05 7:35 ` Rutherther
2024-12-15 2:56 ` Maxim Cournoyer
0 siblings, 1 reply; 9+ messages in thread
From: Rutherther @ 2024-12-05 7:35 UTC (permalink / raw)
To: John Kehayias; +Cc: guix-devel
Hi John,
thanks.
> You should be able to use gexps, e.g. #$output (see
> <https://guix.gnu.org/manual/devel/en/html_node/G_002dExpressions.html>
> for more details). That is actually the preferred way now, though
> there are still instances of assoc-ref.
> I believe the commit in question is
> <https://git.savannah.gnu.org/cgit/guix.git/commit?id=7d873f194ca69d6096d28d7a224ab78e83e34fe1>.
I've seen this commit before and saw that many of the build systems
in it had the inputs and outputs build variables added, so that's why I asked.
> Though perhaps you are getting at that you'd expect the older way to
> still work? Perhaps qt-build purposefully left the older procedure
> behind as it should have much fewer dependents (which may rely on the
> old assoc-ref)?
Yes, exactly, I wanted to know if this is purposefully left out, ie. for
the thing you are saying - less dependants, or if it was sort of a
mistake.
So is the goal to port everything to gexps eventually, and to get
rid of %outputs completely?
Regards,
Rutherther
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/1] qt-build-system: Wrap with build variables to allow %outputs in arguments
2024-12-05 7:35 ` Rutherther
@ 2024-12-15 2:56 ` Maxim Cournoyer
0 siblings, 0 replies; 9+ messages in thread
From: Maxim Cournoyer @ 2024-12-15 2:56 UTC (permalink / raw)
To: Rutherther; +Cc: John Kehayias, guix-devel
Hi,
Rutherther <rutherther@ditigal.xyz> writes:
[...]
>> Though perhaps you are getting at that you'd expect the older way to
>> still work? Perhaps qt-build purposefully left the older procedure
>> behind as it should have much fewer dependents (which may rely on the
>> old assoc-ref)?
>
> Yes, exactly, I wanted to know if this is purposefully left out, ie. for
> the thing you are saying - less dependants, or if it was sort of a
> mistake.
>
> So is the goal to port everything to gexps eventually, and to get
> rid of %outputs completely?
Yes.
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-12-15 2:57 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-17 19:15 [bug#74406] [PATCH 0/1] antlr4 package does not refer to java executable by full path Rutherther via Guix-patches via
2024-11-17 19:17 ` [bug#74405] [PATCH 1/1] gnu: antlr4: Pass full path to java in bin executable Rutherther via Guix-patches via
2024-12-04 19:12 ` [bug#74405] [PATCH 0/1] qt-build-system: Wrap with build variables to allow %outputs in arguments Rutherther via Guix-patches via
2024-12-04 22:17 ` Rutherther
2024-12-04 19:14 ` [bug#74405] " Rutherther via Guix-patches via
2024-12-04 19:15 ` [bug#74695] [PATCH 1/1] guix: qt: add inputs and outputs build variables in qt-build Rutherther via Guix-patches via
2024-12-05 6:18 ` [PATCH 0/1] qt-build-system: Wrap with build variables to allow %outputs in arguments John Kehayias via Development of GNU Guix and the GNU System distribution.
2024-12-05 7:35 ` Rutherther
2024-12-15 2:56 ` Maxim Cournoyer
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.