Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in compilation, possible regression with flatpak 0.11.8.1 #1770

Closed
RyuzakiKK opened this issue Jun 10, 2018 · 5 comments
Closed

Error in compilation, possible regression with flatpak 0.11.8.1 #1770

RyuzakiKK opened this issue Jun 10, 2018 · 5 comments

Comments

@RyuzakiKK
Copy link
Contributor

Linux distribution and version

Arch Linux

$ uname -a
Linux ryuzaki 4.16.13-2-ARCH #1 SMP PREEMPT Fri Jun 1 18:46:11 UTC 2018 x86_64 GNU/Linux

and Ubuntu 18.04

Flatpak version

0.11.8.1

Description of the problem

Error compiling this manifest https://github.com/flathub/org.gnome.Keysign/blob/master/org.gnome.Keysign.yml

========================================================================
Building module setuptools in /home/ryuzaki/secuare_temp/ryu/gnome-keysign/flatpak/.flatpak-builder/build/setuptools-3
========================================================================
FB: Running: tar xf /home/ryuzaki/secuare_temp/ryu/gnome-keysign/flatpak/.flatpak-builder/downloads/475ce28993d7cb75335942525b9fac79f7431a7f6e8a0079c0f2680641379481/setuptools-26.1.1.tar.gz --no-same-owner --strip-components=1 -z
Running: python2 setup.py build
FB: Running: flatpak build --die-with-parent --nofilesystem=host --filesystem=/home/ryuzaki/secuare_temp/ryu/gnome-keysign/flatpak/.flatpak-builder/build/setuptools-3 --bind-mount=/run/build/setuptools=/home/ryuzaki/secuare_temp/ryu/gnome-keysign/flatpak/.flatpak-builder/build/setuptools-3 --build-dir=/run/build/setuptools --bind-mount=/run/ccache=/home/ryuzaki/secuare_temp/ryu/gnome-keysign/flatpak/.flatpak-builder/ccache --env=V=1 --env=CCACHE_DIR=/run/ccache/disabled --env=PATH=/app/bin:/usr/bin '--env=CFLAGS=-O2 -g' '--env=CXXFLAGS=-O2 -g' --env=LD_LIBRARY_PATH=/app/lib --env=PKG_CONFIG_PATH=/app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig --env=FLATPAK_BUILDER_N_JOBS=12 /home/ryuzaki/secuare_temp/ryu/gnome-keysign/flatpak/.flatpak-builder/rofiles/rofiles-PEpDrM /bin/sh -c 'python2 setup.py build'
Error: module setuptools: Child process killed by signal 11
FB: unmounting rofiles-fuse /home/ryuzaki/secuare_temp/ryu/gnome-keysign/flatpak/.flatpak-builder/rofiles/rofiles-PEpDrM

With flatpak 0.11.7 I was able to successfully build it.

Steps to reproduce

  1. clone this repo https://github.com/flathub/org.gnome.Keysign
  2. run flatpak-builder: $ flatpak-builder -v --force-clean --repo=~/fb.repo ~/fpbuilder org.gnome.Keysign.yml
@thinktainer
Copy link

Further to this, even the instructions from building your first Flatpak fail with the same error.

@barthalion
Copy link
Member

Stack trace:

Stack trace of thread 8364:
#0 0x0000564686d50790 flatpak_context_allows_features (flatpak)
#1 0x0000564686d0e46f flatpak_builtin_build (flatpak)
#2 0x0000564686cfda6a flatpak_run (flatpak)
#3 0x00007fcda222106b __libc_start_main (libc.so.6)
#4 0x0000564686cfde2a _start (flatpak)

@barthalion
Copy link
Member

barthalion commented Jun 11, 2018

Looks like app_context at app/flatpak-builtins-build.c:424 is NULL. I'll submit a patch in a minute.

@barthalion
Copy link
Member

diff --git a/app/flatpak-builtins-build.c b/app/flatpak-builtins-build.c
index 96b9ef2b..d13f7b43 100644
--- a/app/flatpak-builtins-build.c
+++ b/app/flatpak-builtins-build.c
@@ -421,6 +421,13 @@ flatpak_builtin_build (int argc, char **argv, GCancellable *cancellable, GError
   if (custom_usr)
     run_flags |= FLATPAK_RUN_FLAG_WRITABLE_ETC;
 
+
+  app_context = flatpak_app_compute_permissions (metakey,
+                                                 runtime_metakey,
+                                                 error);
+  if (app_context == NULL)
+    return FALSE;
+
   run_flags |= flatpak_context_get_run_flags (app_context);
 
   /* Unless manually specified, we disable dbus proxy */
@@ -496,12 +503,6 @@ flatpak_builtin_build (int argc, char **argv, GCancellable *cancellable, GError
                           "--bind", flatpak_file_get_path_cached (var_tmp), "/var/tmp",
                           NULL);
 
-  app_context = flatpak_app_compute_permissions (metakey,
-                                                 runtime_metakey,
-                                                 error);
-  if (app_context == NULL)
-    return FALSE;
-
   flatpak_context_allow_host_fs (app_context);
   flatpak_context_merge (app_context, arg_context);

While it "fixes" the sigserv, it still fails to launch the command with error: Unable to start app. @alexlarsson any tips what's wrong?

alexlarsson added a commit to alexlarsson/flatpak that referenced this issue Jun 11, 2018
This fixes a crash dereferencing a null app_context.

Fixes flatpak#1770
@hughsie
Copy link
Collaborator

hughsie commented Jun 11, 2018

Adding to the fire, this is causing the fwupd CI to fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants