qnblackcat / uYouPlus

uYou+ is a modified version of uYou (made by @MiRO92) with additional features and mainly made for non jailbroken users!
7.3k stars 9.26k forks source link

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

Open fenwulf opened 1 week ago

fenwulf commented 1 week ago

Have you read the FAQ?

Is there an existing issue/question for this?

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

arichornloverALT commented 3 days ago

Use the code from the Makefile in the following pull request https://github.com/qnblackcat/uYouPlus/pull/1583. It will remove the Preferences framework error you are encountering.

fenwulf commented 2 days ago

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