fatal error: json-c/json.h: No such file or directory - yocto

I bitbake my foo.bb
I don't know what to do to solve this problem, should I add something in RDEPENDS or DEPENDS?
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 8
| gcc -std=c99 -g -D_XOPEN_SOURCE=600 -lndctl -ljson-c fis.c -o fis
| fis.c:24:10: fatal error: json-c/json.h: No such file or directory
| #include <json-c/json.h>
| ^~~~~~~~~~~~~~~
| compilation terminated.

Add these two lines to your bb file. Try to build foo
DEPENDS = "json-c"
TARGET_LDFLAGS = "-ljson-c"

<json-c/json.h> is provided by the recipe:
poky/meta/recipes-devtools/json-c
In order to make its output available to your recipe at compile time, you should specify it as compile-time dependency using DEPENDS.
foo.bb :
DEPENDS += "json-c"
For more info check here.

Related

Update custom device tree on yocto

I am using the sama5d27-wlsom1-ek board for my demo and I am trying to make changes to the device tree.
So far I have compiled core-image-minimal and find my dtb files are generated in
/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/build/arch/arm/boot/dts
folder.
Also I find many different dts files in
build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/arch/arm/boot/dts
But where does my machine get device tree files if they are generated inside the build folder and if I use my custom dts file how do I update them?
I want to build the image using my custom.dts file where I enable certain peripherals and disable the ones not required. (A test to customize dtb's in future).
I tried different methods found here
How to use an own device tree and modified kernel config in Yocto?
as well as
Quick rebuild of device tree only with Yocto/bitbake?
I created a new meta-local layer and added it to bblayer
followed by recipetool command to add my dts file to the new layer. Added KERNEL_DEVICETREE += "custom.dtb" to the .bbappend file generated inside meta-local and then run bitbake build image command so far
But, I seem to run into the following errors when I try to build the image.
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 3474 entries from dependency cache.
Parsing recipes: 100% |##########################################| Time: 0:00:00
Parsing of 2309 .bb files complete (2307 cached, 2 parsed). 3476 targets, 358 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.46.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "sama5d27-wlsom1-ek-sd"
DISTRO = "poky-atmel"
DISTRO_VERSION = "3.1.7"
TUNE_FEATURES = "arm vfp cortexa5 neon vfpv4 thumb callconvention-hard"
TARGET_FPU = "hard"
meta
meta-poky
meta-yocto-bsp = "dunfell:97a9f30f1c457c55bf0c791d0466ff8620110a49"
meta-oe
meta-networking
meta-webserver
meta-python
meta-initramfs = "dunfell:2915810edbb6599051e30efb3b7f805665ddcc23"
meta-atmel = "dunfell:d6e30f2c0e3592ed11f3a4c8380a14d0a9066ba6"
meta-multimedia = "dunfell:2915810edbb6599051e30efb3b7f805665ddcc23"
meta-aws = "dunfell:2e2a1c65603dc5d11349e25dc9470a65cbeb8e65"
meta-freshair
meta-local
workspace = "dunfell:97a9f30f1c457c55bf0c791d0466ff8620110a49"
Initialising tasks: 100% |#######################################| Time: 0:00:04
Sstate summary: Wanted 294 Found 262 Missed 32 Current 2095 (89% match, 98% complete)
NOTE: Executing Tasks
ERROR: linux-at91-5.4+gitAUTOINC+3dba8c9991-r0 do_compile: oe_runmake failed
ERROR: linux-at91-5.4+gitAUTOINC+3dba8c9991-r0 do_compile: Execution of '/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/temp/run.do_compile.57871' failed with exit code 1:
GEN Makefile
CALL /home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/scripts/atomic/check-atomics.sh
CALL /home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/scripts/checksyscalls.sh
CHK include/generated/compile.h
Kernel: arch/arm/boot/Image is ready
Kernel: arch/arm/boot/zImage is ready
make[2]: *** No rule to make target 'arch/arm/boot/dts/new_name.dtb'. Stop.
make[1]: *** [/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/Makefile:1265: new_name.dtb] Error 2
make: *** [/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/Makefile:179: sub-make] Error 2
WARNING: exit code 1 from a shell command.
ERROR: Logfile of failure stored in: /home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/temp/log.do_compile.57871
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: KBUILD_BUILD_TIMESTAMP: Thu Jan 14 12:54:56 UTC 2021
| NOTE: make -j 12 HOSTCC=gcc -isystem/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 HOSTCPP=gcc -E HOSTCXX=g++ -isystem/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 zImage CC=arm-poky-linux-gnueabi-gcc -mno-thumb-interwork -marm -fuse-ld=bfd -fmacro-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0=/usr/src/debug/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0 -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0=/usr/src/debug/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0 -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot= -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source=/usr/src/kernel LD=arm-poky-linux-gnueabi-ld.bfd
| GEN Makefile
| CALL /home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/scripts/atomic/check-atomics.sh
| CALL /home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/scripts/checksyscalls.sh
| CHK include/generated/compile.h
| Kernel: arch/arm/boot/Image is ready
| Kernel: arch/arm/boot/zImage is ready
| NOTE: make -j 12 HOSTCC=gcc -isystem/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 HOSTCPP=gcc -E HOSTCXX=g++ -isystem/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 at91-sama5d27_wlsom1_ek.dtb CC=arm-poky-linux-gnueabi-gcc -mno-thumb-interwork -marm -fuse-ld=bfd -fmacro-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0=/usr/src/debug/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0 -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0=/usr/src/debug/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0 -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot= -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source=/usr/src/kernel LD=arm-poky-linux-gnueabi-ld.bfd
| NOTE: make -j 12 HOSTCC=gcc -isystem/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 HOSTCPP=gcc -E HOSTCXX=g++ -isystem/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -L/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 new_name.dtb CC=arm-poky-linux-gnueabi-gcc -mno-thumb-interwork -marm -fuse-ld=bfd -fmacro-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0=/usr/src/debug/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0 -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0=/usr/src/debug/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0 -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot= -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source=/usr/src/kernel LD=arm-poky-linux-gnueabi-ld.bfd
| make[2]: *** No rule to make target 'arch/arm/boot/dts/new_name.dtb'. Stop.
| make[1]: *** [/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/Makefile:1265: new_name.dtb] Error 2
| make: *** [/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/Makefile:179: sub-make] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/temp/run.do_compile.57871' failed with exit code 1:
| GEN Makefile
| CALL /home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/scripts/atomic/check-atomics.sh
| CALL /home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/scripts/checksyscalls.sh
| CHK include/generated/compile.h
| Kernel: arch/arm/boot/Image is ready
| Kernel: arch/arm/boot/zImage is ready
| make[2]: *** No rule to make target 'arch/arm/boot/dts/new_name.dtb'. Stop.
| make[1]: *** [/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/Makefile:1265: new_name.dtb] Error 2
| make: *** [/home/fakhruddin/workspace/Freshair/my_dir/poky/build/tmp/work-shared/sama5d27-wlsom1-ek-sd/kernel-source/Makefile:179: sub-make] Error 2
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (/home/fakhruddin/workspace/Freshair/my_dir/poky/../meta-atmel/recipes-kernel/linux/linux-at91_5.4.81.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 6463 tasks of which 6457 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/fakhruddin/workspace/Freshair/my_dir/poky/../meta-atmel/recipes-kernel/linux/linux-at91_5.4.81.bb:do_compile
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
Please help and let me know if I missed any required information from my side.
Thank you and Regards,
Sohil
Linux kernel devices trees are located in :
/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/git/arch/arm/boot/dts
Note that sources are in git and final build is in build.
You have to make sure that new_name.dtb present in the main Makefile:
/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/git/arch/arm/boot/dts/Makfile
+dtb-$(CONFIG_SOC_AT91SAM9) += new_name.dtb
Now the new device tree must be added to the KERNEL_DEVICETREE variable and that tells Yocto what Kernel device trees to build and ship into the boot partition so that u-boot load one of them into RAM while booting the board:
KERNEL_DEVICETREE += "new_name.dtb"
Now, after you understand how device tree are placed in the kernel, you can make this automatic, you create a bbappend recipe to your linux-at91 kernel main recipe and add your custom device tree there.
meta-local/
recipes-kernel/
linux/
files/
new_custom.dts
linux-at91_%.bbappend
Now, you need to copy your new dts file before compiling the kernel (do_compile) , the best moment is after do_configure:
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI_append = " file://new_custom.dts"
do_configure_append(){
cp ${WORKDIR}/new_custom.dts ${S}/arch/arm/boot/dts
echo "dtb-$(CONFIG_SOC_AT91SAM9) += new_dts.dtb" >> ${S}/arch/arm/boot/dts/Makefile
}
Now, your new device tree will be compiled, and any compilation errors may be due to syntax error.
After knowing that the device tree is compiled and added to KERNEL_DEVICETREE, this means that it is present in the boot partition along side with all other device trees also in KERNEL_DEVICETREE variable, but u-boot loads only one of them in the RAM before loading the Linux kernel, and that device tree is set in your u-boot target defconfig file present in:
/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/u-boot-.../<version>/git/configs/your_machine_defconfig
you can find your_machine_defconfig in UBOOT_CONFIG variable in your machine configuration file which is located in your board's BSP layer:
meta-<board>/conf/machine/<board>.conf
After locating the defconfig you can find a variable DEFAULT_FDT_FILE.
At first, do not change it, just build your image, and pause at uboot stage and printenv to see the fdt_file variable and set it to your new_name.dtb file and saveenv to save it for every boot.
If that is okay, you can now patch your uboot defconfig file to set the new device tree file.
Yocto tip:
${WORKDIR} in the Kernel recipe points to:
/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/
${S} point to the git directory under ${WORKDIR}
/tmp/work/sama5d27_wlsom1_ek_sd-poky-linux-gnueabi/linux-at91/5.4+gitAUTOINC+3dba8c9991-r0/git
that's why I copied the new device tree from ${WORKDIR}
I'd suggest using devtool modify linux-at91 to modify the linux kernel source-tree. This will create a linux-at91 folder in your ${TOPDIR}/workspace/sources/linux-at91. If you don't know your ${TOPDIR}, try to use bitbake -e <recipe-name> | grep "TOPDIR". bitbake -e will print your entire metadata for that recipe, here you can use grep to find the assignments of different variables. (like your KERNEL_DEVICETREE)
${TOPDIR}/workspace/sources/linux-at91
This will be the source tree for your linux-at91 recipe.
Copy your dts files into ${TOPDIR}/workspace/sources/linux-at91/arch/arm/boot/dts.
Modify the Makefile to include your dts, as pointed out by #BelHadjSalem TALEL (Thanks!).
Commit these changes and generate a patch.
In your own layer, under recipes-kernel/linux-at91/linux-at91 place this patch file. Add recipes-kernel/linux-at91/linux-at91.bbappend to include this patch as below:
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0001-add-dts-file.patch"
Now to build your custom-machine, add conf/machine/custom-machine.conf and add an entry for your custom KERNEL_DEVICETREE like shown here
# This will inherit your base machine
require conf/machine/sama5d27-wlsom1-ek-sd.conf
KERNEL_DEVICETREE = "your-dts-file.dtb"
Overall, your layer will have following files:
- conf/layer.conf
- conf/machine/custom-machine.conf (Contains the above settings)
- recipes-kernel/linux-at91/linux-at91/0001-add-dts-file.patch
- recipes-kernel/linux-at91/linux-at91/linux-at91.bbappend
Just for information on great response by #BelHadjSalem: instead of manually copying dts file by 'do_configure_append', we can use subdir too.
so instead of
do_configure_append() {
cp ${WORKDIR}/new_custom.dts ${S}/arch/arm/boot/dts
}
just we need:
SRC_URI_append = " file://new_custom.dts;subdir=git/arch/arm/boot/dts"

Yocto Build Dependency on Debian Package

I am working on migrating from Debian to Yocto. As a result, many of the proprietary packages I am writing recipes for have dependencies on Debian libraries which do not appear to be available directly in Yocto. This might be a rookie question, but I'm trying to figure out how to do this.
Below, I have one of my recipe for a Makefile C project that was generated with recipetool create:
# Recipe created by recipetool
# This is the basis of a recipe and may need further editing in order to be fully functional.
# (Feel free to remove these comments when editing.)
# WARNING: the following LICENSE and LIC_FILES_CHKSUM values are best guesses - it is
# your responsibility to verify that the values are complete and correct.
#
# The following license files were not able to be identified and are
# represented as "Unknown" below, you will need to check them yourself:
# debian/copyright
LICENSE = "Unknown"
LIC_FILES_CHKSUM = "file://debian/copyright;md5=some-hash"
SRC_URI = "git://git#my-project.git;protocol=ssh"
# Modify these as desired
PV = "1.0+git${SRCPV}"
SRCREV = "<...>"
S = "${WORKDIR}/git"
DEPENDS = "systemd"
# NOTE: this is a Makefile-only piece of software, so we cannot generate much of the
# recipe automatically - you will need to examine the Makefile yourself and ensure
# that the appropriate arguments are passed in.
do_compile () {
oe_runmake my-project
}
As you can see, I have specified a dependency on systemd. However, the dependency I really think I need is the Debian package libsystemd.
Whenever I bitbake this recipe, I get the following:
NOTE: Executing Tasks
ERROR: <recipe-name> do_compile: oe_runmake failed
ERROR: <recipe-name> do_compile: Execution of '/home/mitch/bin/yocto/project-name/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/recipe-name/1.0+gitAUTOINC+...-r0/temp/run.do_compile.13271' failed with exit code 1:
make[1]: Entering directory '/home/mitch/bin/yocto/project-name/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/recipe-name/1.0+gitAUTOINC+...-r0/git/src/core'
CC file-name.c
../file-name.c:6:10: fatal error: systemd/sd-daemon.h: No such file or directory
6 | #include <systemd/sd-daemon.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:93: build/file-name.o] Error 1
make[1]: Leaving directory '/home/mitch/bin/yocto/project-name/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/recipe-name/1.0+gitAUTOINC+...-r0/git/src/core'
make: *** [Makefile:72: some-recipe] Error 2
WARNING: exit code 1 from a shell command.
ERROR: Logfile of failure stored in: /home/mitch/bin/yocto/project-name/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/recipe-name/1.0+gitAUTOINC+...-r0/temp/log.do_compile.13271
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 24 my-project
| make[1]: Entering directory '/home/mitch/bin/yocto/project-name/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/recipe-name/1.0+gitAUTOINC+...-r0/git/src/core'
| CC my-file.c
| ../my-file.c:6:10: fatal error: systemd/sd-daemon.h: No such file or directory
| 6 | #include <systemd/sd-daemon.h>
| | ^~~~~~~~~~~~~~~~~~~~~
| compilation terminated.
| make[1]: *** [Makefile:93: build/my-file.o] Error 1
| make[1]: Leaving directory '/home/mitch/bin/yocto/project-name/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/recipe-name/1.0+gitAUTOINC+...-r0/git/src/core'
| make: *** [Makefile:72: my-project] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/mitch/bin/yocto/project-name/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/recipe-name/1.0+gitAUTOINC+...-r0/temp/run.do_compile.13271' failed with exit code 1:
| make[1]: Entering directory '/home/mitch/bin/yocto/project-name/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/recipe-name/1.0+gitAUTOINC+...-r0/git/src/core'
| CC my-file.c
| ../my-file.c:6:10: fatal error: systemd/sd-daemon.h: No such file or directory
| 6 | #include <systemd/sd-daemon.h>
| | ^~~~~~~~~~~~~~~~~~~~~
| compilation terminated.
| make[1]: *** [Makefile:93: build/my-file.o] Error 1
| make[1]: Leaving directory '/home/mitch/bin/yocto/project-name/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/recipe-name/1.0+gitAUTOINC+...-r0/git/src/core'
| make: *** [Makefile:72: my-recipe] Error 2
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (/home/mitch/bin/yocto/project-name/layers/meta-project/recipes-main/my-recipe/my-recipe_git.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2166 tasks of which 2163 didn't need to be rerun and 1 failed.
To summarize, what this looks like is my project requires libraries provided by systemd. What am I missing here that would allow me to get this project to build? Is there a way to build it?
Okay, so I guess I was overthinking this. Yocto uses your system to compile the project. So, all I needed to do was provide the systemd header files on my host machine. Since I am running Ubuntu, installing libsystemd-dev on my host fixed the issue. I think that the DEPENDS on systemd will still be required for running on the Yocto system.

How to enable dbus-X11 in the yocto

I'm using poky and meta-openembedded(git://git.openembedded.org/meta-openembedded(branch: master)) in yocto
I want to build metacity and cyrus-sasl(2.1.26) for my SDK platform
I run the following command
I add BBCLASSEXTEND += " nativesdk" to metacity's bb
and run bitbake nativesdk-metacity
but I will get error message
ERROR: Nothing RPROVIDES 'nativesdk-dbus-x11' (but virtual:nativesdk:poky/meta/rec on or otherwise requires it)
ERROR: Nothing RPROVIDES 'nativesdk-dbus-x11' (but virtual:nativesdk:poky/meta/recipes-core/dbus/dbus-glib_0.110.bb RDEPENDS on or otherwise requires it) ERROR: Required build target 'nativesdk-metacity' has no buildable providers. Missing or unbuildable dependency chain was: ['nativesdk-metacity', 'nativesdk-libcanberra', 'nativesdk-pulseaudio', 'nativesdk-gconf', 'nativesdk-dbus-glib', 'nativesdk-dbus-x11']
ERROR: Nothing PROVIDES 'dbus-x11'. Close matches:
dbus RPROVIDES dbus-x11
I cannot find dbus-x11's bb in my all meta
and I cannot see dbus-x11 then run bitbake -s
How can I enable dbus-x11 ??
and...
I also add BBCLASSEXTEND += " nativesdk" to cyrus-sasl_2.1.26.bb
and bitbake nativesdk-cyrus-sasl
get error message
| x86_64-pokysdk-linux-gcc --sysroot=/poky/build-fw/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-cyrus-sasl/2.1.26-r0/recipe-sysroot -O2 -pipe -Wl,-O1 -o saslauthd mechanisms.o auth_dce.o auth_getpwent.o auth_krb5.o auth_krb4.o auth_pam.o auth_rimap.o auth_httpform.o auth_shadow.o auth_sia.o auth_sasldb.o lak.o auth_ldap.o cache.o cfile.o krbtf.o utils.o ipc_unix.o ipc_doors.o saslauthd-main.o md5.o -lresolv
| auth_getpwent.o: In function `auth_getpwent':
| auth_getpwent.c:(.text+0x42): undefined reference to `crypt'
| auth_shadow.o: In function `auth_shadow':
| auth_shadow.c:(.text+0x109): undefined reference to `crypt'
| collect2: error: ld returned 1 exit status
| Makefile:456: recipe for target 'saslauthd' failed
How can I add -lcrypt to cyrus-sasl_2.1.26.bb bb??
thanks a lot
John

Custom recipe for mgetty in yocto project

I have tried to create a custom recipe, in Yocto project, for mgetty. But when I build my custom image, there are some issues that I cannot figure out.
This is my custom mgetty_1.2.0.bb
DESCRIPTION = "mgetty 1.2.0 recipe"
SECTION = "mgetty"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=fd3b2e6132b4ff4cb475558807ded25f"
SRC_URI = "ftp://mgetty.greenie.net/pub/mgetty/source/1.2/mgetty-${PV}.tar.gz"
SRC_URI[md5sum] = "6700f55a61f3a71ce7b882a0d0b82d19"
inherit autotools
And this is the error output:
ERROR: mgetty-1.2.0-r0 do_compile: oe_runmake failed
ERROR: mgetty-1.2.0-r0 do_compile: Function failed: do_compile (log file is
located at [...path...])
ERROR: Logfile of failure stored in: [...path...]
Log data follows:
| DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common', 'arm-32',
'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 'common']
| DEBUG: Executing shell function do_compile
| NOTE: make -j 8
| make: *** No targets specified and no makefile found. Stop.
| ERROR: oe_runmake failed
| WARNING: [...path...] exit 1 from 'exit 1'
| ERROR: Function failed: do_compile (log file is located at [...path...])
ERROR: Task ([...path...]/recipes-mgetty/mgetty/mgetty_1.2.0.bb:do_compile)
failed with exit code '1'
NOTE: Tasks Summary: Attempted 2741 tasks of which 2734 didn't need to be
rerun and 1 failed.
NOTE: Writing buildhistory
Did I missed something in my recipe?
I'd suggest using devtool if you are new to Yocto. So, in this case:
devtool add mgetty ftp://mgetty.greenie.net/pub/mgetty/source/1.2/mgetty-1.2.0.tar.gz
This will create a local workspace for you with the recipe and sources. Now, devtool should be able to detect some of the things automatically based on presence of certain files in the package.
But, for projects like this, you might have to make changes to the Makefile as well to make sure that it doesn't override the compiler and flags variables. So, in this case, make changes to ensure CC, CFLAGS, LDFLAGS is not over-ridden etc. (replacing = with ?= would be one way of doing it). Once that is done, use 'devtool build' to build your recipe and resolve any further issues.
Once you're done with the changes, please create commits for them in the devtool workspace and use 'devtool finish' to create patches for these commits and have them included them in your recipe. See:
https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#sdk-devtool-use-devtool-modify-to-modify-the-source-of-an-existing-component
For more information, refer to the manual.

cross compile ghc curses not found

I tried to crosscompile from linux i386 to arm-linux-gnueabihf, but i cant make it happen, because it gives me this weird error while running 'make':
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking for setupterm in -ltinfo... no
checking for setupterm in -lncursesw... no
checking for setupterm in -lncurses... no
checking for setupterm in -lcurses... no
configure: error: in '/home/edi/ghc_cross/ghc/libraries/terminfo':
configure: error: curses library not found, so this package cannot be built
See 'config.log' for more details
make[2]: *** [libraries/terminfo/dist-install/package-data.mk] Error 1
make[1]: *** [all_libraries/terminfo] Error 2
make[1]: Leave Directory '/home/edi/ghc_cross/ghc'
make: *** [all] Error 2
What have i done:
-) Compiled 7.8.0 from github (The log says 'That should have been 7.8.0', i chose 7.8 because i thought it would be more stable for crosscompiling) to my i386 (normal boot, configure, make, make install). This worked fine
-) installed newest llvm from svn (LLVM version 3.5svn)
-) replaced the libffi-3.0.11.tar.gz in ghc/libffi-tarballs with libffi-3.0.13
-) added this version of mk/build.mk:
SRC_HC_OPTS = -H32m _o -fasm -Rghc-timing
GhcStage1HcOpts = -O -fasm
GhcStage2HcOpts = -O0 -DDEBUG -Wall
GhcLibHcOpts = -O -fasm -XGenerics
GhcLibWays = v dyn
SplitObjs = NO
Stage1Only = YES
-) downloaded the sourcecode of ncurses from ​ftp.de.debian.org/debian/pool/main/n/ncurses/ncurses_5.9.orig.tar.gz and builded it with "./configure arm-linux-gnueabihf --with-gcc=arm-linux-gnueabihf-gcc --target=arm-linux-gnueabihf --prefix=/usr/arm-linux-gnueabihf
" + "make". afterwards i added the folder to my $PATH
-)did "perl boot", "./configure --target=arm-linux-gnueabihf --with-gcc=arm-linux-gnueabihf-gcc --prefix=/usr/arm-linux-gnueabihf" and "make".
./configure worked, but make gives me this weird error.
I also tried copying all included files from ncurses to the libraries/terminfo folder, but that also didn't work. I think the mistake is somewhere in the building process, but i'm not exactly sure, so thats why i'm posting this bug.
I also tried getting the libncurses5-dev.deb and libtinfo-dev from my Raspberry pi with "apt-get download libncurses5-dev" and "apt-get download libncurses5-dev" and copied them to my i386, extracted them and added them to my $PATH
Does anyone have an idea about how i can fix that problem with curses?
PS: i also made sure that i met the prerequirements mentioned in ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Linux and ​ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling
Edit: this is the log of my config.log:
`
configure:3400: checking for setupterm in -lcurses
configure:3425: arm-linux-gnueabihf-gcc -o conftest -fno-stack-protector conftest.c -lcurses >&5
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: skipping incompatible /usr/lib/../lib/libcurses.a when searching for -lcurses
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: skipping incompatible /usr/lib/libcurses.a when searching for -lcurses
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lcurses
collect2: error: ld returned 1 exit status
configure:3425: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Haskell terminfo package"
| #define PACKAGE_TARNAME "terminfo"
| #define PACKAGE_VERSION "0.2"
| #define PACKAGE_STRING "Haskell terminfo package 0.2"
| #define PACKAGE_BUGREPORT "judah dot jacobson at gmail dot com"
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h. */
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char setupterm ();
| int
| main ()
| {
| return setupterm ();
| ;
| return 0;
| }
configure:3434: result: no
configure:3450: error: in `/home/edi/ghc_cross/ghc/libraries/terminfo':
configure:3452: error: curses library not found, so this package cannot be built See "config.log" for more details
`
Greetings,
Edi
So, i've found the solution.
What i did is the following:
compiled the ncurses library with the arm-gcc with the following command:
./configure --target=arm-linux-gnueabihf --with-gcc=arm-linux-gnueabihf-gcc --with-shared --host=arm-linux-gnueabihf --with-build-cpp=arm-linux-gnueabihf-g++
afterwards i did make and did configured my ghc with the following:
./configure --target=arm-linux-gnueabihf --with-gcc=arm-linux-gnueabihf-gcc --prefix=/usr/arm-linux-gnueabihf --with-shared --with-sysroot=/path/to/cursescompiled/libs
Then it went through and didn't ask me for the curses-library anymore.
so guys, i hope this will be helpful for you
Ran into a similar problem, and this question lead me to the correct solution. Yes, I had to tweak sysroot, but the author's method didn't work, configure script just ignored the --with-sysroot flag. So what I did instead:
export SYSROOT=/usr/x86_64-w64-mingw32/sys-root/
export CFLAGS=--sysroot=$SYSROOT
export CPPFLAGS=--sysroot=$SYSROOT
export LDFLAGS=--sysroot=$SYSROOT
Then configure and make as usual, all in the same terminal session.