Build for red_wp85 failes


#1

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


#2

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


#3

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/


#4

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


#5

yes I did, actually compiling for green_wp76xx works great (also for red_wp76xx)

the only compilation that fails is hte make wp85


#6

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?


#7

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


#8

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:

$ 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.