Get compile error on Lineage 16.0 when brunch bacon - android-source

I am building customer ROM for my OnePluse 1 phone based on lineage 16.0. After making some changes and brunch bacon, i got below error:
ju#suz-ubt-01l:~/android/lineage$ brunch bacon
...
...
...
build/target/product/core.mk was modified, regenerating...
[625/1039] including system/sepolicy/Android.mk ...
system/sepolicy/Android.mk:88: warning: Be careful when using the SELINUX_IGNORE_NEVERALLOWS flag. It does not work in user builds and using it will not stop you from failing CTS.
[1039/1039] including vendor/qcom/opensource/dataservices/Android.mk ...
build/make/core/Makefile:28: warning: overriding commands for target `/home/ju/android/lineage/out/target/product/bacon/system/vendor/lib/hw/android.hardware.nfc#1.0-impl.so'
build/make/core/base_rules.mk:412: warning: ignoring old commands for target `/home/ju/android/lineage/out/target/product/bacon/system/vendor/lib/hw/android.hardware.nfc#1.0-impl.so'
[ 86% 94/109] Building Kernel Config
make: Entering directory '/home/ju/android/lineage/kernel/oppo/msm8974'
GEN /home/ju/android/lineage/out/target/product/bacon/obj/KERNEL_OBJ/Makefile
#
# configuration written to .config
#
make: Leaving directory '/home/ju/android/lineage/kernel/oppo/msm8974'
make: Entering directory '/home/ju/android/lineage/kernel/oppo/msm8974'
GEN /home/ju/android/lineage/out/target/product/bacon/obj/KERNEL_OBJ/Makefile
scripts/kconfig/conf --savedefconfig=defconfig Kconfig
make: Leaving directory '/home/ju/android/lineage/kernel/oppo/msm8974'
[ 87% 95/109] Building Kernel
FAILED: TARGET_KERNEL_BINARIES
/bin/bash -c "(make -j2 -j\$(nproc) CFLAGS_MODULE=\"-fno-pic\" -C kernel/oppo/msm8974 O=/home/ju/android/lineage/out/target/product/bacon/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=\"/usr/bin/ccache arm-linux-androidkernel-\" zImage ) && (if grep -q '^CONFIG_OF=y' /home/ju/android/lineage/out/target/product/bacon/obj/KERNEL_OBJ/.config; then echo \"Building DTBs\";make -j2 -j\$(nproc) CFLAGS_MODULE=\"-fno-pic\" -C kernel/oppo/msm8974 O=/home/ju/android/lineage/out/target/product/bacon/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=\"/usr/bin/ccache arm-linux-androidkernel-\" dtbs; fi ) && (if grep -q '=m' /home/ju/android/lineage/out/target/product/bacon/obj/KERNEL_OBJ/.config; then echo \"Building Kernel Modules\"; make -j2 -j\$(nproc) CFLAGS_MODULE=\"-fno-pic\" -C kernel/oppo/msm8974 O=/home/ju/android/lineage/out/target/product/bacon/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=\"/usr/bin/ccache arm-linux-androidkernel-\" modules; fi )"
make: Entering directory '/home/ju/android/lineage/kernel/oppo/msm8974'
File "/home/ju/android/lineage/kernel/oppo/msm8974/scripts/gcc-wrapper.py", line 59
print "error, forbidden warning:", m.group(2)
^
SyntaxError: invalid syntax
GEN /home/ju/android/lineage/out/target/product/bacon/obj/KERNEL_OBJ/Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
File "/home/ju/android/lineage/kernel/oppo/msm8974/scripts/gcc-wrapper.py", line 59
print "error, forbidden warning:", m.group(2)
^
SyntaxError: invalid syntax
GEN /home/ju/android/lineage/out/target/product/bacon/obj/KERNEL_OBJ/Makefile
CHK include/linux/version.h
CC scripts/mod/empty.o
File "/home/ju/android/lineage/kernel/oppo/msm8974/scripts/gcc-wrapper.py", line 59
print "error, forbidden warning:", m.group(2)
^
SyntaxError: invalid syntax
/home/ju/android/lineage/kernel/oppo/msm8974/scripts/Makefile.build:307: recipe for target 'scripts/mod/empty.o' failed
make[3]: *** [scripts/mod/empty.o] Error 1
/home/ju/android/lineage/kernel/oppo/msm8974/scripts/Makefile.build:443: recipe for target 'scripts/mod' failed
make[2]: *** [scripts/mod] Error 2
/home/ju/android/lineage/kernel/oppo/msm8974/Makefile:510: recipe for target 'scripts' failed
make[1]: *** [scripts] Error 2
make[1]: *** Waiting for unfinished jobs....
Makefile:130: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
make: Leaving directory '/home/ju/android/lineage/kernel/oppo/msm8974'
ninja: build stopped: subcommand failed.
10:45:43 ninja failed with: exit status 1
#### failed to build some targets (01:13 (mm:ss)) ####
My environment info as below:
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
LINEAGE_VERSION=16.0-20200110-UNOFFICIAL-bacon
TARGET_PRODUCT=lineage_bacon
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.0.0-37-generic-x86_64-Ubuntu-18.04.3-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PQ3A.190801.002
OUT_DIR=/home/ju/android/lineage/out
PRODUCT_SOONG_NAMESPACES= hardware/qcom/audio-caf/msm8974 hardware/qcom/display-caf/msm8974
hardware/qcom/media-caf/msm8974
My python version is "Python 3.6.8 :: Anaconda, Inc."
Andy help should be appreciated, Thank you very much.

