sonyxperiadev / bug_tracker

Empty repository that is used as a bugtracker for Open Devices project
52 stars 13 forks source link

Build AOSP14 for Xperia5 V fails with error: use of undeclared identifier 'compress_set_codec_params' #848

Open ziggutas opened 1 week ago

ziggutas commented 1 week ago

Platform:yodo Device: Xperia5 V, XQDE-54 (pdx237) Kernel version: Android version:14 Software binaries version:

Previously working on I've never had a build complete for aosp14. Description I'm following the build instructions to "Build AOSP Android 14" and have tried userdebug first and now eng with lunch aosp_xqde54-ap2a-eng.

Build promptly fails with Timekeep error which can be fixed with #837 Thanks to MarijnS95!

Build proceeds a bit then fails with: error: ninja: 'device/sony/pdx237/rootdir/vendor/etc/resourcemanager_kalama_qrd.xml', needed by 'out/target/product/pdx237/vendor/etc/resourcemanager_kalama_qrd.xml', missing and no known rule to make it

In that directory there is "resourcemanagerkalamagrd.xml" suggesting that perhaps it's a typo, although there's no way for me to be sure. Anyway I checked against the same location for the Xperia1 V pdx234 (also yodo) and it had only the qrd.xml, so I edited the filename a tried again.

Build proceeded for an hour or so and failed again: vendor/qcom/opensource/pal/session/src/SessionAlsaCompress.cpp:2122:30: error: use of undeclared identifier 'compress_set_codec_params' 2122 | status = compress_set_codec_params(compress, &codec);

I've had a look in that file at line 2122 but I don't have the skills to understand it sadly, so I'm stuck. Is there anything to be done to get things going again?

Additional context Add any other context, e.g. upload logs or screenshots about the bug here.

