-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
[Bug]: Fails to compile with PyParsing >= 3.0.4 #4534
Comments
I assume the build is tripping on the variant-schema-compiler subproject since that uses pyparsing. So it might be worth opening an issue at https://gitlab.gnome.org/alexl/variant-schema-compiler/-/issues but we can leave this open too |
By removing It generates same result as pyparsing 2.4.7 for I'm not sure if flatpak has a convenient way to patch submodule. I also can't confirm it won't impact other parts of flatpak. At least I can build flatpak and run applications. |
We don't want to patch the submodule. We should just apply the patch to the variant-schema-compiler repo linked above, if it's correct, and then update the submodule so we get the patched version. |
The problem is I don't know. I just read some source code of variant-schema-compiler and pyparsing, guessing that one change in pyparsing 3.0.2 may be the reason. And it fixed my problem on my machine. But there are far more questions. Does this the only change need to be done? Will it impact other projects using this compiler? Will it break the function for people who use pyparsing prior 3.0.2? Only the author can answer these questions and decide the best solution. I'll leave it as a temporary workaround, for people who want to build flakpak with higher version pyparsing. |
Looks like we're not the only project to have whitespace-related issues with recent versions of PyParsing: pydot/pydot#277 (comment) (that comment is by the author/maintainer of pyparsing) |
I used |
More specifically, pyparsing/pyparsing@4ab17bb#diff-651b49e05968bd7f42614f05b7e9d94b30f52db27eb692ce20ef87e9799c624fR3392 is why I removed |
Removing
|
Fix available here: https://gitlab.gnome.org/alexl/variant-schema-compiler/-/merge_requests/11 |
This works with newer versions of pyparsing, while producing generated files common/flatpak-variant{,-impl}-private.h identical to those produced by the old variant-schema-compiler when using the pyparsing versions in Debian 10 and Debian 11. Backporting this commit allows older branches to be CI-tested successfully. Fixes #4534 (cherry picked from commit 6cb4a25) (cherry picked from commit a0d8a1d) [smcv: verified that this has no effect with older pyparsing versions]
This works with newer versions of pyparsing, while producing generated files common/flatpak-variant{,-impl}-private.h identical to those produced by the old variant-schema-compiler when using the pyparsing versions in Debian 10 and Debian 11. Backporting this commit allows older branches to be CI-tested successfully. Fixes #4534 (cherry picked from commit 6cb4a25) (cherry picked from commit a0d8a1d) [smcv: verified that this has no effect with older pyparsing versions]
This works with newer versions of pyparsing, while producing generated files common/flatpak-variant{,-impl}-private.h identical to those produced by the old variant-schema-compiler when using the pyparsing versions in Debian 10 and Debian 11. Backporting this commit allows older branches to be CI-tested successfully. Fixes flatpak#4534 (cherry picked from commit 6cb4a25) (cherry picked from commit a0d8a1d) (cherry picked from commit 1dbc175) [smcv: verified that this has no effect with older pyparsing versions]
This works with newer versions of pyparsing, while producing generated files common/flatpak-variant{,-impl}-private.h identical to those produced by the old variant-schema-compiler when using the pyparsing versions in Debian 10 and Debian 11. Backporting this commit allows older branches to be CI-tested successfully. Fixes flatpak#4534 (cherry picked from commit 6cb4a25) (cherry picked from commit a0d8a1d) (cherry picked from commit 1dbc175) [smcv: verified that this has no effect with older pyparsing versions]
This works with newer versions of pyparsing, while producing generated files common/flatpak-variant{,-impl}-private.h identical to those produced by the old variant-schema-compiler when using the pyparsing versions in Debian 10 and Debian 11. Backporting this commit allows older branches to be CI-tested successfully. Fixes #4534 (cherry picked from commit 6cb4a25) (cherry picked from commit a0d8a1d) (cherry picked from commit 1dbc175) [smcv: verified that this has no effect with older pyparsing versions]
Ever since this commit (pyparsing/pyparsing@4ab17bb55) variant-schema-compiler has failed to execute when used by Flatpak like this: $ variant-schema-compiler/variant-schema-compiler --outfile-header common/flatpak-variant-private.h --outfile common/flatpak-variant-impl-private.h --prefix var ./data/flatpak-variants.gv For some reason our use of leaveWhitespace() to ensure that a named type has a ' right before its name no longer works. But fortunately pyparsing has a Combine() which does exactly what we want. See flatpak/flatpak#4534 Fixes https://gitlab.gnome.org/alexl/variant-schema-compiler/-/issues/4
Checklist
Flatpak version
1.12.2-47-g4da815f3 (git describe --tags)
What Linux distribution are you using?
Other (specify below)
Linux distribution version
All distributions using PyParsing >= 3.0.4 are affected
What architecture are you using?
x86_64
How to reproduce
git clone https://github.com/flatpak/flatpak.git
cd flatpak
NOCONFIGURE=1 ./autogen.sh
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-static --with-system-bubblewrap --with-system-dbus-proxy --with-dbus-config-dir=/usr/share/dbus-1/system.d
make
Expected Behavior
Expected it to build successfully.
Actual Behavior
Fails to build near the start of
make
:Additional Information
Tested on both stable version 1.12.2 and the latest git checkout,
1.12.2-47-g4da815f3
.My only workaround was to downgrade PyParsing to 2.4.7, which works, however this is only a temporary workaround, not a permanent fix.
The text was updated successfully, but these errors were encountered: