# Build for red\_wp85 failes

**URL:** <https://mangoh.discourse.group/t/build-for-red-wp85-failes/1880>\
**Category:** Uncategorized\
**Created:** [September 4, 2018, 4:28pm UTC](https://mangoh.discourse.group/t/build-for-red-wp85-failes/1880 "2018-09-04T16:28:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![deadpoolcode](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@deadpoolcode](https://mangoh.discourse.group/u/deadpoolcode)\
**Post date:** [September 4, 2018, 4:28pm UTC](https://mangoh.discourse.group/t/build-for-red-wp85-failes/1880/1 "2018-09-04T16:28:31Z")

</div>

exported environment variables:

alias cfglegato=  
“pushd . && cd ~/legato\_framework/legato && source ./bin/configlegatoenv ; popd”  
export LEGATO\_ROOT=~/legato\_framework/legato  
export WP85\_SYSROOT=/opt/swi/y17-ext-wp85/sysroots/armv7a-vfp-neon-poky-linux-gnueabi

but failes when running make:

~/mangOH(master)$ make red\_wp85  
make -C /home/ilan/legato\_framework/legato framework\_wp85  
make[1]: Entering directory ‘/home/ilan/legato\_framework/legato’  
Using ccache: /usr/bin/ccache  
Module: WiFi  
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* VERSION \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
Legato WiFi version: 18.07.0

* * *

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

# Generate an MD5 hash of everything in the source directories.

find framework components interfaces platformAdaptor modules apps/platformServices apps/tools targetFiles Makefile Makefile.framework Makefile.hostTools Makefile.targetTools 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.07.0  
md5=af941e159519af90625a1d1f7cdb0c1d  
make -f Makefile.framework CC=/opt/swi/y22-ext/sysroots/x86\_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc  
make[2]: Entering directory ‘/home/ilan/legato\_framework/legato’  
Makefile.framework:54: JDK version installed on the system is too old: 1.8.0\_181. 1.8.0 required.  
ninja -j 16 -f /home/ilan/legato\_framework/legato/build/wp85/framework/build.ninja  
[1/1] Linking liblegato  
FAILED: /opt/swi/y22-ext/sysroots/x86\_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc --sysroot=/opt/swi/y17-ext-wp85/sysroots/armv7a-vfp-neon-poky-linux-gnueabi -shared -Wl,–build-id -o /home/ilan/legato\_framework/legato/build/wp85/framework/lib/liblegato.so /home/ilan/legato\_framework/legato/build/wp85/framework/obj/crc.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/doublyLinkedList.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/singlyLinkedList.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/test.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/utf8.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/addr.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/args.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/atomFile.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/cgroups.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/clock.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/daemon.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/dir.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/eventLoop.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/fa\_test.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/fdMonitor.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/file.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/fileDescriptor.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/fileLock.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/fileSystem.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/fs.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/fsSys.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/hashmap.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/hex.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/hsieh\_hash.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/init.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/installer.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/json.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/killProc.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/log.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/mem.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/messaging.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/messagingInterface.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/messagingMessage.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/messagingProtocol.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/messagingSession.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/mutex.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/path.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/pathIter.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/pipeline.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/properties.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/rand.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/safeRef.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/semaphores.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/signals.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/smack.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/sysStatus.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/thread.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/timer.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/tty.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/unixSocket.c.o /home/ilan/legato\_framework/legato/build/wp85/framework/obj/user.c.o -lpthread -lrt -ldl -g && /home/ilan/legato\_framework/legato/framework/tools/scripts/splitdebug -d /home/ilan/legato\_framework/legato/build/wp85/debug /home/ilan/legato\_framework/legato/build/wp85/framework/lib/liblegato.so  
/opt/swi/y22-ext/sysroots/x86\_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/6.2.0/real-ld: cannot find crtbeginS.o: No such file or directory  
collect2: error: ld returned 1 exit status  
ninja: build stopped: subcommand failed.  
Makefile.framework:147: recipe for target ‘liblegato’ failed  
make[2]: \*\*\* [liblegato] Error 1  
make[2]: Leaving directory ‘/home/ilan/legato\_framework/legato’  
Makefile:376: recipe for target ‘framework\_wp85’ failed  
make[1]: \*\*\* [framework\_wp85] Error 2  
make[1]: Leaving directory ‘/home/ilan/legato\_framework/legato’  
Makefile:34: recipe for target ‘legato\_wp85’ failed  
make: \*\*\* [legato\_wp85] Error 2

please advice

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [September 4, 2018, 5:31pm UTC](https://mangoh.discourse.group/t/build-for-red-wp85-failes/1880/2 "2018-09-04T17:31:40Z")

</div>

can you show us what is the toolchain : /opt/swi?

---

<div class="post-metadata">

**Author:** ![deadpoolcode](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@deadpoolcode](https://mangoh.discourse.group/u/deadpoolcode)\
**Post date:** [September 5, 2018, 12:02am UTC](https://mangoh.discourse.group/t/build-for-red-wp85-failes/1880/3 "2018-09-05T00:02:22Z")

</div>

sure, I have two, one for green wp76xx and one for red wp85:

~$ ls -l /opt/swi/  
total 8  
y17-ext  
y17-ext-wp85 -\> /opt/swi/y17-ext  
y22-ext  
y22-ext-wp76xx -\> /opt/swi/y22-ext/

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [September 5, 2018, 3:58am UTC](https://mangoh.discourse.group/t/build-for-red-wp85-failes/1880/4 "2018-09-05T03:58:25Z")

</div>

> [@deadpoolcode](#):
>
> y22-ext-wp76xx -\> /opt/swi/y22-ext/

That doesnt look right. Did you follow exactly the Linux Getting Started guide?

---

<div class="post-metadata">

**Author:** ![deadpoolcode](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@deadpoolcode](https://mangoh.discourse.group/u/deadpoolcode)\
**Post date:** [September 5, 2018, 4:03am UTC](https://mangoh.discourse.group/t/build-for-red-wp85-failes/1880/5 "2018-09-05T04:03:06Z")

</div>

yes I did, actually compiling for green\_wp76xx works great (also for red\_wp76xx)

the only compilation that fails is hte make wp85

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [September 5, 2018, 2:24pm UTC](https://mangoh.discourse.group/t/build-for-red-wp85-failes/1880/6 "2018-09-05T14:24:09Z")

</div>

> [@deadpoolcode](#):
>
> make -f Makefile.framework CC=/opt/swi/y22-ext/sysroots/x86\_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc

your wp85 is pointing to  
make -f Makefile.framework CC=/opt/swi/y22-ext/sysroots/x86\_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc

what firmware version are you using and what toolchain revision?

---

<div class="post-metadata">

**Author:** ![deadpoolcode](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@deadpoolcode](https://mangoh.discourse.group/u/deadpoolcode)\
**Post date:** [September 6, 2018, 1:10am UTC](https://mangoh.discourse.group/t/build-for-red-wp85-failes/1880/7 "2018-09-06T01:10:32Z")

</div>

I am using the latest, downloaded the latest sources this week

---

<div class="post-metadata">

**Author:** ![dfrey](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/dfrey/32/303_2.png) [@dfrey](https://mangoh.discourse.group/u/dfrey)\
**Post date:** [September 6, 2018, 4:28pm UTC](https://mangoh.discourse.group/t/build-for-red-wp85-failes/1880/8 "2018-09-06T16:28:27Z")

</div>

The problem is that the build system is trying to use `/opt/swi/y22-ext/` as the toolchain for the wp85 build. This is what `/opt/swi` looks like in the mangOH VM:

```auto
$ ls -l /opt/swi/
total 16
drwxr-xr-x 3 root root 4096 May 9 18:46 y17-ext-SWI9X15Y_07.12.14.00
lrwxrwxrwx 1 root root 28 May 9 18:47 y17-ext-wp750x -> y17-ext-SWI9X15Y_07.12.14.00
lrwxrwxrwx 1 root root 28 May 9 18:46 y17-ext-wp85 -> y17-ext-SWI9X15Y_07.12.14.00
drwxr-xr-x 3 root root 4096 Sep 6 16:08 y22-ext-SWI9X06Y_02.16.02.00
drwxr-xr-x 3 root root 4096 Sep 6 15:58 y22-ext-SWI9X06Y_02.18.05.00
drwxr-xr-x 3 root root 4096 Jun 25 18:37 y22-ext-SWI9X07Y_02.16.02.00
lrwxrwxrwx 1 root root 28 Jun 25 18:28 y22-ext-wp76xx -> y22-ext-SWI9X07Y_02.16.02.00
lrwxrwxrwx 1 root root 28 Sep 6 16:10 y22-ext-wp77xx -> y22-ext-SWI9X06Y_02.18.05.00

```

Try setting up a similar structure. Of course you don’t need to get all the toolchains and setup symlinks for modules that you don’t care about.
