Hi Team,
I am trying to build LXC as part of OpenWRT+RaspberryPI environment, but I am facing issues during the build.
conf/bblayers.conf
layer path priority
meta /home/ubuntu/yocto/openembedded-core/meta 5
meta-oe /home/ubuntu/yocto/openembedded-core/meta-openembedded/meta-oe 6
meta-python /home/ubuntu/yocto/openembedded-core/meta-openembedded/meta-python 7
meta-networking /home/ubuntu/yocto/openembedded-core/meta-openembedded/meta-networking 5
meta-filesystems /home/ubuntu/yocto/openembedded-core/meta-openembedded/meta-filesystems 6
meta-virtualization /home/ubuntu/yocto/openembedded-core/meta-virtualization 8
meta-raspberrypi /home/ubuntu/yocto/openembedded-core/meta-raspberrypi 9
meta-openwrt /home/ubuntu/yocto/openembedded-core/meta-openwrt 8
conf/local.conf
MACHINE ??= "raspberrypi3"
INHERIT += " openwrt-distro-defaults "
DISTRO_FEATURES_append = " virtualization wifi"
MACHINE_EXTRA_RRECOMMENDS += "kernel-modules linux-firmware-bcm43430 linux-firmware-bcm43455"
TCLIBC = "musl"
IMAGE_INSTALL_append = " lxc curl initscripts hostapd linux-firmware-bcm43430 linux-firmware-bcm43455 bridge-utils bash openssh kernel-modules iptables dhcp-client"
ERROR:
ebug-prefix-map=/home/ubuntu/yocto/buildyp/tmp-musl/work/cortexa7hf-neon-vfpv4-oe-linux-musleabi/lxc/3.0.1-r0/recipe-sysroot-native= -Wno-error=deprecated-declarations -Wall -Werror -c ../../../lxc-3.0.1/src/lxc/conf.c -fPIC -DPIC -o .libs/liblxc_la-conf.o
| ../../../lxc-3.0.1/src/lxc/parse.c: In function 'lxc_file_for_each_line_mmap':
| ../../../lxc-3.0.1/src/lxc/parse.c:97:17: error: implicit declaration of function 'strtok_r'; did you mean 'strtok'? [-Werror=implicit-function-declaration]
| for (; (line = strtok_r(buf, "\n\0", &saveptr)); buf = NULL) {
| ^~~~~~~~
| strtok
| ../../../lxc-3.0.1/src/lxc/parse.c:97:15: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
| for (; (line = strtok_r(buf, "\n\0", &saveptr)); buf = NULL) {
| ^
sysroot-native= -Wno-error=deprecated-declarations -Wall -Werror -c ../../../lxc-3.0.1/src/lxc/namespace.c -o liblxc_la-namespace.o >/dev/null 2>&1
| cc1: all warnings being treated as errors
| Makefile:1765: recipe for target 'liblxc_la-parse.lo' failed
| make[3]: *** [liblxc_la-parse.lo] Error 1
| make[3]: *** Waiting for unfinished jobs....
| arm-oe-linux-musleabi-libtool: compile: arm-oe-linux-musleabi-gcc -march=armv7ve -marm -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/home/ubuntu/yocto/buildyp/tmp-musl/work/cortexa7hf-neon-vfpv4-oe-linux-musleabi/lxc/3.0.1-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../../../lxc-3.0.1/src/lxc -I../../src -fPIC -DPIC -DLXCROOTFSMOUNT="/usr/lib/lxc/rootfs" -DLXCPATH="/var/lib/lxc" -DLXC_GLOBAL_CONF="/etc/lxc/lxc.conf" -DLXCINITDIR="/usr/libexec" -DLIBEXECDIR="/usr/libexec" -DLXCTEMPLATEDIR="/usr/share/lxc/templates" -DLXCTEMPLATECONFIG="/usr/share/lxc/config" -DLOGPATH="/var/log/lxc" -DLXC_DEFAULT_CONFIG="/etc/lxc/default.conf" -DLXC_USERNIC_DB="/run/lxc/nics" -DLXC_USERNIC_CONF="/etc/lxc/lxc-usernet" -DDEFAULT_CGROUP_PATTERN="lxc/%n" -DRUNTIME_PATH="/run" -DSBINDIR="/usr/sbin" -I ../../../lxc-3.0.1/src -I ../../../lxc-3.0.1/src/lxc -I ../../../lxc-3.0.1/src/lxc/storage -I ../../../lxc-3.0.1/src/lxc/cgroups -pthread -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/ubuntu/yocto/buildyp/tmp-musl/work/cortexa7hf-neon-vfpv4-oe-linux-musleabi/lxc/3.0.1-r0=/usr/src/debug/lxc/3.0.1-r0 -fdebug-prefix-map=/home/ubuntu/yocto/buildyp/tmp-musl/work/cortexa7hf-neon-vfpv4-oe-linux-musleabi/lxc/3.0.1-r0/recipe-sysroot= -fdebug-prefix-map=/home/ubuntu/yocto/buildyp/tmp-musl/work/cortexa7hf-neon-vfpv4-oe-linux-musleabi/lxc/3.0.1-r0/recipe-sysroot-native= -Wno-error=deprecated-declarations -Wall -Werror -c ../../../lxc-3.0.1/src/lxc/conf.c -o liblxc_la-conf.o >/dev/null 2>&1
| make[3]: Leaving directory '/home/ubuntu/yocto/buildyp/tmp-musl/work/cortexa7hf-neon-vfpv4-oe-linux-musleabi/lxc/3.0.1-r0/build/src/lxc'
| Makefile:419: recipe for target 'all-recursive' failed
| make[2]: *** [all-recursive] Error 1
| make[2]: Leaving directory '/home/ubuntu/yocto/buildyp/tmp-musl/work/cortexa7hf-neon-vfpv4-oe-linux-musleabi/lxc/3.0.1-r0/build/src'
| Makefile:358: recipe for target 'all' failed
| make[1]: *** [all] Error 2
| make[1]: Leaving directory '/home/ubuntu/yocto/buildyp/tmp-musl/work/cortexa7hf-neon-vfpv4-oe-linux-musleabi/lxc/3.0.1-r0/build/src'
| Makefile:509: recipe for target 'all-recursive' failed
| make: *** [all-recursive] Error 1
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/ubuntu/yocto/buildyp/tmp-musl/work/cortexa7hf-neon-vfpv4-oe-linux-musleabi/lxc/3.0.1-r0/temp/log.do_compile.26918)
I am able to build the lxc_2.0.8 with the same configuration, I am only getting this error after upgrading the lxc version to 3.0.1
Please let me know how to proceed further on this.
Thanks & Regards,
Satish Kumar Andey
Hi Team,
I am trying to build LXC as part of OpenWRT+RaspberryPI environment, but I am facing issues during the build.
conf/bblayers.conf
layer path priority
meta /home/ubuntu/yocto/openembedded-core/meta 5
meta-oe /home/ubuntu/yocto/openembedded-core/meta-openembedded/meta-oe 6
meta-python /home/ubuntu/yocto/openembedded-core/meta-openembedded/meta-python 7
meta-networking /home/ubuntu/yocto/openembedded-core/meta-openembedded/meta-networking 5
meta-filesystems /home/ubuntu/yocto/openembedded-core/meta-openembedded/meta-filesystems 6
meta-virtualization /home/ubuntu/yocto/openembedded-core/meta-virtualization 8
meta-raspberrypi /home/ubuntu/yocto/openembedded-core/meta-raspberrypi 9
meta-openwrt /home/ubuntu/yocto/openembedded-core/meta-openwrt 8
conf/local.conf
MACHINE ??= "raspberrypi3"
INHERIT += " openwrt-distro-defaults "
DISTRO_FEATURES_append = " virtualization wifi"
MACHINE_EXTRA_RRECOMMENDS += "kernel-modules linux-firmware-bcm43430 linux-firmware-bcm43455"
TCLIBC = "musl"
IMAGE_INSTALL_append = " lxc curl initscripts hostapd linux-firmware-bcm43430 linux-firmware-bcm43455 bridge-utils bash openssh kernel-modules iptables dhcp-client"
ERROR:
ebug-prefix-map=/home/ubuntu/yocto/buildyp/tmp-musl/work/cortexa7hf-neon-vfpv4-oe-linux-musleabi/lxc/3.0.1-r0/recipe-sysroot-native= -Wno-error=deprecated-declarations -Wall -Werror -c ../../../lxc-3.0.1/src/lxc/conf.c -fPIC -DPIC -o .libs/liblxc_la-conf.o
| ../../../lxc-3.0.1/src/lxc/parse.c: In function 'lxc_file_for_each_line_mmap':
| ../../../lxc-3.0.1/src/lxc/parse.c:97:17: error: implicit declaration of function 'strtok_r'; did you mean 'strtok'? [-Werror=implicit-function-declaration]
| for (; (line = strtok_r(buf, "\n\0", &saveptr)); buf = NULL) {
| ^~~~~~~~
| strtok
| ../../../lxc-3.0.1/src/lxc/parse.c:97:15: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
| for (; (line = strtok_r(buf, "\n\0", &saveptr)); buf = NULL) {
| ^
sysroot-native= -Wno-error=deprecated-declarations -Wall -Werror -c ../../../lxc-3.0.1/src/lxc/namespace.c -o liblxc_la-namespace.o >/dev/null 2>&1
| cc1: all warnings being treated as errors
| Makefile:1765: recipe for target 'liblxc_la-parse.lo' failed
| make[3]: *** [liblxc_la-parse.lo] Error 1
| make[3]: *** Waiting for unfinished jobs....
| arm-oe-linux-musleabi-libtool: compile: arm-oe-linux-musleabi-gcc -march=armv7ve -marm -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/home/ubuntu/yocto/buildyp/tmp-musl/work/cortexa7hf-neon-vfpv4-oe-linux-musleabi/lxc/3.0.1-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../../../lxc-3.0.1/src/lxc -I../../src -fPIC -DPIC -DLXCROOTFSMOUNT="/usr/lib/lxc/rootfs" -DLXCPATH="/var/lib/lxc" -DLXC_GLOBAL_CONF="/etc/lxc/lxc.conf" -DLXCINITDIR="/usr/libexec" -DLIBEXECDIR="/usr/libexec" -DLXCTEMPLATEDIR="/usr/share/lxc/templates" -DLXCTEMPLATECONFIG="/usr/share/lxc/config" -DLOGPATH="/var/log/lxc" -DLXC_DEFAULT_CONFIG="/etc/lxc/default.conf" -DLXC_USERNIC_DB="/run/lxc/nics" -DLXC_USERNIC_CONF="/etc/lxc/lxc-usernet" -DDEFAULT_CGROUP_PATTERN="lxc/%n" -DRUNTIME_PATH="/run" -DSBINDIR="/usr/sbin" -I ../../../lxc-3.0.1/src -I ../../../lxc-3.0.1/src/lxc -I ../../../lxc-3.0.1/src/lxc/storage -I ../../../lxc-3.0.1/src/lxc/cgroups -pthread -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/ubuntu/yocto/buildyp/tmp-musl/work/cortexa7hf-neon-vfpv4-oe-linux-musleabi/lxc/3.0.1-r0=/usr/src/debug/lxc/3.0.1-r0 -fdebug-prefix-map=/home/ubuntu/yocto/buildyp/tmp-musl/work/cortexa7hf-neon-vfpv4-oe-linux-musleabi/lxc/3.0.1-r0/recipe-sysroot= -fdebug-prefix-map=/home/ubuntu/yocto/buildyp/tmp-musl/work/cortexa7hf-neon-vfpv4-oe-linux-musleabi/lxc/3.0.1-r0/recipe-sysroot-native= -Wno-error=deprecated-declarations -Wall -Werror -c ../../../lxc-3.0.1/src/lxc/conf.c -o liblxc_la-conf.o >/dev/null 2>&1
| make[3]: Leaving directory '/home/ubuntu/yocto/buildyp/tmp-musl/work/cortexa7hf-neon-vfpv4-oe-linux-musleabi/lxc/3.0.1-r0/build/src/lxc'
| Makefile:419: recipe for target 'all-recursive' failed
| make[2]: *** [all-recursive] Error 1
| make[2]: Leaving directory '/home/ubuntu/yocto/buildyp/tmp-musl/work/cortexa7hf-neon-vfpv4-oe-linux-musleabi/lxc/3.0.1-r0/build/src'
| Makefile:358: recipe for target 'all' failed
| make[1]: *** [all] Error 2
| make[1]: Leaving directory '/home/ubuntu/yocto/buildyp/tmp-musl/work/cortexa7hf-neon-vfpv4-oe-linux-musleabi/lxc/3.0.1-r0/build/src'
| Makefile:509: recipe for target 'all-recursive' failed
| make: *** [all-recursive] Error 1
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/ubuntu/yocto/buildyp/tmp-musl/work/cortexa7hf-neon-vfpv4-oe-linux-musleabi/lxc/3.0.1-r0/temp/log.do_compile.26918)
I am able to build the lxc_2.0.8 with the same configuration, I am only getting this error after upgrading the lxc version to 3.0.1
Please let me know how to proceed further on this.
Thanks & Regards,
Satish Kumar Andey