Skip to content
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

UTType missing when building Darling #1301

Closed
vadd98 opened this issue Feb 8, 2023 · 4 comments
Closed

UTType missing when building Darling #1301

vadd98 opened this issue Feb 8, 2023 · 4 comments

Comments

@vadd98
Copy link
Contributor

vadd98 commented Feb 8, 2023

I'm trying to build Darling including ShazamKit framework obtained from an x64 Ventura Macbook.
I generated stubs for ShazamKit (frameworks) and ShazamCore, ShazamEvents, ShazamInsight and ShazamKitUI (private-frameworks) but I'm getting the error about the missing UTType interface when building the first ShazamKit.
Any suggestion?

Build Log
error: cannot find interface declaration for 'UTType'

[ 85%] Building C object src/frameworks/ShazamKit/CMakeFiles/ShazamKit.dir/src/MREResult.m.o
[ 85%] Building C object src/frameworks/ShazamKit/CMakeFiles/ShazamKit.dir/src/SHMediaLibraryChange.m.o
[ 85%] Building C object src/frameworks/ShazamKit/CMakeFiles/ShazamKit.dir/src/SHMatcherRequest.m.o
[ 85%] Building C object src/frameworks/ShazamKit/CMakeFiles/ShazamKit.dir/src/SHMediaLibraryQueryParameters.m.o
[ 85%] Building C object src/frameworks/ShazamKit/CMakeFiles/ShazamKit.dir/src/UTType+SHShazamAdditions.m.o
In file included from /root/darling/src/frameworks/ShazamKit/src/UTType+SHShazamAdditions.m:20:
/root/darling/framework-include/ShazamKit/UTType+SHShazamAdditions.h:22:12: error: cannot find interface declaration for 'UTType'
@interface UTType (SHShazamAdditions)
           ^
/root/darling/src/frameworks/ShazamKit/src/UTType+SHShazamAdditions.m:22:17: error: cannot find interface declaration for 'UTType'
@implementation UTType (SHShazamAdditions)
                ^
2 errors generated.
make[2]: *** [src/frameworks/ShazamKit/CMakeFiles/ShazamKit.dir/build.make:869: src/frameworks/ShazamKit/CMakeFiles/ShazamKit.dir/src/UTType+SHShazamAdditions.m.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:61953: src/frameworks/ShazamKit/CMakeFiles/ShazamKit.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

System Information
Ubuntu 20.04

Software Version
Clang 10.0.0-4ubuntu1
CMake 3.16.3
Linux Kernel 5.4.0-137-generic
Darling 922bd24
@vadd98
Copy link
Contributor Author

vadd98 commented Feb 9, 2023

I tried to generate stubs for UniformTypeIdentifiers.framework which has the UTType class and add them in /src/frameworks, but I'm still getting the same error. Any suggestion?

@CuriousTommy
Copy link
Contributor

My stub generator doesn't automatically add #include/#import for classes that live in another library/framework (such as UTType).

So you would need to add the following:

#import <UniformTypeIdentifiers/UniformTypeIdentifiers.h>

Also, it is harder for me to help debug your issues without seeing your files. Maybe consider creating a PR so that I can see your files.

@vadd98
Copy link
Contributor Author

vadd98 commented Feb 9, 2023

Thanks, I tought the generator added them automatically so I didn't check.

Adding the import line you suggested actually works, but now I'm struggling with other error references and I'm trying to fix all of them. Do you have any modus-operandi to suggest in order to speed up the referencing process?
At the moment, each time I add a reference I have to to rebuild in order to get the next missing reference.

Just created a PR for ShazamKit #1302

@CuriousTommy
Copy link
Contributor

I'll continue our discussion in the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants