Make green_wp76xx failes on libjansson.so

Hello
I am trying to compile mangoH to: make green_wp76xx

build failes: libjansson.so

make[5]: Entering directory ‘/home/ilan/legato/workspace/legato/build/wp76xx/framework/libjansson’
[ 2%] Linking C shared library lib/libjansson.so
/usr/bin/cmake -E cmake_link_script CMakeFiles/jansson.dir/link.txt --verbose=0
/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 crtbeginS.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
collect2: error: ld returned 1 exit status
CMakeFiles/jansson.dir/build.make:354: recipe for target ‘lib/libjansson.so’ failed
make[5]: *** [lib/libjansson.so] Error 1
make[5]: Leaving directory ‘/home/ilan/legato/workspace/legato/build/wp76xx/framework/libjansson’
CMakeFiles/Makefile2:297: recipe for target ‘CMakeFiles/jansson.dir/all’ failed
make[4]: *** [CMakeFiles/jansson.dir/all] Error 2
make[4]: Leaving directory ‘/home/ilan/legato/workspace/legato/build/wp76xx/framework/libjansson’
Makefile:138: recipe for target ‘all’ failed
make[3]: *** [all] Error 2
make[3]: Leaving directory ‘/home/ilan/legato/workspace/legato/build/wp76xx/framework/libjansson’
Makefile.framework:277: recipe for target ‘/home/ilan/legato/workspace/legato/build/wp76xx/framework/lib/libjansson.so’ failed
make[2]: *** [/home/ilan/legato/workspace/legato/build/wp76xx/framework/lib/libjansson.so] Error 2
make[2]: Leaving directory ‘/home/ilan/legato/workspace/legato’
Makefile:277: recipe for target ‘framework_wp76xx’ failed
make[1]: *** [framework_wp76xx] Error 2
make[1]: Leaving directory ‘/home/ilan/legato/workspace/legato’
Makefile:35: recipe for target ‘legato_wp76xx’ failed
make: *** [legato_wp76xx] Error 2

I am using :

export PATH=/opt/swi/y22-ext/sysroots/armv7a-neon-poky-linux-gnueabi/:$PATH
export LEGATO_ROOT=~/legato/workspace/legato/

please advice

Seems you are still using y17-ext toolchain.
Can you double check $PATH and see if /opt/swi/y17-ext/sysroots/armv7a-neon-poky-linux-gnueabi/ still there? Or try to change the name of y17-ext.

Hi,
there is similar issue here:

Please use the correct toolchain.

I have made some progress:

export LEGATO_ROOT=~/legato/workspace/legato/
export PATH=/opt/swi/y22-ext-wp76xx/sysroots/armv7a-neon-poky-linux-gnueabi/:$PATH
~/mangOH(master)$ make green_wp76xx

now compile progress, failing on:

~/mangOH(master)$ make green_wp76xx ARCH=arm
make -C /home/ilan/legato/workspace/legato/ framework_wp76xx
make[1]: Entering directory ‘/home/ilan/legato/workspace/legato’
Module: WiFi
Module: Dualsys
make -f Makefile.hostTools
make[2]: Entering directory ‘/home/ilan/legato/workspace/legato’
Using ninja installed at: /usr/bin/ninja
ln -sf …/build/tools/mk bin/mk
ln -sf mk bin/mkcomp
ln -sf mk bin/mkexe
ln -sf mk bin/mkapp
ln -sf mk bin/mksys
ln -sf …/framework/tools/scripts/splitdebug …/framework/tools/scripts/instsys …/framework/tools/scripts/settime …/framework/tools/scripts/mkinfo …/framework/tools/scripts/instlegato …/framework/tools/scripts/stoplegato …/framework/tools/scripts/cextgenerator.py …/framework/tools/scripts/settz …/framework/tools/scripts/createsdk …/framework/tools/scripts/systoimg …/framework/tools/scripts/findtoolchain …/framework/tools/scripts/legato-qemu …/framework/tools/scripts/checkpa …/framework/tools/scripts/legato-install …/framework/tools/scripts/update-pack …/framework/tools/scripts/security-pack …/framework/tools/scripts/instapp …/framework/tools/scripts/mklegatoimg …/framework/tools/scripts/app …/framework/tools/scripts/av-pack …/framework/tools/scripts/releaselegato …/framework/tools/scripts/sbhelper …/framework/tools/scripts/remoteDebug …/framework/tools/scripts/systocwe …/framework/tools/scripts/configlegatoenv …/framework/tools/scripts/update …/framework/tools/scripts/configtargetssh …/framework/tools/scripts/legs …/framework/tools/scripts/gettargettype …/framework/tools/scripts/update-util …/framework/tools/scripts/configToolchainDirEnvVars …/framework/tools/scripts/simu …/framework/tools/scripts/fwupdate …/framework/tools/scripts/setname …/framework/tools/scripts/mkdoc …/framework/tools/scripts/startlegato …/framework/tools/scripts/shlib …/framework/tools/scripts/mklegatotreero bin/
ln -sf /home/ilan/legato/workspace/legato/framework/tools/ifgen/ifgen bin/
ln -sf /home/ilan/legato/workspace/legato/3rdParty/ima-support-tools/ima-sign.sh bin/
ln -sf /home/ilan/legato/workspace/legato/3rdParty/ima-support-tools/ima-gen-keys.sh bin/
make -C framework/tools/mkPatch mkPatch
make[3]: Entering directory ‘/home/ilan/legato/workspace/legato/framework/tools/mkPatch’
/usr/bin/gcc -Wall -Werror -o /home/ilan/legato/workspace/legato/bin/mkPatch
mkPatch.c /home/ilan/legato/workspace/legato/framework/liblegato/crc.c
-I/home/ilan/legato/workspace/legato/framework/include
-I/home/ilan/legato/workspace/legato/3rdParty/include
make[3]: Leaving directory ‘/home/ilan/legato/workspace/legato/framework/tools/mkPatch’
ninja -f /home/ilan/legato/workspace/legato/build/tools/build.ninja
ninja: no work to do.
make[2]: Leaving directory ‘/home/ilan/legato/workspace/legato’

Generate an MD5 hash of everything in the source directories.

find framework components interfaces platformAdaptor modules apps/platformServices apps/tools targetFiles Makefile.framework Makefile.hostTools Makefile.targetTools Makefile targetDefs CMakeLists.txt -type f | grep -v “.git” | sort | while read filePath ;
do
echo “$filePath” &&
cat “$filePath” ;
done | md5sum | awk ‘{ print $1 }’ > sources.md5
version=18.02.0-27-g23ad932
md5=d0a40157ba375198f158a1df888d8a73
make -f Makefile.framework CC=/opt/swi/y22-ext-wp76xx/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc
make[2]: Entering directory ‘/home/ilan/legato/workspace/legato’
ninja -f /home/ilan/legato/workspace/legato/build/wp76xx/framework/build.ninja
ninja: no work to do.
/opt/swi/y22-ext-wp76xx/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc -o /home/ilan/legato/workspace/legato/build/wp76xx/framework/bin/startSystem /home/ilan/legato/workspace/legato/framework/daemons/linux/start/start.c \

-DLE_LOG_SESSION=gpioExpanderCommon_LogSession -DLE_LOG_LEVEL_FILTER_PTR=gpioExpanderCommon_LogLevelFilterPtr “-DCOMPONENT_INIT=LE_CI_LINKAGE LE_SHARED void _gpioExpanderCommon_COMPONENT_INIT()” “-std=c99”
/home/ilan/mangOH/apps/GpioExpander/gpioExpanderService/gpioExpanderCommon/gpioExpander.c:25:32: fatal error: linux/i2c-dev-user.h: No such file or directory
** #include <linux/i2c-dev-user.h>**
^
compilation terminated.
[834/1093] Generating IPC interface code
ninja: build stopped: subcommand failed.
Makefile:68: recipe for target ‘green_wp76xx’ failed
make: *** [green_wp76xx] Error 1

For the missing i2c-dev-user.h, you can have a look here:

probably you can get those files in the toolchain.