Create Conda environment with python version 2.7

Related

stk11xx driver on raspberry-pi installation error

I have an error in my instalation in my raspberry-pi 3, it's a driver for a web-cam
I took the driver on this page:
https://github.com/hbars/stk11xx-driver
and the manual for this instalation is here:
https://github.com/hbars/stk11xx-driver/blob/master/INSTALL
it's on this line:
make -f Makefile.standalone driver
error:
make -f Makefile.standalone driver
make -C /lib/modules/4.19.66-v7+/build SUBDIRS=/home/pi/stk11xx-2.1.0 modules
make[1]: Entering directory '/usr/src/linux-headers-4.19.66-v7+'
CC [M] /home/pi/stk11xx-2.1.0/stk11xx-usb.o
/home/pi/stk11xx-2.1.0/stk11xx-usb.c: In function 'usb_stk11xx_probe':
/home/pi/stk11xx-2.1.0/stk11xx-usb.c:793:2: error: implicit declaration of function 'init_MUTEX' [-Werror=implicit-function-declaration]
init_MUTEX(&dev->mutex);
^~~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:303: recipe for target '/home/pi/stk11xx-2.1.0/stk11xx-usb.o' failed
make[2]: *** [/home/pi/stk11xx-2.1.0/stk11xx-usb.o] Error 1
Makefile:1519: recipe for target '_module_/home/pi/stk11xx-2.1.0' failed
make[1]: *** [_module_/home/pi/stk11xx-2.1.0] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.19.66-v7+'
Makefile.standalone:13: recipe for target 'driver' failed
make: *** [driver] Error 2
sorry this is not the good error it's the one:
make -C /lib/modules/4.19.66-v7+/build SUBDIRS=/home/pi/stk11xx-driver modules
make[1]: Entering directory '/usr/src/linux-headers-4.19.66-v7+'
mkdir: cannot create directory '/home/pi/stk11xx-driver/.tmp_versions': Permission denied
/bin/sh: 1: cannot create /home/pi/stk11xx-driver/modules.order: Permission denied
scripts/Makefile.build:462: recipe for target '/home/pi/stk11xx-driver/modules.order' failed
make[2]: *** [/home/pi/stk11xx-driver/modules.order] Error 2
Makefile:1519: recipe for target '_module_/home/pi/stk11xx-driver' failed
make[1]: *** [_module_/home/pi/stk11xx-driver] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.19.66-v7+'
Makefile.standalone:13: recipe for target 'driver' failed
make: *** [driver] Error 2
I have resolved my problem I had to put sudo in front of make -f Makefile.standalone driver
but I have an other error:
make -C /lib/modules/4.19.66-v7+/build SUBDIRS= modules
make[1]: Entering directory '/usr/src/linux-headers-4.19.66-v7+'
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --syncconfig Kconfig
make[2]: *** No rule to make target 'arch/arm/tools/syscall.tbl', needed by 'arch/arm/include/generated/uapi/asm/unistd-common.h'. Stop.
arch/arm/Makefile:319: recipe for target 'archheaders' failed
make[1]: *** [archheaders] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.19.66-v7+'
Makefile.standalone:13: recipe for target 'driver' failed
make: *** [driver] Error 2
So I have resolved my problem, replacing all PWD whith shell pwd in Makefile.standalonee

