Running update-webkitgtk-libs for the first time (after a clean build) fails with this: Flatpak package org.webkit.Platform/x86_64/0.3 not installed. Please update your SDK: Tools/Scripts/update-webkit-flatpak Traceback (most recent call last): File "Tools/Scripts/update-webkit-flatpak", line 28, in <module> sys.exit(WebkitFlatpak.load_from_args(["--update"] + sys.argv[1:]).run()) File "./Tools/flatpak/flatpakutils.py", line 901, in run return self.main() File "./Tools/flatpak/flatpakutils.py", line 893, in main toolchains = self.pack_toolchain(("gcc", "g++"), {"/usr/bin/c++": "/usr/bin/g++"}) File "./Tools/flatpak/flatpakutils.py", line 941, in pack_toolchain icc_version_filename, = re.findall(br'.*creating (.*)', tmpfile.read()) ValueError: need more than 0 values to unpack Died at Tools/Scripts/update-webkitgtk-libs line 28. However, if you re-run the same command twice then it works fine. But the toolchains are not generated. You have to manually re-generate them via the script webkit-flatpak
Created attachment 413635 [details] Patch
(In reply to Carlos Alberto Lopez Perez from comment #1) > Created attachment 413635 [details] > Patch Just tested it, indeed the error is gone when initializing an empty local repo.
Comment on attachment 413635 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=413635&action=review > Tools/flatpak/flatpakutils.py:948 > + if os.path.isfile(config['icecc_version'][compiler]): This function is called outside of the flatpak sandbox, IIUC, but checks paths inside it, so it might fail if the host gcc or clang paths are different.
(In reply to Philippe Normand from comment #3) > Comment on attachment 413635 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=413635&action=review > > > Tools/flatpak/flatpakutils.py:948 > > + if os.path.isfile(config['icecc_version'][compiler]): > > This function is called outside of the flatpak sandbox, IIUC, but checks > paths inside it, so it might fail if the host gcc or clang paths are > different. The paths it checks are the compiler toolchains that are stored under the build directory. For example in my system I have: $ cat WebKitBuild/UserFlatpak/webkit_flatpak_config.json {"icecc_version": {"gcc": "/home/clopez/webkit/WebKitBuild/Toolchains/webkit-sdk-gcc-50ae74637e7fa7354ee261bb26005238.tar.gz", "clang": "/home/clopez/webkit/WebKitBuild/Toolchains/webkit-sdk-clang-7db6a9f1a6756ad6906bac8bcc51fffc.tar.gz"}} AFAIK any path inside the build directory should be valid either inside or outside of the flatpak sandbox. Is there any use case where my assumption would be wrong?
Right, I forgot the paths there correspond to the host.
Committed r269949: <https://trac.webkit.org/changeset/269949> All reviewed patches have been landed. Closing bug and clearing flags on attachment 413635 [details].
<rdar://problem/71531183>