# Make green\_wp76xx failes on libjansson.so

**URL:** https://forum.legato.io/t/make-green-wp76xx-failes-on-libjansson-so/3196
**Category:** Uncategorized
**Created:** [April 9, 2018, 1:08pm UTC](https://forum.legato.io/t/make-green-wp76xx-failes-on-libjansson-so/3196 "2018-04-09T13:08:01Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![deadpoolcode](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/deadpoolcode/32/382_2.png) [@deadpoolcode](https://forum.legato.io/u/deadpoolcode)
#### Post date: [April 9, 2018, 1:08pm UTC](https://forum.legato.io/t/make-green-wp76xx-failes-on-libjansson-so/3196/1 "2018-04-09T13:08:01Z")

</div>

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

---

<div class="post-metadata">

### Author: ![JordanZhao](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jordanzhao/32/789_2.png) [@JordanZhao](https://forum.legato.io/u/JordanZhao)
#### Post date: [April 10, 2018, 1:40am UTC](https://forum.legato.io/t/make-green-wp76xx-failes-on-libjansson-so/3196/2 "2018-04-10T01:40:38Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)
#### Post date: [April 10, 2018, 1:48am UTC](https://forum.legato.io/t/make-green-wp76xx-failes-on-libjansson-so/3196/3 "2018-04-10T01:48:31Z")

</div>

Hi,  
there is similar issue here:

> [@Issue in Installing AF 17.11.0 on Ubuntu](https://forum.legato.io/t/issue-in-installing-af-17-11-0-on-ubuntu/2986/2):
>
> Hi, Did you download the toolchain from here for WP76xx: [https://source.sierrawireless.com/resources/airprime/software/wp76xx/wp76xx-firmware-release-7-components/](https://source.sierrawireless.com/resources/airprime/software/wp76xx/wp76xx-firmware-release-7-components/) If no, please try this.

Please use the correct toolchain.

---

<div class="post-metadata">

### Author: ![deadpoolcode](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/deadpoolcode/32/382_2.png) [@deadpoolcode](https://forum.legato.io/u/deadpoolcode)
#### Post date: [April 12, 2018, 2:44am UTC](https://forum.legato.io/t/make-green-wp76xx-failes-on-libjansson-so/3196/4 "2018-04-12T02:44:07Z")

</div>

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

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)
#### Post date: [April 12, 2018, 2:57am UTC](https://forum.legato.io/t/make-green-wp76xx-failes-on-libjansson-so/3196/5 "2018-04-12T02:57:28Z")

</div>

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

> [@WP76XX SDK 18.1.0 Missing linux/i2c-dev-user.h](https://forum.legato.io/t/wp76xx-sdk-18-1-0-missing-linux-i2c-dev-user-h/3185/5):
>
> There are a few different issues in play here. For some reason, the upstream i2c-tools package overwrites the include/linux/i2c-dev.h with its own version which adds some header only functions for smbus. I’m not sure why they didn’t just create a separate header called i2c-dev-smbus.h or something, but they didn’t. Yocto (or openembedded?) does something sort of non-standard in that they don’t overwrite the default i2c-dev.h file provided by the Linux kernel. Instead they rename the one from…

probably you can get those files in the toolchain.