configure//make error on Ubuntu Pjsip PJproject

I am trying to extract opus rtp packets and convert them into wav format from the pcap file. In order to do so, I installed pjproject2.6 using the following commands:
cd pjproject2.6/
./configure
make dep && make
After the last command, I ran into the following error:
In file included from /usr/include/c++/7/cmath:47:0,
from /usr/include/c++/7/math.h:36,
from ../../yuv/source/compare.cc:14:
/usr/include/c++/7/bits/std_abs.h: In function ‘constexpr long double std::abs(long double)’:
/usr/include/c++/7/bits/std_abs.h:78:22: error: x87 register return with x87 disabled
abs(long double __x)
^
/home/administrator/pjproject-2.6/build/rules.mak:178: recipe for target 'output/libyuv-x86_64-unknown-linux-gnu/compare.o' failed
make[3]: *** [output/libyuv-x86_64-unknown-linux-gnu/compare.o] Error 1
make[3]: Leaving directory '/home/administrator/pjproject-2.6/third_party/build/yuv'
Makefile:100: recipe for target 'libyuv-x86_64-unknown-linux-gnu.a' failed
make[2]: *** [libyuv-x86_64-unknown-linux-gnu.a] Error 2
make[2]: Leaving directory '/home/administrator/pjproject-2.6/third_party/build/yuv'
Makefile:7: recipe for target 'all' failed
make[1]: *** [all] Error 1
make[1]: Leaving directory '/home/administrator/pjproject-2.6/third_party/build'
Makefile:14: recipe for target 'all' failed
make: *** [all] Error 1
Any suggestions? Thanks in advance!

unable to build core-image-sato with yocto rocko

I'm just starting out with yocto. Reading Embedded Linux Systems with the Yocto Project. Downloaded latest rocko release with git, created a new environment and ran bitbake core-image-sato. Got the following errors during build
ERROR: binutils-native-2.29-r0 do_install: oe_runmake failed
ERROR: binutils-native-2.29-r0 do_install: Function failed: do_install (log file is located at /home/some-user/projects/rpi-yocto-build/tmp/work/x86_64-linux/binutils-native/2.29-r0/temp/log.do_install.73730)
ERROR: Logfile of failure stored in: /home/some-user/projects/rpi-yocto-build/tmp/work/x86_64-linux/binutils-native/2.29-r0/temp/log.do_install.73730
...
...
...
ERROR: Task (virtual:native:/home/some-user/projects/poky/meta/recipes-devtools/binutils/binutils_2.29.bb:do_install) failed with exit code '1'
NOTE: Tasks Summary: Attempted 826 tasks of which 431 didn't need to be rerun and 1 failed.
Looked at the home/some-user/projects/rpi-yocto-build/tmp/work/x86_64-linux/binutils-native/2.29-r0/temp/log.do_install.73730 log file and found the following in it
/home/some-user/projects/rpi-yocto-build/tmp/hosttools/ld: cannot find ../bfd/.libs/libbfd.a: No such file or directory
collect2: error: ld returned 1 exit status
Makefile:1116: recipe for target 'ld-new' failed
make[4]: *** [ld-new] Error 1
make[4]: Leaving directory '/home/some-user/projects/rpi-yocto-build/tmp/work/x86_64-linux/binutils-native/2.29-r0/git/build.x86_64-linux.x86_64-linux/ld'
Makefile:1760: recipe for target 'install-recursive' failed
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory '/home/some-user/projects/rpi-yocto-build/tmp/work/x86_64-linux/binutils-native/2.29-r0/git/build.x86_64-linux.x86_64-linux/ld'
Makefile:1931: recipe for target 'install' failed
make[2]: *** [install] Error 2
make[2]: Leaving directory '/home/some-user/projects/rpi-yocto-build/tmp/work/x86_64-linux/binutils-native/2.29-r0/git/build.x86_64-linux.x86_64-linux/ld'
Makefile:7204: recipe for target 'install-ld' failed
make[1]: *** [install-ld] Error 2
make[1]: *** Waiting for unfinished jobs...
Is ../bfd/.libs/libbfd.a something I should have installed on my machine or it is rocko that is missing it? Is there a fix for this?
I'd suggest that that isn't the actual error, but a subsequent one. Can you do bitbake binutils-native -cclean (to wipe away the partial build) and then bitbake binutils-native, and assuming it breaks again pastebin the entire log.do_install.
Also I've not read that book but it might be worth trying with MACHINE=qemux86 from just a clone of Poky, so we can rule out other layers or configuration.

