WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
232933
FindGObjectIntrospection.cmake: prefix variables obtained from pkg-config with PKG_CONFIG_SYSROOT_DIR
https://bugs.webkit.org/show_bug.cgi?id=232933
Summary
FindGObjectIntrospection.cmake: prefix variables obtained from pkg-config wit...
Alexander Kanavin
Reported
2021-11-10 02:46:30 PST
FindGObjectIntrospection.cmake: prefix variables obtained from pkg-config with PKG_CONFIG_SYSROOT_DIR
Attachments
Patch
(1.45 KB, patch)
2021-11-10 02:50 PST
,
Alexander Kanavin
no flags
Details
Formatted Diff
Diff
Patch
(1.83 KB, patch)
2022-02-16 13:12 PST
,
Alexander Kanavin
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Alexander Kanavin
Comment 1
2021-11-10 02:50:54 PST
Created
attachment 443789
[details]
Patch
Michael Catanzaro
Comment 2
2022-02-15 05:18:24 PST
Comment on
attachment 443789
[details]
Patch It took me a little while to convince myself that this was correct, but I suppose there's no way for cross-compilation to work otherwise, so OK. That said, not all pkg-config variables are paths, but you're prepending this to all of them, e.g. version numbers are now going to contain filesystem paths. Also, it's generally not appropriate to prepend this variable even to most filesystem paths: it only makes sense in this particular case because you're executing those binaries during the build itself. Now, because the macro is only used immediately below, we know that's not a problem with how it is currently used, but it is still a semantic problem that we need to solve before landing. You can fix it in either of two ways: you could rename the macro to indicate it is only supposed to be used to get paths to binaries for use during compilation (this might result in a weird name, _GIR_GET_ PKGCONFIG_VAR_BUT_ONLY_IF_ITS_A_PATH_TO_A_BINARY_THAT_WE_ARE_ABOUT_TO_EXECUTE does not sound very swell), or maybe it would be better to do the append later after calling the macro so that we can leave it as a generic macro for getting any variable. Either way would work.
Alexander Kanavin
Comment 3
2022-02-16 12:21:11 PST
A change has landed that removes the code altogether, so I need to check if this patch is still relevant, and rework accordingly.
Alexander Kanavin
Comment 4
2022-02-16 13:12:43 PST
Created
attachment 452238
[details]
Patch
Alexander Kanavin
Comment 5
2022-02-22 02:52:09 PST
Ping :)
Michael Catanzaro
Comment 6
2022-02-22 07:58:28 PST
Comment on
attachment 452238
[details]
Patch This looks fine to me, but Adrian mentioned something about not liking this. Adrian?
Alexander Kanavin
Comment 7
2022-04-04 11:09:19 PDT
Ping!
Adrian Perez
Comment 8
2022-04-05 15:11:38 PDT
(In reply to Michael Catanzaro from
comment #6
)
> Comment on
attachment 452238
[details]
> Patch > > This looks fine to me, but Adrian mentioned something about not liking this. > Adrian?
So what's suspicious about this is that when cross-compiling, the sysroot refers to the location of the *target platform* files (libraries, headers, etc.) but in the case of programs to execute during the build, we cannot (typically, at least) run them on the *build host*. Prefixing the sysroot is the wrong thing to do in the general case, what one does is passing -DCMAKE_PROGRAM_PATH= to tell if where to look for programs used during compilation and that will run in the *build host*. Now, I do know that GI is cross-compilation trouble, and at least Yocto and Buildroot use qemu's userspace emulation to run the tools; but how to treat the particularities of GI tooling is the choice of each particular build system. I would rather not have a workaround for some compilation system in the WebKit source tree—such a think should not be needed, and proof of that is Buildroot can builds WebKitGTK with introspection enabled without a patch like this:
https://git.busybox.net/buildroot/tree/package/webkitgtk/webkitgtk.mk?h=2022.02.x#n68
Adrian Perez
Comment 9
2022-04-05 15:12:25 PDT
(ooops, s/think/thing/ in my previous comment)
Alexander Kanavin
Comment 10
2022-04-11 23:36:13 PDT
Right, this actually makes sense. I can withdraw this patch and mark it as yocto-specific in our tree to prevent further submissions.
Adrian Perez
Comment 11
2022-04-12 00:26:31 PDT
(In reply to Alexander Kanavin from
comment #10
)
> Right, this actually makes sense. I can withdraw this patch and mark it as > yocto-specific in our tree to prevent further submissions.
👍️ Of course if you run into any other issues, please do ask and we can try to help out --
Adrian Perez
Comment 12
2022-04-12 00:27:00 PDT
(In reply to Alexander Kanavin from
comment #10
)
> Right, this actually makes sense. I can withdraw this patch and mark it as > yocto-specific in our tree to prevent further submissions.
👍️ Of course if you run into any other issues, please do ask and we can try to help out -- we do want people to be able to package and cross build WebKit after all :)
Michael Catanzaro
Comment 13
2022-04-12 08:07:31 PDT
(In reply to Alexander Kanavin from
comment #10
)
> Right, this actually makes sense. I can withdraw this patch and mark it as > yocto-specific in our tree to prevent further submissions.
And add a link to this bug too, if you don't mind, so people can find this discussion in the future.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug