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

[Questions] How can I resolve this "framework 'Preferences' not found" error during linking libcolorpicker when building with theos? #1580

Open
2 tasks done
fenwulf opened this issue Oct 6, 2024 · 6 comments
Labels
question Further information is requested

Comments

@fenwulf
Copy link

fenwulf commented Oct 6, 2024

Have you read the FAQ?

  • Yes, I did read the FAQ

Is there an existing issue/question for this?

  • I have searched the existing issues

Do you think this is a bug?

❌ No, I don't think this is a bug. I will explain below

My question

Disclaimer: I did not read the FAQ, as when I click it I get this popup:
image

I did search for the error, and did not find the issue in open issues, and searched several closed ones as well. I found it in a closed issue, however it was resolved with a commit.

I have a feeling I am doing something wrong, although I have installed all required packages for building with theos. I am following method 2 on this page. I have placed the sdk within theos/sdks. I even double checked that something was in ~/theos/sdks/iPhoneOS16.5.sdk/System/Library/PrivateFrameworks/Preferences.framework. I have actually revisited this over the course of 2-3 months hoping a commit would fix it for me. I am just lost as to what I am doing wrong. I am using (from the linked patched ipa onedrive within this repo) YouTube 19.34.2.

I have followed the steps exactly. Here is my error, I can post the entire log if necessary but figured this is the important snippet:

==> Signing Alderis…
> Making all in lcpshim…
> Making all for library libcolorpicker…
==> Linking library libcolorpicker (arm64)…
ld: warning: -multiply_defined is obsolete
ld: warning: search path '/Users/***/Downloads/TEMP/uYouPlus/.theos/obj/install/Library/Frameworks' not found
ld: warning: search path '/Users/***/Downloads/TEMP/uYouPlus/.theos/obj/install/var/jb/Library/Frameworks' not found
ld: framework 'Preferences' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [/Users/***/theos/makefiles/instance/library.mk:52: /Users/***/Downloads/TEMP/uYouPlus/.theos/obj/arm64/libcolorpicker.dylib] Error 1
make[4]: *** [/Users/***/theos/makefiles/instance/library.mk:52: /Users/***/Downloads/TEMP/uYouPlus/.theos/obj/arm64/libcolorpicker.dylib] Error 2
make[3]: *** [/Users/***/theos/makefiles/instance/library.mk:37: internal-library-all_] Error 2
make[2]: *** [/Users/***/theos/makefiles/master/rules.mk:146: libcolorpicker.all.library.variables] Error 2
make[1]: *** [/Users/***/theos/makefiles/master/aggregate.mk:12: internal-all] Error 2
make: *** [/Users/***/theos/makefiles/master/aggregate.mk:12: internal-all] Error 2
Failed building uYouPlus

Any help is welcome, thanks!

Additional context

No response

@fenwulf fenwulf added the question Further information is requested label Oct 6, 2024
@fenwulf fenwulf changed the title [Questions] How can I resolve this "framework 'Preferences' not found" error when linking libcolorpicker? [Questions] How can I resolve this "framework 'Preferences' not found" error during linking libcolorpicker when building with theos? Oct 6, 2024
@arichornloverALT
Copy link

Use the code from the Makefile in the following pull request #1583.
It will remove the Preferences framework error you are encountering.

@fenwulf
Copy link
Author

fenwulf commented Oct 12, 2024

Use the code from the Makefile in the following pull request #1583. It will remove the Preferences framework error you are encountering.

Thank you! That worked, unsure if I can post a follow up error here, its most likely unrelated:

==> Signing libFLEX…
> Making all in Tweaks/iSponsorBlock…
> Making all for tweak iSponsorBlock…
==> Preprocessing iSponsorBlock.xm…
==> Compiling iSponsorBlock.xm (arm64)…
In module 'std_math_h' imported from /Users/***/Downloads/TEMP/uYouPlus/Tweaks/iSponsorBlock/Headers/iSponsorBlock.h:24:
In module 'std_private_math_abs' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/usr/include/c++/v1/math.h:358:
In module 'std_private_type_traits_is_integral' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/usr/include/c++/v1/__math/abs.h:14:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/usr/include/c++/v1/__type_traits/is_integral.h:53:29: error: 'std::is_integral<double>' has different definitions in different modules; definition in module 'std_private_type_traits_is_integral' is here
   53 | struct _LIBCPP_TEMPLATE_VIS is_integral : _BoolConstant<__is_integral(_Tp)> {};
      |                             ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/usr/include/c++/v1/__type_traits/is_integral.h:53:29: note: definition in module 'std_private_type_traits_is_integral' is here
In module 'std_math_h' imported from /Users/***/Downloads/TEMP/uYouPlus/Tweaks/iSponsorBlock/Headers/iSponsorBlock.h:24:
In module 'std_private_math_copysign' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/usr/include/c++/v1/math.h:359:
In module 'std_private_type_traits_is_arithmetic' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/usr/include/c++/v1/__math/copysign.h:14:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/usr/include/c++/v1/__type_traits/is_arithmetic.h:24:29: error: 'std::is_arithmetic<double>' has different definitions in different modules; definition in module 'std_private_type_traits_is_arithmetic' is here
   24 | struct _LIBCPP_TEMPLATE_VIS is_arithmetic
      |                             ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/usr/include/c++/v1/__type_traits/is_arithmetic.h:24:29: note: definition in module 'std_private_type_traits_is_arithmetic' is here
2 errors generated.
make[4]: *** [/Users/***/theos/makefiles/instance/rules.mk:417: /Users/***/Downloads/TEMP/uYouPlus/.theos/obj/arm64/iSponsorBlock.xm.d7394053.o] Error 1
make[3]: *** [/Users/***/theos/makefiles/instance/library.mk:52: /Users/***/Downloads/TEMP/uYouPlus/.theos/obj/arm64/iSponsorBlock.dylib] Error 2
make[2]: *** [/Users/***/theos/makefiles/instance/library.mk:37: internal-library-all_] Error 2
make[1]: *** [/Users/***/theos/makefiles/master/rules.mk:146: iSponsorBlock.all.tweak.variables] Error 2
make: *** [/Users/***/theos/makefiles/master/aggregate.mk:12: internal-all] Error 2
Failed building uYouPlus

@maxnowack
Copy link

@fenwulf I have the same issue. Have you found a solution?

@fenwulf
Copy link
Author

fenwulf commented Oct 17, 2024

@fenwulf I have the same issue. Have you found a solution?

Not yet. Unfortunately not super familiar with theos but I refuse to build with GitHub for some reason :)

@arichornloverALT
Copy link

arichornloverALT commented Oct 20, 2024

I suggest using iOS 16.5 SDK.
I don’t think uYouPlus can build successfully with iOS 17.0-18.0+ SDK’s

@fenwulf
Copy link
Author

fenwulf commented Oct 20, 2024

I recommend using iOS 16.5 SDK. I don’t think uYouPlus can build successfully with iOS 17.0-18.0+ SDK’s

I am using that (the recommended) SDK.

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

No branches or pull requests

3 participants