How can I solve a "do_compile ERROR" when building a Yocto recipe with Toaster?

everytime I want to build the rpi-basic-image I get the following error:
DEBUG: Executing shell function do_compile
CHK include/config/kernel.release
GEN ./Makefile
CHK include/generated/uapi/linux/version.h
Using /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source as source for kernel
CHK include/generated/utsrelease.h
CC scripts/mod/devicetable-offsets.s
In file included from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/linux/compiler.h:54:0,
from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/uapi/linux/stddef.h:1,
from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/linux/stddef.h:4,
from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/uapi/linux/posix_types.h:4,
from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/uapi/linux/types.h:13,
from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/linux/types.h:5,
from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/linux/mod_devicetable.h:11,
from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/scripts/mod/devicetable-offsets.c:2:
/home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/linux/compiler-gcc.h:121:30: fatal error: linux/compiler-gcc6.h: No such file or directory
#include gcc_header(__GNUC__)
^
compilation terminated.
/home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/scripts/Makefile.build:153: recipe for target 'scripts/mod/devicetable-offsets.s' failed
make[4]: *** [scripts/mod/devicetable-offsets.s] Error 1
/home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/scripts/Makefile.build:403: recipe for target 'scripts/mod' failed
make[3]: *** [scripts/mod] Error 2
/home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/Makefile:555: recipe for target 'scripts' failed
make[2]: *** [scripts] Error 2
Makefile:146: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
Makefile:24: recipe for target '__sub-make' failed
make: *** [__sub-make] Error 2
WARNING: exit code 1 from a shell command.
ERROR: Function failed: do_compile (log file is located at /home/dennis/poky/build-toaster-3/tmp/work/raspberrypi2-poky-linux-gnueabi/linux-raspberrypi/1_4.1.21+gitAUTOINC+ff45bc0e89-r0/temp/log.do_compile.11315)
Does anybody know how to solve it and what's the reason for it?
Thanks
This has been noticed on the yocto#yoctoproject.org mailing list.
Seems to be resolved with a patch, but I did not test it- I'm only forwarding the conversation and hoping this will help.
Last mail from the thread:
http://article.gmane.org/gmane.linux.embedded.yocto.general/30168/match=gcc+6.1+raspi
Patch used: http://article.gmane.org/gmane.linux.embedded.yocto.general/30093/

How to build Stanford Dune OS?

I am trying to build the Standford Dune OS with:
git clone http://dune.scs.stanford.edu/dune.git
make -C kern
but I get the following errors:
make[1]: Entering directory `/home/think/Desktop/build/dune/kern'
mkdir -p /home/think/Desktop/build/dune/kern/tmp/.tmp_versions
make -C /lib/modules/3.11.0-12-generic/build M=/home/think/Desktop/build/dune/kern MODVERDIR=/home/think/Desktop/build/dune/kern/tmp/.tmp_versions modules
make[2]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
CC [M] /home/think/Desktop/build/dune/kern/vmx.o
/home/think/Desktop/build/dune/kern/vmx.c: In function ‘vmx_setup_initial_guest_state’:
/home/think/Desktop/build/dune/kern/vmx.c:793:10: error: ‘X86_CR4_RDWRGSFS’ undeclared (first use in this function)
cr4 |= X86_CR4_RDWRGSFS;
^
/home/think/Desktop/build/dune/kern/vmx.c:793:10: note: each undeclared identifier is reported only once for each function it appears in
/home/think/Desktop/build/dune/kern/vmx.c: In function ‘vmx_enable’:
/home/think/Desktop/build/dune/kern/vmx.c:1631:2: error: implicit declaration of function ‘store_gdt’ [-Werror=implicit-function-declaration]
store_gdt(&__get_cpu_var(host_gdt));
^
cc1: some warnings being treated as errors
make[3]: *** [/home/think/Desktop/build/dune/kern/vmx.o] Error 1
make[2]: *** [_module_/home/think/Desktop/build/dune/kern] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-3.11.0-12-generic'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/think/Desktop/build/dune/kern'
make: *** [kern] Error 2
How can I fix this?
downgrade your kernel! I am using 3.2.0. wanted to port dune to 3.14.0 but just didn't have time..