Errors trying to compile LineageOS 17.1 with updated clang (and other patches) for the XZ2 Compact

Old threads that no longer serve a purpose, but once did.
User avatar
K4sum1
Lazy Owner
Posts: 883
Joined: 11 Jan 2021, 07:40
Location: ur dads house
OS: Windows 8.1 x64
Has thanked: 549 times
Been thanked: 249 times
Contact:
United States of America

Errors trying to compile LineageOS 17.1 with updated clang (and other patches) for the XZ2 Compact

Unread post by K4sum1 »

This has been resolved. More info here.

This is a bit of a different one to the usual Windows posts here. I have a big interest into Android too, optimizing it and using the objectively superior older versions. I would like to hopefully get 15.1 or even 14.1 running on this phone, however that will be for the future as 17.1 is kinda good enough and it should be somewhat easy. I do have the base LineageOS 17.1 able to be compiled and bootable, but I want it to make it the best I can before I upgrade to the XZ2C. To make it the best I can, I'm mostly just applying patches from a XZ1 Compact repo. These patches are for the XZ1 Compact, which uses the Snapdragon 835, or the MSM8998. The XZ2 Compact uses a Snapdragon 845, or the SDM845. A few of these patches I run into errors when compiling. I'm mostly focusing on Clang since I know that would help with performance and battery. I'm not really sure what the other patches do.

Patch 1:
https://github.com/Flamefire/android_device_sony_lilac/blob/lineage-17.1/patches/update-clang.patch

The error:
https://cdn.discordapp.com/attachments/956654404306628709/1194805463108305036/image.png?ex=65b1b04c&is=659f3b4c&hm=cc3f827696c2efbfe3f0858e98f6e6a0648c7a8ee399abd95f4034a1e8b1eb9f&

Extra context:
displays_str is not in the MSM8998 source. I'm not really sure what it does, but if I remove it, it continues to compile but runs into a different error later on. I also don't want to disable some core functionality related to the display, so I'd rather not remove it. There is updated and different code for the function in LineageOS 18.1 source, but replacing the old code with the new code only results in a different error relating to displays_str.

Error 2:
https://cdn.discordapp.com/attachments/956654404306628709/1194799562553036912/image.png?ex=65b1aace&is=659f35ce&hm=bec74271ba351c8dea6707aa342c2e21766d08ad616de38560ad9de736c585a1&

Extra context:
I have no idea what this means or how to fix it. It would probably be helpful if I captured a bit more in this screenshot, but I didn't. I would prefer to get more info once I get displays_str fixed instead of bypassing it again.

For these patches below I will get into less detail, as I don't think it's needed. However if you need it, I can recompile with the patch to get a full error.

Patch 2:
https://github.com/Flamefire/android_device_sony_lilac/blob/lineage-17.1/patches/fix-llvm-unwind-warning-and-findUnwindSections.patch

The compiling error was command not found and suggested replacing -Wno-bitwise-conditional-parentheses (On line 11 in the patch) with -Wno-bitwise-op-parentheses and it just worked. Not sure what it changes or even if that just invalidates the entire patch, but it worked.

Patch 3:
https://github.com/Flamefire/android_device_sony_lilac/blob/lineage-17.1/patches/suppress-bool-operation-warning.patch

The compiling error was again command not found, but had no suggestion for replacing -Wno-bool-operation (On line 12 in the patch). Not sure what this does either. No fix for it (aside from not including) for now.

Patch 4:
https://github.com/Flamefire/android_device_sony_lilac/blob/lineage-17.1/patches/update-abi-dumps.patch

This causes a bunch of errors but the compiler helped me and I was able to fix it with the four commands below.
$ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libhidlbase
$ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libhwbinder_noltopgo
$ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libstagefright_foundation
$ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libprotobuf-cpp-full
Again not sure if this just invalidates the patch, but it worked.

I would really appreciate some help with this. I don't really know what I'm doing when it comes to coding, and I can't seem to infer from Android code as well as I can with Firefox.
I don't know what I'm doing hit album by Brad Sucks

Locked

Who is online

Users browsing this forum: No registered users and 12 guests