Bug 223680 - [BigSur] CMake build cannot link to cached dylib
Summary: [BigSur] CMake build cannot link to cached dylib
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CMake (show other bugs)
Version: WebKit Local Build
Hardware: Mac (Intel) macOS 11
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-24 01:52 PDT by lecris
Modified: 2021-03-31 01:53 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lecris 2021-03-24 01:52:21 PDT
I am trying to port webkit-gtk to homebrew, but I am running into a roadblock with one of the packages used (probably `WTF`'s link to `ICU`). The exact error is:
```
make[3]: *** No rule to make target `/usr/lib/libicucore.dylib', needed by `bin/LLIntSettingsExtractor'.  Stop.
make[2]: *** [Source/JavaScriptCore/CMakeFiles/LLIntSettingsExtractor.dir/all] Error 2
```

In BigSur, Mac has switched to using cached dylib so there is no `/usr/lib/libicucore.dylib`, instead `.tbd` is used. From what I've read with CMake >3.19 these libraries are picked up correctly, however this doesn't seem to be the case in this project. A new target `/usr/lib/libicucore.dylib` is generated after the config stage, but I am not able to track down to why and how it is generated. Could anyone help point me to the appropriate section, and if possible to a resolution to this issue?
Comment 1 lecris 2021-03-27 19:46:59 PDT
I have since resolved this issue by adding `find_package(ICU COMPONENTS data uc i18n REQUIRED)`, however a bunch more errors have appeared due to the CMAKE project not accounting for a`GTK` build on `MacOS`. Some are trivial fixes like the `namespace` not being added or a `const` function pointing to a non-static member. I am able to solve some of these issues, but there are a few issues I would like to ask for some help with. Currently one unresolved issue is:
```
../Source/WebKit/Shared/SandboxExtension.h:120:74: error: use of undeclared identifier 'audit_token_t'
```
Comment 2 Radar WebKit Bug Importer 2021-03-31 01:53:12 PDT
<rdar://problem/76044123>