Bug 228581 - [CMake] Use an imported target for the libgcrypt library
Summary: [CMake] Use an imported target for the libgcrypt library
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CMake (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adrian Perez
URL:
Keywords:
Depends on: 228609
Blocks:
  Show dependency treegraph
 
Reported: 2021-07-29 04:56 PDT by Adrian Perez
Modified: 2021-07-30 01:29 PDT (History)
12 users (show)

See Also:


Attachments
Patch (9.33 KB, patch)
2021-07-29 05:02 PDT, Adrian Perez
no flags Details | Formatted Diff | Diff
Patch v2 (9.34 KB, patch)
2021-07-29 05:21 PDT, Adrian Perez
no flags Details | Formatted Diff | Diff
Follow-up Patch (4.35 KB, patch)
2021-07-29 12:50 PDT, Adrian Perez
no flags Details | Formatted Diff | Diff
Follow-up Patch (bis) (2.09 KB, patch)
2021-07-30 00:12 PDT, Adrian Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 2021-07-29 04:56:30 PDT
SSIA ^_^
Comment 1 Adrian Perez 2021-07-29 05:02:47 PDT
Created attachment 434515 [details]
Patch
Comment 2 Adrian Perez 2021-07-29 05:21:26 PDT
Created attachment 434516 [details]
Patch v2
Comment 3 EWS 2021-07-29 08:16:09 PDT
Committed r280423 (240063@main): <https://commits.webkit.org/240063@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 434516 [details].
Comment 4 Lauro Moura 2021-07-29 11:21:00 PDT
Reopening for debug build fixes regarding gpg-error not being pulled as dependency automatically by libgcrypt.
Comment 5 Adrian Perez 2021-07-29 12:24:49 PDT
(In reply to Lauro Moura from comment #4)
> Reopening for debug build fixes regarding gpg-error not being pulled as
> dependency automatically by libgcrypt.

Gah! I assumed that libgcrypt.pc would list gpg-error as a dependency,
but it does not — which is what manually adding -lgpg-error was
workarounding.

I will submit a patch adding also a LibGcrypt::GpgError imported target
and make LibGcrypt::LibGcrypt depend on it :|
Comment 6 Adrian Perez 2021-07-29 12:50:15 PDT
Created attachment 434559 [details]
Follow-up Patch
Comment 7 Carlos Alberto Lopez Perez 2021-07-29 13:04:50 PDT
Build failure here: https://build.webkit.org/#/builders/43/builds/3684
Comment 8 EWS 2021-07-29 18:44:58 PDT
Committed r280461 (240096@main): <https://commits.webkit.org/240096@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 434559 [details].
Comment 9 Carlos Alberto Lopez Perez 2021-07-29 21:04:03 PDT
I'm afraid we would have to revert this, or at least modify it to not rely on the pkg-config files


After r280423 is not longer possible to build WebKit on Debian 10.

See the failure on our bot: https://build.webkit.org/#/builders/46/builds/5192

I can reproduce this on buildbox with:

$ rm -fr WebKitBuild # wipe build so there is no flatpak
$ Tools/Scripts/build-webkit --gtk  --no-experimental-features

It seems the issue is that the package that Debian 10 ships for libgcrypt20-dev doesn't have a libgcrypt.pc file, and I can't find this file shipped by any other package on the distro.

I can see on the libgcrypt upstream repository that the pc file was added in 

$ git describe 97194b422bc89a6137f4e218d4cdee118c63e96e
libgcrypt-1.9-base-91-g97194b42

And Debian 10 still ships libgcrypt 1.8.4
Comment 10 Adrian Perez 2021-07-29 22:43:25 PDT
(In reply to Carlos Alberto Lopez Perez from comment #9)
> I'm afraid we would have to revert this, or at least modify it to not rely
> on the pkg-config files
> 
> 
> After r280423 is not longer possible to build WebKit on Debian 10.
> 
> See the failure on our bot:
> https://build.webkit.org/#/builders/46/builds/5192
> 
> I can reproduce this on buildbox with:
> 
> $ rm -fr WebKitBuild # wipe build so there is no flatpak
> $ Tools/Scripts/build-webkit --gtk  --no-experimental-features
> 
> It seems the issue is that the package that Debian 10 ships for
> libgcrypt20-dev doesn't have a libgcrypt.pc file, and I can't find this file
> shipped by any other package on the distro.
> 
> I can see on the libgcrypt upstream repository that the pc file was added in 
> 
> $ git describe 97194b422bc89a6137f4e218d4cdee118c63e96e
> libgcrypt-1.9-base-91-g97194b42
> 
> And Debian 10 still ships libgcrypt 1.8.4

Not having a .pc file should not be a failure, there is a fallback
path that uses the “libgcrypt-config” script, which is part of the
Debian package in versions <1.9, see:

  https://packages.debian.org/buster/amd64/libgcrypt20-dev/filelist

From the build log you linked I see that the fallback is being tried
but I made some mistake there. I would not revert; so let's reopen
this and I will submit a follow-up with a fix in the next hour or so :)
Comment 11 Adrian Perez 2021-07-30 00:12:35 PDT
Created attachment 434608 [details]
Follow-up Patch (bis)
Comment 12 Carlos Alberto Lopez Perez 2021-07-30 00:38:18 PDT
Comment on attachment 434608 [details]
Follow-up Patch (bis)

nice! thanks!
Comment 13 EWS 2021-07-30 01:29:37 PDT
Committed r280469 (240104@main): <https://commits.webkit.org/240104@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 434608 [details].