Make wp76 error libjansson.so

fhs@fhs-OptiPlex-7010:~/workspace/legato$ make wp76
Building Legato for target 'wp76'
Makefile:127: build/wp76/.config.mk: 没有那个文件或目录
  GEN       build/wp76/.config.mk
Building Legato for target 'wp76'
  GEN       version
  GEN       build/wp76/framework/include/le_config.h
  MAKE      tools
make[1]: Entering directory '/home/fhs/workspace/legato'
Using ninja installed at: /usr/bin/ninja
  GEN       /home/fhs/workspace/legato/build/tools/build.ninja
Tools arch: x86_64
  NPM       languageServer
  MAKE      mkPatch
make[2]: Entering directory '/home/fhs/workspace/legato/framework/tools/mkPatch'
  CCLD      /home/fhs/workspace/legato/bin/mkPatch
make[2]: Leaving directory '/home/fhs/workspace/legato/framework/tools/mkPatch'
  NINJA     /home/fhs/workspace/legato/build/tools/build.ninja
[87/87] Linking tool
make[1]: Leaving directory '/home/fhs/workspace/legato'
  GEN       sources.md5
  GEN       package.properties
  GEN       build/wp76/config.sh
  MAKE      framework
make[1]: Entering directory '/home/fhs/workspace/legato'
  GEN       /home/fhs/workspace/legato/build/wp76/framework/build.ninja
  NINJA     /home/fhs/workspace/legato/build/wp76/framework/build.ninja
[70/70] Dynamic linking liblegato
  CCLD      /home/fhs/workspace/legato/build/wp76/framework/lib/libComponent_le_pa_start.so
  CCLD      /home/fhs/workspace/legato/build/wp76/framework/bin/startSystem
  MKEXE     /home/fhs/workspace/legato/build/wp76/framework/bin/supervisor
[67/67] Linking C executable
  MKEXE     /home/fhs/workspace/legato/build/wp76/framework/bin/serviceDirectory
[5/5] Linking C executable
  MKEXE     /home/fhs/workspace/legato/build/wp76/framework/bin/logCtrlDaemon
[16/16] Linking C executable
  MKEXE     /home/fhs/workspace/legato/build/wp76/framework/bin/configTree
[30/30] Linking C executable
  MKEXE     /home/fhs/workspace/legato/build/wp76/framework/bin/watchdog
[40/40] Linking C executable
  MKEXE     /home/fhs/workspace/legato/build/wp76/framework/bin/updateDaemon
[64/64] Linking C executable
  MAKE      targetTools
make[2]: Entering directory '/home/fhs/workspace/legato'
  CMAKE     /home/fhs/workspace/legato/build/wp76/framework/lib/libjansson.so
Makefile.targetTools:107: recipe for target '/home/fhs/workspace/legato/build/wp76/framework/lib/libjansson.so' failed
make[2]: *** [/home/fhs/workspace/legato/build/wp76/framework/lib/libjansson.so] Error 1
make[2]: Leaving directory '/home/fhs/workspace/legato'
Makefile.framework:249: recipe for target 'targetTools' failed
make[1]: *** [targetTools] Error 2
make[1]: Leaving directory '/home/fhs/workspace/legato'
Makefile:535: recipe for target 'framework' failed
make: *** [framework] Error 2

Thank you for your answer

export WP76_TOOLCHAIN_DIR=/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi
export WP76_TOOLCHAIN_PREFIX=arm-poky-linux-gnueabi-
/workspace/legato/build/wp76/framework/libjansson/CMakeFile/CMakeError.log
Determining if the C compiler works failed with the following output:
Change Dir: /home/fhs/workspace/legato/build/wp76/framework/libjansson/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_85400/fast"
make[3]: Entering directory '/home/fhs/workspace/legato/build/wp76/framework/libjansson/CMakeFiles/CMakeTmp'
/usr/bin/make -f CMakeFiles/cmTC_85400.dir/build.make CMakeFiles/cmTC_85400.dir/build
make[4]: Entering directory '/home/fhs/workspace/legato/build/wp76/framework/libjansson/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_85400.dir/testCCompiler.c.o
/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc    --sysroot= -o CMakeFiles/cmTC_85400.dir/testCCompiler.c.o   -c /home/fhs/workspace/legato/build/wp76/framework/libjansson/CMakeFiles/CMakeTmp/testCCompiler.c
cc1: warning: include location "/usr/local/include" is unsafe for cross-compilation [-Wpoison-system-directories]
cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]
Linking C executable cmTC_85400
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_85400.dir/link.txt --verbose=1
/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc     --sysroot=  CMakeFiles/cmTC_85400.dir/testCCompiler.c.o  -o cmTC_85400 -rdynamic 
/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.1/ld: cannot find crt1.o: No such file or directory
/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.1/ld: cannot find crti.o: No such file or directory
/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.1/ld: cannot find crtbegin.o: No such file or directory
/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.1/ld: cannot find -lgcc
/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.1/ld: cannot find -lgcc_s
/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.1/ld: cannot find -lc
/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.1/ld: cannot find -lgcc
/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.1/ld: cannot find -lgcc_s
/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.1/ld: cannot find crtend.o: No such file or directory
/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.1/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_85400.dir/build.make:97: recipe for target 'cmTC_85400' failed
make[4]: *** [cmTC_85400] Error 1
make[4]: Leaving directory '/home/fhs/workspace/legato/build/wp76/framework/libjansson/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_85400/fast' failed
make[3]: *** [cmTC_85400/fast] Error 2
make[3]: Leaving directory '/home/fhs/workspace/legato/build/wp76/framework/libjansson/CMakeFiles/CMakeTmp'

Seems you use the wrong toolchain.
Y17 ext is wrong path.

Also you need to make clean and then make first befor you type make wp76xx

Hi. Nice to meet again.
The cross-compilation chain I use is “poky-swi-ext-glibc-x86_64-meta-toolchain-swi-ext-armv7a-vfp-neon-toolchain-swi-ext-1.7.3.sh”

I executed bin/legs first, then executed make, but there is still an error.
make[2]: Entering directory ‘/home/fhs/workspace/legato/build/localhost’
make[2]: *** No rule to make target ‘user_docs’。 停止。
make[2]: Leaving directory ‘/home/fhs/workspace/legato/build/localhost’
Makefile:621: recipe for target ‘user_docs’ failed
make[1]: *** [user_docs] Error 2
make[1]: Leaving directory ‘/home/fhs/workspace/legato’
Makefile:459: recipe for target ‘default’ failed
make: *** [default] Error 2

HI.

I changed the environment variable to the following and it succeeded! I tried this yesterday, but I didn’t succeed, so amazing. Thank you for your reminder

export WP76XX_TOOLCHAIN_DIR=/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi
export WP76XX_TOOLCHAIN_PREFIX=arm-poky-linux-gnueabi-

I just facing the same issue.
My solution is installing cmake on my host building machine.

1 Like

Installing cmake was also the solution for me, thank you