Saturday, 2024-08-31

*** ggabriel is now known as Guest197008:42
theflyingrahulHi, I am trying to build sfos for the first time. Device is lenovo k6 note (karatep). I keep getting some permissions error:08:44
theflyingrahulLbuild out/target/product/karatep/obj/ROOT/hybris-recovery_intermediates/init�/bin/bash -c "(sed -e 's %DATA_PART% /dev/block/bootdevice/by-name/userdata g'      -e 's %BOOTLOGO%  g'    -e 's %DEFAULT_OS% sailfishos g'         -e 's %ALWAYSDEBUG% 1 g' hybris/hybris-boot/init-script > out/target/product/karatep/obj/ROOT/hybris-recovery_intermediates/init ) && (hybris/hybris-boot08:44
theflyingrahul/fixup-mountpoints \"karatep\" \"out/target/product/karatep/obj/ROOT/hybris-recovery_intermediates/init\" ) && (chmod +x out/target/product/karatep/obj/ROOT/hybris-recovery_intermediates/init )"␦�Fixing mount-points for device karatep08:44
theflyingrahulsed: bad pattern 's block/bootdevice/by-name/boot boot'@33 (b)08:44
theflyingrahulhybris/hybris-boot/fixup-mountpoints: 30: out/target/product/karatep/obj/ROOT/hybris-recovery_intermediates/init: Permission denied08:44
theflyingrahul"Fout/target/product/karatep/obj/ROOT/hybris-recovery_intermediates/init*exited with code: 1�08:44
theflyingrahulHbuild out/target/product/karatep/obj/ROOT/hybris-boot_intermediates/init�/bin/bash -c "(sed -e 's %DATA_PART% /dev/block/bootdevice/by-name/userdata g'          -e 's %BOOTLOGO%  g'    -e 's %DEFAULT_OS% sailfishos g'         -e 's %ALWAYSDEBUG%  g' hybris/hybris-boot/init-script > out/target/product/karatep/obj/ROOT/hybris-boot_intermediates/init ) && (hybris/hybris-boot/fixu08:44
theflyingrahulp-mountpoints \"karatep\" \"out/target/product/karatep/obj/ROOT/hybris-boot_intermediates/init\" ) && (chmod +x out/target/product/karatep/obj/ROOT/hybris-boot_intermediates/init )"␦�Fixing mount-points for device karatep08:44
theflyingrahulsed: bad pattern 's block/bootdevice/by-name/boot boot'@33 (b)08:44
theflyingrahulhybris/hybris-boot/fixup-mountpoints: 30: out/target/product/karatep/obj/ROOT/hybris-boot_intermediates/init: Permission denied08:44
theflyingrahul"Bout/target/product/karatep/obj/ROOT/hybris-boot_intermediates/init*exited with code: 1HABUILD_SDK [karatep]08:44
theflyingrahulAny clue?08:44
theflyingrahulFixed it. The whitespaces were off in "fixup-mountpoints" patches that I made.09:10
theflyingrahulEvery space matters. Example: "-e 's block/bootdevice/by-name/boot boot ' \"09:11
theflyingrahulI'm porting with hybris-18.1 as the base. There are no patches for 18.1 at  https://github.com/mer-hybris/hadk-faq#android-base-specific-fixes. Can someone confirm if I have to perform the fixes mentioned for 16.0 and 17.1? Or do I skip them?14:04
theflyingrahulI've performed the hybris-hal patches. I'm not sure if it has to be done for droid-hal-device packages for 18.114:06
T42<b100dian> You need to find the correct branch fir 18.1 branches and apply them. Instructions are like in 17.1 but adjusted branches14:12
theflyingrahulThanks! Will do14:12
theflyingrahulWhile trying to build droid-hal-device packages, I get the following: rpm/dhd/helpers/build_packages.sh --droid-hal15:58
theflyingrahul* Building rpm/droid-hal-karatep.spec15:58
theflyingrahul+ '[' 11 -ge 14 ']'15:58
theflyingrahul+ art_path=./out/soong/.intermediates/art/build15:58
theflyingrahul+ apex_path=apex/com.android.runtime.release/android_common_com.android.runtime.release/image.apex15:58
theflyingrahul+ '[' '!' -f ./out/soong/.intermediates/art/build/apex/com.android.runtime.release/android_common_com.android.runtime.release/image.apex/lib/bionic/libc.so ']'15:58
theflyingrahul+ art_path=./out/target/product/karatep/system15:58
theflyingrahul+ apex_path=apex/com.android.runtime.release15:58
theflyingrahul+ '[' '!' -f ./out/target/product/karatep/system/apex/com.android.runtime.release/lib/bionic/libc.so ']'15:58
theflyingrahul+ art_path=./out/target/product/karatep15:58
theflyingrahul+ apex_path=apex/com.android.runtime15:58
theflyingrahul+ rm -f /home/rahul/hadk/installroot/usr/libexec/droid-hybris/system/lib/libdl.so /home/rahul/hadk/installroot/usr/libexec/droid-hybris/system/lib/libdl_android.so /home/rahul/hadk/installroot/usr/libexec/droid-hybris/system/lib/libc.so /home/rahul/hadk/installroot/usr/libexec/droid-hybris/system/lib/libm.so15:58
theflyingrahul+ cp -a ./out/target/product/karatep/apex/com.android.runtime/lib/bionic/libdl.so ./out/target/product/karatep/apex/com.android.runtime/lib/bionic/libdl_android.so ./out/target/product/karatep/apex/com.android.runtime/lib/bionic/libc.so ./out/target/product/karatep/apex/com.android.runtime/lib/bionic/libm.so /home/rahul/hadk/installroot/usr/libexec/droid-hybris/system/lib15:58
theflyingrahulcp: cannot stat './out/target/product/karatep/apex/com.android.runtime/lib/bionic/libdl.so': No such file or directory15:58
theflyingrahulcp: cannot stat './out/target/product/karatep/apex/com.android.runtime/lib/bionic/libdl_android.so': No such file or directory15:58
theflyingrahulcp: cannot stat './out/target/product/karatep/apex/com.android.runtime/lib/bionic/libc.so': No such file or directory15:58
theflyingrahulcp: cannot stat './out/target/product/karatep/apex/com.android.runtime/lib/bionic/libm.so': No such file or directory15:58
theflyingrahulerror: Bad exit status from /var/tmp/rpm-tmp.DoSjD7 (%install)15:59
theflyingrahulWhat dependencies are missing? I believe rpm/dhd/helpers/build_packages.sh --droid-hal also builds apex, right?15:59
theflyingrahulPrior to this, I ran make hybris-hal, droidmedia, hybris-boot and hybris-recovery16:00
theflyingrahulAny idea on what I'm missing?16:01
T42<elros34> use pastebin services16:16
T42<b100dian> Any other place in your out/target where you find those so files?16:17
theflyingrahulWill run a find now16:18
theflyingrahulI don't see any .so files in out/target16:21
theflyingrahulI see a com.android.support.apexer inside out/target. In fact, the whole "com.android.runtime" directory is missing.16:24
T42<elros34> are you sure you have no single lib?16:26
theflyingrahulYeah, the entire dir is missing16:26
T42<elros34> I mean no lib at all in out/16:26
theflyingrahulNope. No *.so files at all in out/16:27
theflyingrahulDid I miss building something?16:27
T42<elros34> run make hybris-hal droidmedia again16:28
theflyingrahulAlready ran twice, will do it one more time to be sure16:28
T42<elros34> did you apply patches without issues? ( don't do it once again now)16:28
theflyingrahulYeah, the hybris-hal patches were applied without any issues16:30
theflyingrahulJust to be sure, do I run the libhybris patched from the master branch, or the android11 branch? My base is 18.116:32
theflyingrahul*patches16:32
T42<elros34> hybris-18 braanch16:38
T42<b100dian> https://github.com/mer-hybris/hybris-patches/tree/hybris-18.116:39
theflyingrahulThanks much, let me clean and try make again16:42
T42<elros34> what revision of droid-hal-device submodule do you use?16:43
T42<elros34> did you use also correct mer-hybris/android branch?16:44
theflyingrahuldroid-hal-device: I've used master. I couldn't find a hybris-18.116:45
theflyingrahulThere is an android11-fix branch. Should I change?16:46
T42<elros34> ok I just can't find this + '[' 11 -ge 14 ']' comparision from your log16:46
theflyingrahulmer-hybris/android: I'm using hybris-18.1 as base16:48
T42<elros34> for dhd submodule probably you should use latest one16:48
T42<elros34> read also this https://sailfishos.wiki/books/hadk/page/hadk-hot#bkmrk-android-base-specifi16:49
theflyingrahulsure, let me check16:53
theflyingrahulthanks again!16:53
T42<b100dian> that comparison is this https://github.com/mer-hybris/droid-hal-device/blob/master/droid-hal-device.inc#L67516:56
T42<b100dian> very recent indeed16:57
theflyingrahulLast commit is 4 days ago. Quite new17:01
T42<elros34> yeah ignore my question I just didn't search properly17:01
theflyingrahulBefore applying hybris-patches, the hadk-faq wants me to clone https://github.com/mer-hybris/libhybris.git. Do I use master or android11 branch?17:10
T42<elros34> forget about android11 branch for anything, Sometimes you need some specific branches for droid-config/device if there is very active development. Just use latest17:13
theflyingrahulGot it17:14
theflyingrahulRan it all again, the .so files are still missing17:34
T42<elros34> how can you not have libdroidmedia.so17:36
T42<elros34> do you have all these anv variables set correctly? ANDROID_ROOT, do you run usual source/breakfast command?17:37
T42<elros34> what do you have in /out/target/product/${DEVICE}/system/lib/ (or lib64)17:39
theflyingrahulANDROID_ROOT: /home/rahul/hadk17:40
theflyingrahulsource build/envsetup.sh, followed by breakfast karatep17:40
theflyingrahulGot it! I ran make clobber and make hybris-hal droidmedia again17:44
theflyingrahulThe files are now present... weird17:44
theflyingrahulI've identified the files. But there are two of them. One at out/target/product/karatep/symbols/apex/com.android.runtime/ and another at out/target/product/karatep/system/apex/com.android.runtime/lib64/bionic/libm.so. Which one do I use? And to mention the custom path, do I edit droid-hal-device.inc?18:10
theflyingrahulI meant, there are two copies of the .so files, one at system/ and another at symbols/18:10
theflyingrahulOkay, so the droid-hal build is successful. I used the copy of .so files in symbols/, hope they are identical. However, I changed the apex_path to apex_path=symbols/apex/com.android.runtime inside droid-hal-device.inc. Is there a cleaner way to do this?18:21
T42<b100dian> Symbols doesn't sound just right, try system first. In the best case the symbols are code with symbols, but it might be theres no code, dunno18:39
T42<b100dian> I think changing the path is ok, you need to commit and push your changes to not forget them if they end up working18:40
theflyingrahul1Yeah I was suspecting the same. I've rebuilt with system/. Worked fine18:41
T42<elros34> the only cleaner way is to make PR, you are not the first one editing this18:46
theflyingrahul1Alright!18:52
theflyingrahul1A bunch of packages are missing, including droid-config, while building version. https://pastebin.com/dh3caGYW19:39
T42<elros34> did you finish building middleware?19:44
T42<elros34> built packages are in droid-local-repo directory19:44
theflyingrahul1Yeah, it finished without errors. These are the contents of droid-local-repo: https://pastebin.com/5A3KmHMR19:47
T42<elros34> did you check whole droid-hal-version log file?19:53
theflyingrahulI did. I'm not sure if it's helpful: https://pastebin.com/0inwZwmc20:02
T42<elros34> sure it is, see file conflit, find solution in hadk-hot and fix it20:06
theflyingrahul1That fixed it, thanks @elros34!20:47

Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!