After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 785898 - gdbus-codegen is broken in flatpak SDK
gdbus-codegen is broken in flatpak SDK
Status: RESOLVED NOTABUG
Product: glib
Classification: Platform
Component: gdbus
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2017-08-06 18:50 UTC by Christian Hergert
Modified: 2017-08-29 21:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
traceback (559 bytes, text/plain)
2017-08-06 18:50 UTC, Christian Hergert
Details

Description Christian Hergert 2017-08-06 18:50:51 UTC
Created attachment 357066 [details]
traceback

gdbus-codegen is currently broken when used from the org.gnome.Sdk//master branch. (It seems to be fine in the 3.24 branch).

Various GNOME newcomer projects such as gnome-calendar are currently broken from Builder using this. I see an error such as:
Comment 1 Philip Withnall 2017-08-07 08:30:42 UTC
Hmm, could this be a flatpak or SDK bug? The code in gdbus-codegen.in hasn’t significantly changed in years. I don’t have a suitable debugging environment set up for the SDK — could you drop some print()s into gdbus-codegen and see where the path calculations are going wrong?
Comment 2 Emmanuele Bassi (:ebassi) 2017-08-07 08:42:04 UTC
The only change that I can think of is that the nightly SDK builds have switched to Python 3 for the GLib tools (glib-mkenums, glib-genmarshal, gdbus-codegen).

It may be a case of not setting up the search paths appropriately in Builder.
Comment 3 Christian Hergert 2017-08-07 18:10:35 UTC
We mostly just run commands with "flatpak build" or "flatpak-builder --run" so I'm not sure what search paths we would need to setup?

(In reply to Philip Withnall from comment #1)
> Hmm, could this be a flatpak or SDK bug? The code in gdbus-codegen.in hasn’t
> significantly changed in years. I don’t have a suitable debugging
> environment set up for the SDK — could you drop some print()s into
> gdbus-codegen and see where the path calculations are going wrong?

It appears to me it's not using the proper site directories. I don't see PYTHONPATH or anything being set when we run our helpers at least.
Comment 4 Christian Hergert 2017-08-07 18:19:13 UTC
The command we are running from Builder that results in this error is:


flatpak build \
  --env=PATH=/app/bin:/bin:/usr/bin \
  --env=V=0 \
  --env=CCACHE_DIR=/home/christian/Projects/gnome-calendar/.flatpak-builder/ccache \
  --share=network \
  --nofilesystem=host \
  --filesystem=/home/christian/Projects/gnome-calendar \
  --filesystem=/home/christian/.var/app/org.gnome.Builder/cache/gnome-builder/builds/GNOME-Calendar/org.gnome.Calendar.json-eb93b20f94c42fa5b4b060b9bcb5ce7b72da7af5-local-flatpak-org.gnome.Platform-x86_64-master \
  --build-dir=/home/christian/.var/app/org.gnome.Builder/cache/gnome-builder/builds/GNOME-Calendar/org.gnome.Calendar.json-eb93b20f94c42fa5b4b060b9bcb5ce7b72da7af5-local-flatpak-org.gnome.Platform-x86_64-master \
  '--env=CFLAGS=-O2 -g' \
  '--env=CXXFLAGS=-O2 -g' \
  --env=V=1 \
  --env=NOCONFIGURE=1 \
  /home/christian/.var/app/org.gnome.Builder/cache/gnome-builder/flatpak/staging/GNOME-Calendar/flatpak:org.gnome.Platform-x86_64-master \
  make \
  V=0 \
  -j20 \
  all
Comment 5 Alexander Larsson 2017-08-29 14:58:42 UTC
I did some changes to make the master gnome-sdk build again, and with this updated I seem to be able to build gnome-calendary git master with:

 flatpak-builder app org.gnome.Calendar.json

Is this fixed now, or is the issue somehow specific to how gnome-builder calls out to build id?
Comment 6 Christian Hergert 2017-08-29 21:04:02 UTC
It looks like this was caused by our flatpak-subprocess-launcher-helper setting $PATH to "/app/bin:/bin:/usr/bin". It was executing /bin/gdbus-codegen which then could not load relative things correctly.

This is fixed in Builder commit 6376d739c00a79d1a7a0dec6e15b9012a021cfe5 by removing "/bin" from PATH. (Which is more close to "flatpak run org.gnome.Sdk" anyway).