Gnome Builder doesn't install.

  • Done
  • quality assurance status badge
Details
5 participants
  • Leo Prikler
  • Leo Famulari
  • Marinus Savoritias
  • Mark H Weaver
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Marinus Savoritias
Severity
normal
M
M
Marinus Savoritias wrote on 9 Sep 2020 21:04
(address . bug-guix@gnu.org)
86a353ec-1191-bb1d-dfe1-2a6366535773@disroot.org
Gnome builder fails to install with this message:

swzg5y9hnggp7aghz8q2l-gnome-builder-3.36.1.drv' failed with exit code 1
build of
/gnu/store/w2lzd0dc6qbswzg5y9hnggp7aghz8q2l-gnome-builder-3.36.1.drv failed

The message in the log is this:

ld:
/gnu/store/sh764z2hm5qcr4cqx4amcipcbkvg76i2-libselinux-3.0/lib/libselinux.a(setrans_client.o):
relocation R_X86_64_32 against `.rodata.str1.8' can not be used when
making a PIE object; recompile with -fPIE
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
command "ninja" "-j" "4" failed with status 1

Marinus Savoritias
L
L
Leo Prikler wrote on 10 Sep 2020 18:58
(address . 43296@debbugs.gnu.org)
20200910165827.13274-1-leo.prikler@student.tugraz.at
Hi Marinus,

I've noticed your report and quickly found a rather crude way of fixing it.
I'm not sure, why meson tries to link gnome-builder statically against selinux
in the first place, but it should do the job.

Regards,
Leo


Leo Prikler (1):
gnu: Fix gnome-builder build.

gnu/packages/gnome.scm | 6 ++++++
1 file changed, 6 insertions(+)

--
2.28.0
L
L
Leo Prikler wrote on 10 Sep 2020 18:58
[PATCH 1/1] gnu: Fix gnome-builder build.
(address . 43296@debbugs.gnu.org)
20200910165827.13274-2-leo.prikler@student.tugraz.at
As reported in #43296, gnome-builder tries to be linked against the static
version of libselinux (propagated through glib/gio), failing to do so, as it
also wants to be a PIE. To keep the PIE, link it against the dynamic library.
* gnu/packages/gnome.scm (gnome-builder)[#:phases]: Add 'fix-ninja.
---
gnu/packages/gnome.scm | 6 ++++++
1 file changed, 6 insertions(+)

Toggle diff (19 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 31c5b0319c..ff4cb8a383 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -11336,6 +11336,12 @@ libraries. Applications do not need to be recompiled--or even restarted.")
(string-append (assoc-ref inputs "python-pygobject")
"/lib")))
#t))
+ (add-after 'configure 'fix-ninja
+ (lambda _
+ ;; #43296: meson(?) incorrectly assumes we want to link
+ ;; this PIE against a static libselinux.
+ (substitute* "build.ninja"
+ (("libselinux\\.a") "libselinux.so"))))
(add-before 'check 'pre-check
(lambda _
(system "Xvfb :1 &")
--
2.28.0
M
M
Mark H Weaver wrote on 10 Sep 2020 20:08
87k0x1tsgh.fsf@netris.org
Hi,

Leo Prikler <leo.prikler@student.tugraz.at> writes:

Toggle quote (8 lines)
> As reported in #43296, gnome-builder tries to be linked against the static
> version of libselinux (propagated through glib/gio), failing to do so, as it
> also wants to be a PIE. To keep the PIE, link it against the dynamic library.
> * gnu/packages/gnome.scm (gnome-builder)[#:phases]: Add 'fix-ninja.
> ---
> gnu/packages/gnome.scm | 6 ++++++
> 1 file changed, 6 insertions(+)

Thanks for this! One comment, though:

Toggle quote (18 lines)
> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
> index 31c5b0319c..ff4cb8a383 100644
> --- a/gnu/packages/gnome.scm
> +++ b/gnu/packages/gnome.scm
> @@ -11336,6 +11336,12 @@ libraries. Applications do not need to be recompiled--or even restarted.")
> (string-append (assoc-ref inputs "python-pygobject")
> "/lib")))
> #t))
> + (add-after 'configure 'fix-ninja
> + (lambda _
> + ;; #43296: meson(?) incorrectly assumes we want to link
> + ;; this PIE against a static libselinux.
> + (substitute* "build.ninja"
> + (("libselinux\\.a") "libselinux.so"))))
> (add-before 'check 'pre-check
> (lambda _
> (system "Xvfb :1 &")

This new phase should end by returning #t.

Thanks,
Mark
R
R
Ricardo Wurmus wrote on 10 Sep 2020 20:23
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 43296@debbugs.gnu.org)
87a6xx4hja.fsf@elephly.net
Leo Prikler <leo.prikler@student.tugraz.at> writes:

Toggle quote (23 lines)
> As reported in #43296, gnome-builder tries to be linked against the static
> version of libselinux (propagated through glib/gio), failing to do so, as it
> also wants to be a PIE. To keep the PIE, link it against the dynamic library.
> * gnu/packages/gnome.scm (gnome-builder)[#:phases]: Add 'fix-ninja.
> ---
> gnu/packages/gnome.scm | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
> index 31c5b0319c..ff4cb8a383 100644
> --- a/gnu/packages/gnome.scm
> +++ b/gnu/packages/gnome.scm
> @@ -11336,6 +11336,12 @@ libraries. Applications do not need to be recompiled--or even restarted.")
> (string-append (assoc-ref inputs "python-pygobject")
> "/lib")))
> #t))
> + (add-after 'configure 'fix-ninja
> + (lambda _
> + ;; #43296: meson(?) incorrectly assumes we want to link
> + ;; this PIE against a static libselinux.
> + (substitute* "build.ninja"
> + (("libselinux\\.a") "libselinux.so"))))

Please end the phase on #t, because “substitute*” has no specified
return value.

Other than that it looks good to me, thanks!

--
Ricardo
L
L
Leo Prikler wrote on 10 Sep 2020 20:26
[PATCH] gnu: Fix gnome-builder build.
(address . 43296@debbugs.gnu.org)
20200910182608.15501-1-leo.prikler@student.tugraz.at
As reported in #43296, gnome-builder tries to be linked against the static
version of libselinux (propagated through glib/gio), failing to do so, as it
also wants to be a PIE. To keep the PIE, link it against the dynamic library.
* gnu/packages/gnome.scm (gnome-builder)[#:phases]: Add 'fix-ninja.
---
gnu/packages/gnome.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 31c5b0319c..bc8e28becf 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -11336,6 +11336,13 @@ libraries. Applications do not need to be recompiled--or even restarted.")
(string-append (assoc-ref inputs "python-pygobject")
"/lib")))
#t))
+ (add-after 'configure 'fix-ninja
+ (lambda _
+ ;; #43296: meson(?) incorrectly assumes we want to link
+ ;; this PIE against a static libselinux.
+ (substitute* "build.ninja"
+ (("libselinux\\.a") "libselinux.so"))
+ #t))
(add-before 'check 'pre-check
(lambda _
(system "Xvfb :1 &")
--
2.28.0
L
L
Leo Famulari wrote on 31 Oct 2020 17:56
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 43296-done@debbugs.gnu.org)
20201031165633.GA24442@jasmine.lan
On Thu, Sep 10, 2020 at 08:26:10PM +0200, Leo Prikler wrote:
Toggle quote (5 lines)
> As reported in #43296, gnome-builder tries to be linked against the static
> version of libselinux (propagated through glib/gio), failing to do so, as it
> also wants to be a PIE. To keep the PIE, link it against the dynamic library.
> * gnu/packages/gnome.scm (gnome-builder)[#:phases]: Add 'fix-ninja.

Thanks! I tweaked the commit message and pushed as
9c69fec08e286f7486e64c2aa3110fa34974d15d
Closed
?