Help solving errors on compiling LineageOS 15.1 build for Oppo R7f - Oppo R7 Plus

So after following multiple guides on xda forums on compiling a rom (that exists in LineageOS/TheMuppets repositories), I've started compiling LOS15.1 builds for oppo r7f.
This is what I did if anyone wants to follow along:
https://forum.xda-developers.com/android/software-hacking/guide-how-to-build-lineageos-15-1-t3750175
The only deviation was made was after step 11 (or 10 i can't remember) after an error, so i changed the repo/project/file it was pointing to ("android_vendor_cm/config/common_full_phone.mk") to the one on lineage-15.1 branch ("android_vendor_lineage/config/common_full_phone.mk")
At brunch, another issue occurred:
Code:
in file included from device/oppo/msm8939-common/init/init_msm8939.cpp:42:system/core/init/util.h:29:10: fatal error: 'selinux/label.h' file not found #include <selinux/label.h>
Additionally:
Code:
make: Leaving directory '/home/user/android/lineage/kernel/oppo/msm8939'
Building DTBs
make: Entering directory '/home/user/android/lineage/kernel/oppo/msm8939'
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
DTC arch/arm/boot/dts/qcom/../msm8939-mtp-15011.dtb
make: Leaving directory '/home/user/android/lineage/kernel/oppo/msm8939'
ninja: build stopped: subcommand failed.
23:17:41 ninja failed with: exit status 1
#### failed to build some targets (13:11:17 (hh:mm:ss)) ####
:angel: Halp anyone?
Aaand lastly,
I shall take no credit for the building of this rom (should it turn out properly) because all code/kernel development are done by the amazing developers of:
https://github.com/LineageOS/android_device_oppo_r7
https://github.com/TheMuppets/proprietary_vendor_oppo
https://github.com/LineageOS

Related

[Q] pac man 5.1 kernel/rom related errors while building

hi there, im building pac 5.1 from source for my device and i get the following error(s) while building the rom from :
1. a prebuilt kernel (the zimage ofcourse)
Code:
Copy: /home/bassface/pac-rom/out/target/product/a6000/root/init.target.rc
Notice file: external/sepolicy/NOTICE -- /home/bassface/pac-rom/out/target/product/a6000/obj/NOTICE_FILES/src//root/property_contexts.txt
Install: /home/bassface/pac-rom/out/target/product/a6000/root/property_contexts
make: *** No rule to make target '/home/bassface/pac-rom/out/target/product/a6000/obj/KERNEL_OBJ/usr', needed by '/home/bassface/pac-rom/out/target/product/a6000/obj/EXECUTABLES/adbd_intermediates/adb.o'. Stop.
#### make failed to build some targets (06:57 (mm:ss)) ####
if u want the whole log - http://pastebin.com/Qcm83xrv
2.im using a prebuilt kernel because im having problems compiling a kernel :c am i missing something.?
Code:
[email protected]:~/pac-rom/kernel1/lenovo/a6000$ make config
scripts/kconfig/conf --oldaskconfig Kconfig
arch/Kconfig:436: can't open file "kernel/gcov/Kconfig"
/home/bassface/pac-rom/kernel1/lenovo/a6000/scripts/kconfig/Makefile:27: recipe for target 'config' failed
make[1]: *** [config] Error 1
Makefile:503: recipe for target 'config' failed
make: *** [config] Error 2
[email protected]:~/pac-rom/kernel1/lenovo/a6000$
i get somewhat the same error while i try compiling the kernel from source through the rom..again, am i missing something.?
i checked for the folder irq in the sources and it wasnt there.
i searched for these errors but didnt find any fix any help would be highly appreciated
Anyone.?

Compiling cm13 error 'unknown type init_shell'

Hello,
I'm coming from another phone and am new to this one. I'm jumping in to see if and where I can help with with bugs related to the cm13 device tree.
After almost a full compile, I'm running into an error I can't figure out.
Code:
No private recovery resources for TARGET_DEVICE osprey
make -C kernel/motorola/msm8916 O=/home/xclusive36/android/cm13/out/target/product/osprey/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE="/home/xclusive36/android/cm13/prebuilts/misc/linux-x86/ccache/ccache arm-eabi-" VARIANT_DEFCONFIG= SELINUX_DEFCONFIG= osprey_defconfig
host Executable: mkbootfs (/home/xclusive36/android/cm13/out/host/linux-x86/obj/EXECUTABLES/mkbootfs_intermediates/mkbootfs)
make[1]: Entering directory `/home/xclusive36/android/cm13/kernel/motorola/msm8916'
Install: /home/xclusive36/android/cm13/out/host/linux-x86/lib64/libcutils.so
/home/xclusive36/android/cm13/out/host/linux-x86/bin/checkpolicy: loading policy configuration from /home/xclusive36/android/cm13/out/target/product/osprey/obj/ETC/sepolicy_intermediates/policy.conf
device/motorola/osprey/sepolicy/init_shell.te:2:ERROR 'unknown type init_shell' at token ';' on line 26943:
#line 1 "device/motorola/osprey/sepolicy/init_shell.te"
allow init_shell utags_block_device:blk_file { getattr open read ioctl lock };
checkpolicy: error(s) encountered while parsing configuration
make: *** [/home/xclusive36/android/cm13/out/target/product/osprey/obj/ETC/sepolicy_intermediates/sepolicy] Error 1
make: *** Waiting for unfinished jobs....
GEN /home/xclusive36/android/cm13/out/target/product/osprey/obj/KERNEL_OBJ/Makefile
#
# configuration written to .config
#
make[1]: Leaving directory `/home/xclusive36/android/cm13/kernel/motorola/msm8916'
make: Leaving directory `/home/xclusive36/android/cm13'
#### make failed to build some targets (07:12 (mm:ss)) ####
Any help would be appreciated.
Thanks
xclusive36 said:
Hello,
I'm coming from another phone and am new to this one. I'm jumping in to see if and where I can help with with bugs related to the cm13 device tree.
After almost a full compile, I'm running into an error I can't figure out.
Code:
No private recovery resources for TARGET_DEVICE osprey
make -C kernel/motorola/msm8916 O=/home/xclusive36/android/cm13/out/target/product/osprey/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE="/home/xclusive36/android/cm13/prebuilts/misc/linux-x86/ccache/ccache arm-eabi-" VARIANT_DEFCONFIG= SELINUX_DEFCONFIG= osprey_defconfig
host Executable: mkbootfs (/home/xclusive36/android/cm13/out/host/linux-x86/obj/EXECUTABLES/mkbootfs_intermediates/mkbootfs)
make[1]: Entering directory `/home/xclusive36/android/cm13/kernel/motorola/msm8916'
Install: /home/xclusive36/android/cm13/out/host/linux-x86/lib64/libcutils.so
/home/xclusive36/android/cm13/out/host/linux-x86/bin/checkpolicy: loading policy configuration from /home/xclusive36/android/cm13/out/target/product/osprey/obj/ETC/sepolicy_intermediates/policy.conf
device/motorola/osprey/sepolicy/init_shell.te:2:ERROR 'unknown type init_shell' at token ';' on line 26943:
#line 1 "device/motorola/osprey/sepolicy/init_shell.te"
allow init_shell utags_block_device:blk_file { getattr open read ioctl lock };
checkpolicy: error(s) encountered while parsing configuration
make: *** [/home/xclusive36/android/cm13/out/target/product/osprey/obj/ETC/sepolicy_intermediates/sepolicy] Error 1
make: *** Waiting for unfinished jobs....
GEN /home/xclusive36/android/cm13/out/target/product/osprey/obj/KERNEL_OBJ/Makefile
#
# configuration written to .config
#
make[1]: Leaving directory `/home/xclusive36/android/cm13/kernel/motorola/msm8916'
make: Leaving directory `/home/xclusive36/android/cm13'
#### make failed to build some targets (07:12 (mm:ss)) ####
Any help would be appreciated.
Thanks
Click to expand...
Click to collapse
You'll need the SELinux patch on gerrit. It's still a WIP. http://review.cyanogenmod.org/#/c/118765/
squid2 said:
You'll need the SELinux patch on gerrit. It's still a WIP. http://review.cyanogenmod.org/#/c/118765/
Click to expand...
Click to collapse
Gotcha, thanks for the reply. I was able to get a full compile by removing that folder from the device/motorola/osprey folder. I'll take a look at that patch tonight when I get off of work and try it again with SELinux enabled.

LineageOS 14.1 - Hammerhead Issue

Code:
============================================
frameworks/av/camera/cameraserver/Android.mk:18: Target has integrated cameraserver into mediaserver. This is weakening security measures introduced in 7.0
find: ‘/home/looper/lineage/out/target/common/obj/SHARED_LIBRARIES/libwifi-hal-mock_intermediates’: No such file or directory
Starting build with ninja
ninja: Entering directory `.'
ninja: warning: phony target '-*-' names itself as an input; ignoring [-w phonycycle=warn]
ninja: error: /home/looper/lineage/out/build-lineage_hammerhead.ninja:410882: multiple rules generate /home/looper/lineage/out/target/product/hammerhead/system/etc/gps.conf [-w dupbuild=err]
make: *** [build/core/ninja.mk:152: ninja_wrapper] Error 1
make: Leaving directory '/home/looper/lineage'
#### make failed to build some targets (20 seconds) ####
device tree: github. com/LineageOS/android_device_lge_hammerhead/tree/cm-14.1
kernel: github. com/LineageOS/android_kernel_lge_hammerhead/tree/cm-14.1
vendor: github. com/TheMuppets/proprietary_vendor_lge
rom source: github. com/lineageos
Hey guys, this is my first build and I am facing this issue during the build, I have no idea how to fix the error!
find some answer from google but these are not works for me at all. so really need some professional's help.:silly:
not to resurrect an old thread, but when you downloaded TheMuppets/proprietary_vendor_lge you did change the branch to cm-14.1, right? The correct address would be: https://github.com/TheMuppets/proprietary_vendor_lge/tree/cm-14.1 [-- I made the mistake of forgetting to check the branch version ... ]

Issues with building a kernel

I'm trying to build a kernel with the CONFIG_USB_SERIAL_CH341 driver for my Xiaomi Redmi 6 running LOS, but I'm having troubles doing so. My best guess would be that I have the wrong toolchain? I would like to ask for help, any pointers, guides, reading material, etc. If you have any questions, requests for logs, ask and I'll try to hastily respond.
Linux 5.15.7
gcc (GCC) 11.1.0
arm-none-eabi-gcc (Arch Repository) 11.2.0
Target kernel
cd android_kernel_xiaomi_mt6765/
export ARCH=arm & export SUBARCH=arm
echo 'CONFIG_USB_SERIAL_CH341=y' >> arch/arm/configs/cereus_defconfig
make clean
make mrproper
make cereus_defconfig
make -j$(nproc)
Returns: 'Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler'.
After commenting out the stackprotector from the defconfig and making again... returns:
'/usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
HOSTLD scripts/genksyms/genksyms
collect2: error: ld returned 1 exit status
make[2]: *** [scripts/Makefile.host:110: scripts/dtc/dtc] Error 1
make[1]: *** [scripts/Makefile.build:648: scripts/dtc] Error 2
make: *** [Makefile:560: scripts] Error 2'
I tried removing the yylloc lines from the dtc related files, but only to watch even more bizarre errors being thrown at me... From what I searched prepending the line with the 'extern' modifier was a common fix, but in the source code it was already defined as extern YYLTYPE yylloc;
I would be very grateful for any help.

Need help with error while building unofficial crDroid ROM for my phone

So I am building an unofficial copy of crDroid for my OnePlus 9R and I am getting this error:
Code:
error: hardware/oneplus/hidl/fingerprint/inscreen/Android.bp:44:1: "[email protected]" depends on undefined module "vendor.lineage.biometrics.fingerprint.inscree
[email protected]"
12:01:38 soong bootstrap failed with: exit status 1
#### failed to build some targets (01:32 (mm:ss)) ####
This never happened to me while building LineageOS 18.1. I am pretty new to compiling ROMs from source, so please help.
Thank you.
Errors while compiling crDroid 8 for OnePlus 9R
So, I was building crDroid for my phone the OnePlus 9R (codename: lemonades), and I encountered 2 errors.
The first one was after using the lunch command and selecting my device. The error was:
Code:
Which would you like? [aosp_arm-eng] 30
device/oneplus/sm8250-common/BoardConfigCommon.mk:181: warning: BOARD_PLAT_PRIVATE_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead.
Trying dependencies-only mode on a non-existing device tree?
device/oneplus/sm8250-common/BoardConfigCommon.mk:181: warning: BOARD_PLAT_PRIVATE_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead.
Now, I ignored this, and used the brunch command to start building the ROM, when I got this error:
Code:
error: hardware/oneplus/hidl/fingerprint/inscreen/Android.bp:44:1: "lineage.biom
[email protected]" depends on undefined module "ve
[email protected]"
17:03:33 soong bootstrap failed with: exit status 1
#### failed to build some targets (18 seconds) ####
Now, I assume I got this error due to missing files, so I re - downloaded the complete source code, and tried to build again, but I still got the same error.
I am pretty new to ROM development, and have no Idea what to do next, so any help would be appreciated.
Thank You.
(I have also attached Images of the errors.)
KomradeKamarov said:
Errors while compiling crDroid 8 for OnePlus 9R
So, I was building crDroid for my phone the OnePlus 9R (codename: lemonades), and I encountered 2 errors.
The first one was after using the lunch command and selecting my device. The error was:
Code:
Which would you like? [aosp_arm-eng] 30
device/oneplus/sm8250-common/BoardConfigCommon.mk:181: warning: BOARD_PLAT_PRIVATE_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead.
Trying dependencies-only mode on a non-existing device tree?
device/oneplus/sm8250-common/BoardConfigCommon.mk:181: warning: BOARD_PLAT_PRIVATE_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead.
Now, I ignored this, and used the brunch command to start building the ROM, when I got this error:
Code:
error: hardware/oneplus/hidl/fingerprint/inscreen/Android.bp:44:1: "lineage.biom
[email protected]" depends on undefined module "ve
[email protected]"
17:03:33 soong bootstrap failed with: exit status 1
#### failed to build some targets (18 seconds) ####
Now, I assume I got this error due to missing files, so I re - downloaded the complete source code, and tried to build again, but I still got the same error.
I am pretty new to ROM development, and have no Idea what to do next, so any help would be appreciated.
Thank You.
(I have also attached Images of the errors.)View attachment 5567035View attachment 5567037
Click to expand...
Click to collapse
i know this is a old thread but the correct sequence for crDroid buidling is the following:
1. repo sync
2. . build/envsetup.sh
3. brunch (followed by your device codename. I have the 9 Pro so mine would be brunch lemonadep
4. If it errors, then try
mka bacon -j$(nproc --all)
5. If it errors again, try brunch (followed by codename again)
I've gotten my phone to build successfully by doing this after it failed the first two times.

Categories

Resources