[error.4.log](https://github.com/user-attachments/files/17310724/error.4.log) [SessionAlsaCompress.txt](https://github.com/user-attachments/files/17310787/SessionAlsaCompress.txt)
bartcubbins commented 1 week ago

I will send patches this weekend

ziggutas commented 5 days ago

Whilst it would be nice to complete the build I discovered there are no android14 yodo SW binaries available, so testing on the device is not possible at the moment anyway. See #849

EisregenHaha commented 5 days ago

by the way, i had the same 1. problem but i didnt solve it the same way. renaming files i mostly not what you wanna do, instead change what its calling in device.mk. didnt encounter your 2. problem but could be related to the diff fix idk

ziggutas commented 5 days ago

Thanks for the insight; I renamed it back and changed it device.mk. Makes sense, I just got the wrong end of the stick, lol. The last error still stands though.

EisregenHaha commented 5 days ago

Thanks for the insight; I renamed it back and changed it device.mk. Makes sense, I just got the wrong end of the stick, lol. The last error still stands though.

oh i think i know why i didnt have the issue, i just deleted the qcom manifest in which the directory is being synced from because i tried building statixos which already has qcom hal/stuff in their source. thats a solution which you obviously cant take since you are building stock aosp. cant help there then man, sorry.

you would probably need to do something similar to this ? not sure though im just blabbering here

ziggutas commented 4 days ago

Thanks for the update, the build now proceeds, reaching 95% before failing with another issue reported in the bugtracker: #838

EisregenHaha commented 4 days ago

Thanks for the update, the build now proceeds, reaching 95% before failing with another issue reported in the bugtracker: #838

change the target level from 4 to 5 in the device/sony/common/vintf/manifest.xml file (its in the first line)

ziggutas commented 4 days ago

Yes, I get that. The bit I struggle with is after: " I also noticed that nothing appears to be installing the vendor_framework_compatibility_matrix.xml file located in vendor/qcom/opensource/core-utils and adding that to DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE solves quite many of the issues left after changing the target-leve..." It's out of my depth.

I can see a section for DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE in hardware/interfaces/compatibility_matrices/Android.mk, but don't know how to "add" anything, or what, to it.

EisregenHaha commented 4 days ago

Thanks for the update, the build now proceeds, reaching 95% before failing with another issue reported in the bugtracker: #838 Edit: nevermind why did it pull all of it in one line damn, ill try to fix change the target level from 4 to 5 in the device/sony/common/vintf/manifest.xml file (its in the first line)

Yes, I get that. The bit I struggle with is after: " I also noticed that nothing appears to be installing the vendor_framework_compatibility_matrix.xml file located in vendor/qcom/opensource/core-utils and adding that to DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE solves quite many of the issues left after changing the target-leve..." It's out of my depth.

I can see a section for DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE in hardware/interfaces/compatibility_matrices/Android.mk, but don't know how to "add" anything, or what, to it.

for that make a file called framework_compatibility_matrix.xml in the device/sony/yodo dir. then paste this inside there:

https://catbin.sh/b/ffd9399a

After that edit the device/sony/pdx237/BoardConfig.mk to also include the following:

DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := device/sony/yodo/framework_compatibility_matrix.xml

i dont know if that will be enough for you as i also had to add hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml into there but as far as i can see no such repo is cloned from the sony local manifest sooo idk if you even have that directory.

also my statix build didnt even boot so i gave up. also emma is fucking annoying why tf does it only have an android 13 service, had to upgrade to 14 again like 3 times now and every time it takes 6 hours lmao

ziggutas commented 4 days ago

Thanks @EisregenHaha , I did that but the end result is the same. Think I'll ask in the other issue although I'm close to giving up also.

What's the 6hrs all about? 10 mins with newflasher. Or you could lock bootloader after emma and install latest 14 with xperia companion.

Anyhow, thanks again.

EisregenHaha commented 3 days ago

Thanks @EisregenHaha , I did that but the end result is the same. Think I'll ask in the other issue although I'm close to giving up also.

What's the 6hrs all about? 10 mins with newflasher. Or you could lock bootloader after emma and install latest 14 with xperia companion.

Anyhow, thanks again.

newsflasher doesnt work for me from 13->14 directly, i have to use emma, lock bl and the do every incremental update for 6 hours. i didnt know about that xperia companion thing though might check it out. also just to confirm my suspicion, you dont have the hardware/qcom-caf directory right?

ziggutas commented 3 days ago

newsflasher doesnt work for me from 13->14 directly, i have to use emma, lock bl and the do every incremental update for 6 hours. i didnt know about that xperia companion thing though might check it out. also just to confirm my suspicion, you dont have the hardware/qcom-caf directory right?

That's right, no qcom-caf dir.

Wait a minute though, you get updates after relocking? I thought it was impossible to get updates ever again. And strange you can't newflash 14. I know it doesn't work if you are on slot-b when flashing; it won't boot. That's documented in munjeni's thread on xda. I'd be tempted to sell mine if it could get updates, lol.

EisregenHaha commented 3 days ago

newsflasher doesnt work for me from 13->14 directly, i have to use emma, lock bl and the do every incremental update for 6 hours. i didnt know about that xperia companion thing though might check it out. also just to confirm my suspicion, you dont have the hardware/qcom-caf directory right?

That's right, no qcom-caf dir.

Wait a minute though, you get updates after relocking? I thought it was impossible to get updates ever again. And strange you can't newflash 14. I know it doesn't work if you are on slot-b when flashing; it won't boot. That's documented in munjeni's thread on xda. I'd be tempted to sell mine if it could get updates, lol.

yup just relock and you will get updates again and i think even the drm key restores but im not sure. you would have to check if the system id resets to being not 10 characters and netflix works or similar. without drm keys selling would be a bit shady but updates definitely work.

EisregenHaha commented 3 days ago

newsflasher doesnt work for me from 13->14 directly, i have to use emma, lock bl and the do every incremental update for 6 hours. i didnt know about that xperia companion thing though might check it out. also just to confirm my suspicion, you dont have the hardware/qcom-caf directory right?

That's right, no qcom-caf dir.

Wait a minute though, you get updates after relocking? I thought it was impossible to get updates ever again. And strange you can't newflash 14. I know it doesn't work if you are on slot-b when flashing; it won't boot. That's documented in munjeni's thread on xda. I'd be tempted to sell mine if it could get updates, lol.

Also i have another idea, do everything as i said but change the line in boardonfig to this:

https://catbin.sh/b/837c4039

if that doesnt work send me the error please. i checked what sony syncs and this seems to be the equivalent

ziggutas commented 3 days ago

Nice one, that did it! Saves me displaying my ignorance in that other bugreport, so thanks for that. I'll flash it shortly and let you know if it boots or not.

EisregenHaha commented 3 days ago

Nice one, that did it! Saves me displaying my ignorance in that other bugreport, so thanks for that. I'll flash it shortly and let you know if it boots or not.

hopefully it does, then i at least know that it was my fault by using a custom rom instead of aosp to build

ziggutas commented 3 days ago

No, it's not booting; sticking on the sony splash screen. Tried factory reset in recovery, no different. I'm done for today, will update tomorrow.

EisregenHaha commented 3 days ago

No, it's not booting; sticking on the sony splash screen. Tried factory reset in recovery, no different. I'm done for today, will update tomorrow.

oof unlucky, i gotta say for a device thats supposedly supported and a project thats only supposed to do one thing and that is make aosp buildable, its not really looking good. you flashed the A13 blobs right? because the person who fixed the typo also said those are bootable but so far i havent had any luck with anything. and btw newflasher wont fix this brick, you gotta use emma in my experience

bartcubbins commented 3 days ago

I will look at the fragments when I have the opportunity. Your device does not boot due to incorrect VINTF configuration

EisregenHaha commented 2 days ago

I will look at the fragments when I have the opportunity. Your device does not boot due to incorrect VINTF configuration

thanks, i just saw the approach of changing the target level to 5 was wrong entirely, my b