I am trying to build iotivity-constrained Zephyr port on Linux for ESP32 but getting the following errors,
drivers/built-in.o: In function `esp32_uart_init':
/home/toolchains/zephyr/drivers/serial/uart_esp32.c:46:(.text.esp32_uart_init+0x3): dangerous relocation: call8: call target out of range: uartAttach
drivers/built-in.o: In function `esp32_uart_tx':
/home/toolchains/zephyr/drivers/serial/uart_esp32.c:19:(.text.esp32_uart_tx+0x9): dangerous relocation: call8: call target out of range: uart_tx_one_char
collect2: error: ld returned 1 exit status
/home/toolchains/zephyr/Makefile:878: recipe for target 'zephyr_prebuilt.elf' failed
make[2]: *** [zephyr_prebuilt.elf] Error 1
make[2]: Leaving directory '/home/projects/iotivity-constrained/port/zephyr/outdir/esp32'
Makefile:178: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/home/toolchains/zephyr'
/home/toolchains/zephyr/Makefile.inc:82: recipe for target 'all' failed
make: *** [all] Error 2
I can build Zephyr and ESP32 separately but not iotivity-constrained. I tried to add -mlongcalls but no success.
Any suggestions?
Add flag -mlongcalls in /zephyr/drivers/serial/Makefile.
References:
IOT-2650
Related
root#com:/usr/src/linux-source-4.15.0/linux-source-4.15.0# make -C $KERN_DIR M=`pwd` modules
echo $KERN_DIR -> /usr/src/linux-source-4.15.0/linux-source-4.15.0
how can i fix it? i cant find this error
drivers/tty/serdev/core.o: failed
scripts/Makefile.build:330: recipe for target 'drivers/tty/serdev/core.o' failed
make[3]: *** [drivers/tty/serdev/core.o] Error 1
scripts/Makefile.build:604: recipe for target 'drivers/tty/serdev' failed
make[2]: *** [drivers/tty/derdev] Error 2
scripts/Makefile.build:604: recipe for target 'drivers/tty' failed
make[1]: *** [drivers/tty] Error 2
Makefile:1060: recipe for target 'drivers' failed
make: *** [drivers] Error 2
/usr/bin/Id: cannot find -Ibcm_host
collect2: error: Id returned 1 exit status
CMakeFiles/sdl-renderer.dir/build.make:91: recipe for target 'bin/sdl-renderer' failed
make[2]: *** [bin/sdl-renderer] Error 1
CmakeFiles/Makefile2:277: recipe for target 'CMakeFiles/sdl-renderer.dir/all' failed
make[1]: *** [CmakeFiles/sdl-renderer.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
What to do with it?
cmake version 3.13.3
os: debian/retropie
I was trying to downgrade the linux kernel version from 4.4.14(trunk) to 3.18.44.
I made the necessary makefile changes for my target linux system which is ipq806x.
But while building I am getting patch failed error. The build log snippet is given below. Has anyone come across such kind of an error. Please share your comments.
pplying patch platform/301-ARM-qcom-add-Netgear-Nighthawk-X4-R7500-device-tree.patch
patching file arch/arm/boot/dts/Makefile
The next patch would create the file arch/arm/boot/dts/qcom-ipq8064-r7500.dts,
which already exists! Applying it anyway.
patching file arch/arm/boot/dts/qcom-ipq8064-r7500.dts
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- rejects in file arch/arm/boot/dts/qcom-ipq8064-r7500.dts
Patch platform/301-ARM-qcom-add-Netgear-Nighthawk-X4-R7500-device-tree.patch does not apply (enforce with -f)
Makefile:26: recipe for target '/home/guru/punya/trunkpull_24112017/openwrt/build_dir/target-arm_cortex-a9+neon-vfpv4_musl-1.1.16_eabi/linux-ipq806x/linux-3.18.44/.quilt_checked' failed
make[4]: *** [/home/guru/punya/trunkpull_24112017/openwrt/build_dir/target-arm_cortex-a9+neon-vfpv4_musl-1.1.16_eabi/linux-ipq806x/linux-3.18.44/.quilt_checked] Error 1
make[4]: Leaving directory '/home/guru/punya/trunkpull_24112017/openwrt/target/linux/ipq806x'
Makefile:13: recipe for target 'compile' failed
make[3]: *** [compile] Error 2
make[3]: Leaving directory '/home/guru/punya/trunkpull_24112017/openwrt/target/linux'
target/Makefile:21: recipe for target 'target/linux/compile' failed
make[2]: *** [target/linux/compile] Error 2
make[2]: Leaving directory '/home/guru/punya/trunkpull_24112017/openwrt'
target/Makefile:16: recipe for target '/home/guru/punya/trunkpull_24112017/openwrt/staging_dir/target-arm_cortex-a9+neon-vfpv4_musl-1.1.16_eabi/stamp/.target_compile' failed
make[1]: *** [/home/guru/punya/trunkpull_24112017/openwrt/staging_dir/target-arm_cortex-a9+neon-vfpv4_musl-1.1.16_eabi/stamp/.target_compile] Error 2
make[1]: Leaving directory '/home/guru/punya/trunkpull_24112017/openwrt'
/home/guru/punya/trunkpull_24112017/openwrt/include/toplevel.mk:192: recipe for target 'world' failed
make: *** [world] Error 2
From the logs its clear the compilation failed because of patching of dts failed.
If the failed patch file is not required then try the compilation after removing it.
When I execute the command "make -j4", then it doesn't work.
Below is the output that I am getting. How can I fix this problem?
/usr/include/c++/6/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
#include_next <stdlib.h>
^
compilation terminated.
modules/viz/CMakeFiles/pch_Generate_opencv_viz.dir/build.make:62: recipe for target 'modules/viz/precomp.hpp.gch/opencv_viz_Release.gch' failed
make[2]: *** [modules/viz/precomp.hpp.gch/opencv_viz_Release.gch] Error 1
CMakeFiles/Makefile2:3227: recipe for target 'modules/viz/CMakeFiles/pch_Generate_opencv_viz.dir/all' failed
make[1]: *** [modules/viz/CMakeFiles/pch_Generate_opencv_viz.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 16%] Built target pch_Generate_opencv_test_video
[ 16%] Built target pch_Generate_opencv_video
[ 16%] Built target pch_Generate_opencv_perf_video
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
help2man:
can't get --help' info from man/cp.td/cp Try--no-discard-stderr' if
option outputs to stderr Makefile:14066: recipe for target 'man/cp.1'
failed make[2]: * [man/cp.1] Error 127 make[2]: Leaving directory
'/sources/coreutils-8.23' Makefile:11098: recipe for target
'all-recursive' failed make[1]: * [all-recursive] Error 1 make[1]:
Leaving directory '/sources/coreutils-8.23' Makefile:5765: recipe for
target 'all' failed make: *** [all] Error 2
There were a few dependency issues fixed in coreutils 8.24
For example see: http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=v8.23-34-gf51c44b
If you try the make again it might succeed (as cp is now built).