Issue in Installing AF 17.11.0 on Ubuntu


#1

Hi,

I have installed following toolchaing:
poky-swi-ext-glibc-x86_64-meta-toolchain-swi-ext-armv7a-vfp-neon-toolchain-swi-ext-1.7.3.sh

I downloaded the tarball legato-17.11.0.tar.bz2 from this link: http://legato.io/legato-docs/latest/aboutReleaseInfo.html and ran the command:

make wp76xx (in the extracted path)

I am getting following error:

[319/435] Linking C executable
FAILED: /opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc --sysroot=/opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi -Wl,–build-id -g -o /home/warlord/legato_cmd/legato-17.11.0/build/wp76xx/system/app/modemService/obj/modemDaemon/modemDaemon /home/warlord/legato_cmd/legato-17.11.0/build/wp76xx/system/app/modemService/obj/modemDaemon/_main.c.o -rdynamic -Wl,–enable-new-dtags,-rpath="$ORIGIN/…/lib" “-Lbuild/wp76xx/system/component/83094538471468c0e630141645ab6319/obj” -lComponent_modemDaemon -ljansson -L/home/warlord/legato_cmd/legato-17.11.0/platformAdaptor/qmi/bin/wp76xx/components/le_pa_ecall -lComponent_le_pa_ecall “-Lbuild/wp76xx/system/component/82f0c1ebca647361bf8f05d9c679a16f/obj” -lComponent_le_pa_ecall_default -L/home/warlord/legato_cmd/legato-17.11.0/platformAdaptor/qmi/bin/wp76xx/components/le_pa -lComponent_le_pa -L/home/warlord/legato_cmd/legato-17.11.0/platformAdaptor/qmi/bin/wp76xx/components/swiQmi -lComponent_swiQmi “-Lbuild/wp76xx/system/component/5096e7eea90b4fb5700c77ba2afe4cb1/obj” -lComponent_le_pa_default “-Lbuild/wp76xx/system/component/236a420f33277f9c4e178d1aad49a5f9/obj” -lComponent_watchdogChain “-L$LEGATO_BUILD/framework/lib” -llegato -lpthread -lrt -ldl -lm -g && splitdebug -d build/wp76xx/debug /home/warlord/legato_cmd/legato-17.11.0/build/wp76xx/system/app/modemService/obj/modemDaemon/modemDaemon
/home/warlord/legato_cmd/legato-17.11.0/platformAdaptor/qmi/bin/wp76xx/components/le_pa/libComponent_le_pa.so: undefined reference to `qmi_linux_get_conn_id_by_name_ex
collect2: error: ld returned 1 exit status
[319/435] Compiling C source
ninja: build stopped: subcommand failed.
make: *** [system_wp76xx] Error 1

Can somebody please help.
Thanks,
Yogesh


#2

Hi,

Did you download the toolchain from here for WP76xx:
https://source.sierrawireless.com/resources/airprime/software/wp76xx/wp76xx-firmware-release-7-components/

If no, please try this.


Make green_wp76xx failes on libjansson.so
#3

Hi @jyijyi,

I downloaded and installed the “64-bit ToolChain” toolchain from the link you provided but after that I am getting following error while compiling legato ( legato-17.11.0.tar.bz2):

Generate an MD5 hash of everything in the source directories.
find framework components interfaces platformAdaptor modules apps/platformServices apps/proprietary 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=17.11.0
md5=e0ed9a2830fc6f2e541fdbec0b6365f2
make -f Makefile.framework CC=/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc
make[1]: Entering directory /home/warlord/legato_cmd/legato-17.11.0' mkdir -p /home/warlord/legato_cmd/legato-17.11.0/build/wp76xx/framework/lib framework/liblegato/ninja-generator ninja -f /home/warlord/legato_cmd/legato-17.11.0/build/wp76xx/framework/build.ninja [2/51] Compiling liblegato source file FAILED: /opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc -MMD -MF /home/warlord/legato_cmd/legato-17.11.0/build/wp76xx/framework/obj/doublyLinkedList.c.o.d -c /home/warlord/legato_cmd/legato-17.11.0/framework/liblegato/doublyLinkedList.c -o /home/warlord/legato_cmd/legato-17.11.0/build/wp76xx/framework/obj/doublyLinkedList.c.o -Wall -Werror -DLEGATO_EMBEDDED -fPIC -I/home/warlord/legato_cmd/legato-17.11.0/framework/daemons/linux -g -O2 -fno-omit-frame-pointer -I/home/warlord/legato_cmd/legato-17.11.0/framework/liblegato/linux -DLE_COMPONENT_NAME=framework -I/home/warlord/legato_cmd/legato-17.11.0/framework/include -I/home/warlord/legato_cmd/legato-17.11.0/framework/liblegato -DDISABLE_SMACK=0 -DLE_SVCDIR_SERVER_SOCKET_NAME="\"/tmp/legato/serviceDirectoryServer\"" -DLE_SVCDIR_CLIENT_SOCKET_NAME="\"/tmp/legato/serviceDirectoryClient\"" In file included from /home/warlord/legato_cmd/legato-17.11.0/framework/liblegato/doublyLinkedList.c:6:0: /home/warlord/legato_cmd/legato-17.11.0/framework/include/legato.h:145:20: fatal error: unistd.h: No such file or directory #include <unistd.h> ^ compilation terminated. [2/51] Compiling liblegato source file FAILED: /opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc -MMD -MF /home/warlord/legato_cmd/legato-17.11.0/build/wp76xx/framework/obj/crc.c.o.d -c /home/warlord/legato_cmd/legato-17.11.0/framework/liblegato/crc.c -o /home/warlord/legato_cmd/legato-17.11.0/build/wp76xx/framework/obj/crc.c.o -Wall -Werror -DLEGATO_EMBEDDED -fPIC -I/home/warlord/legato_cmd/legato-17.11.0/framework/daemons/linux -g -O2 -fno-omit-frame-pointer -I/home/warlord/legato_cmd/legato-17.11.0/framework/liblegato/linux -DLE_COMPONENT_NAME=framework -I/home/warlord/legato_cmd/legato-17.11.0/framework/include -I/home/warlord/legato_cmd/legato-17.11.0/framework/liblegato -DDISABLE_SMACK=0 -DLE_SVCDIR_SERVER_SOCKET_NAME="\"/tmp/legato/serviceDirectoryServer\"" -DLE_SVCDIR_CLIENT_SOCKET_NAME="\"/tmp/legato/serviceDirectoryClient\"" In file included from /home/warlord/legato_cmd/legato-17.11.0/framework/liblegato/crc.c:12:0: /home/warlord/legato_cmd/legato-17.11.0/framework/include/legato.h:145:20: fatal error: unistd.h: No such file or directory #include <unistd.h> ^ compilation terminated. ninja: build stopped: subcommand failed. make[1]: *** [liblegato] Error 1 make[1]: Leaving directory/home/warlord/legato_cmd/legato-17.11.0’
make: *** [framework_wp76xx] Error 2

Thanks,
Yogesh


#4

Hi,

I tried with 32 bit toolchain on Ubuntu 14, there is no problem to build “make wp76xx” on legato 17.11.0.
I saw the toolchain should be installed in /opt/swi/y22-ext/, but in your log, it is still /opt/swi/y17-ext/.
Are you sure you installed the toolchain?


#5

Hi @jyijyi,

I have corrected the toolchain issue but now it’s not able to find gcc. Now I am getting following error:

Generate an MD5 hash of everything in the source directories.
find framework components interfaces platformAdaptor modules apps/platformServices apps/proprietary 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=17.11.0
md5=b742c1ea06b49272e6593562be75bbab
make -f Makefile.framework CC=/gcc
make[1]: Entering directory /home/warlord/legato_cmd/legato-17.11.0' mkdir -p /home/warlord/legato_cmd/legato-17.11.0/build/wp76xx/framework/lib framework/liblegato/ninja-generator ninja -f /home/warlord/legato_cmd/legato-17.11.0/build/wp76xx/framework/build.ninja [2/51] Compiling liblegato source file FAILED: /gcc -MMD -MF /home/warlord/legato_cmd/legato-17.11.0/build/wp76xx/framework/obj/doublyLinkedList.c.o.d -c /home/warlord/legato_cmd/legato-17.11.0/framework/liblegato/doublyLinkedList.c -o /home/warlord/legato_cmd/legato-17.11.0/build/wp76xx/framework/obj/doublyLinkedList.c.o -Wall -Werror -DLEGATO_EMBEDDED -fPIC -I/home/warlord/legato_cmd/legato-17.11.0/framework/daemons/linux -g -O2 -fno-omit-frame-pointer -I/home/warlord/legato_cmd/legato-17.11.0/framework/liblegato/linux -DLE_COMPONENT_NAME=framework -I/home/warlord/legato_cmd/legato-17.11.0/framework/include -I/home/warlord/legato_cmd/legato-17.11.0/framework/liblegato -DDISABLE_SMACK=0 -DLE_SVCDIR_SERVER_SOCKET_NAME="\"/tmp/legato/serviceDirectoryServer\"" -DLE_SVCDIR_CLIENT_SOCKET_NAME="\"/tmp/legato/serviceDirectoryClient\"" /bin/sh: 1: /gcc: not found [2/51] Compiling liblegato source file FAILED: /gcc -MMD -MF /home/warlord/legato_cmd/legato-17.11.0/build/wp76xx/framework/obj/crc.c.o.d -c /home/warlord/legato_cmd/legato-17.11.0/framework/liblegato/crc.c -o /home/warlord/legato_cmd/legato-17.11.0/build/wp76xx/framework/obj/crc.c.o -Wall -Werror -DLEGATO_EMBEDDED -fPIC -I/home/warlord/legato_cmd/legato-17.11.0/framework/daemons/linux -g -O2 -fno-omit-frame-pointer -I/home/warlord/legato_cmd/legato-17.11.0/framework/liblegato/linux -DLE_COMPONENT_NAME=framework -I/home/warlord/legato_cmd/legato-17.11.0/framework/include -I/home/warlord/legato_cmd/legato-17.11.0/framework/liblegato -DDISABLE_SMACK=0 -DLE_SVCDIR_SERVER_SOCKET_NAME="\"/tmp/legato/serviceDirectoryServer\"" -DLE_SVCDIR_CLIENT_SOCKET_NAME="\"/tmp/legato/serviceDirectoryClient\"" /bin/sh: 1: /gcc: not found ninja: build stopped: subcommand failed. make[1]: *** [liblegato] Error 1 make[1]: Leaving directory/home/warlord/legato_cmd/legato-17.11.0’
make: *** [framework_wp76xx] Error 2

Thanks,
Yogesh


#6

Hi,

did you type “. bin/configlegatoenv” before “make wp76xx”?
did you have the following after typing “export”?


declare -x WP76XX_TOOLCHAIN_DIR="/opt/swi/y22-ext/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi"


Please attached the full log after “make wp76xx”. Maybe there is some access right problem on some source files.


#7

Hi @jyijyi,

. bin/configlegatoenv was giving following output:
[ar7] No toolchain found for target ‘ar7’.
[ar86] No toolchain found for target ‘ar86’.
[wp85] No toolchain found for target ‘wp85’.
[wp750x] No toolchain found for target ‘wp750x’.
[wp76xx] No toolchain found for target ‘wp76xx’.
[wp77xx] No toolchain found for target ‘wp77xx’.
[ar758x] No toolchain found for target ‘ar758x’.
[ar759x] No toolchain found for target ‘ar759x’.
[em75xx] No toolchain found for target ‘em75xx’.
[virt] No toolchain found for target ‘virt’.

and export was giving no output for WP76XX_TOOLCHAIN_DIR
warlord@ubuntu:~/legato_cmd/legato-17.11.0$ export|grep WP76XX_TOOLCHAIN_DIR

so I exported WP76XX_TOOLCHAIN_DIR
export WP76XX_TOOLCHAIN_DIR="/opt/swi/y22-ext/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi"
warlord@ubuntu:~/legato_cmd/legato-17.11.0$
warlord@ubuntu:~/legato_cmd/legato-17.11.0$

and run the configlegatoenv script
warlord@ubuntu:~/legato_cmd/legato-17.11.0$ . bin/configlegatoenv
[ar7] No toolchain found for target ‘ar7’.
[ar86] No toolchain found for target ‘ar86’.
[wp85] No toolchain found for target ‘wp85’.
[wp750x] No toolchain found for target ‘wp750x’.
[wp76xx] Toolchain dir[/opt/swi/y22-ext/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi] prefix[arm-poky-linux-gnueabi-]
[wp77xx] No toolchain found for target ‘wp77xx’.
[ar758x] No toolchain found for target ‘ar758x’.
[ar759x] No toolchain found for target ‘ar759x’.
[em75xx] No toolchain found for target ‘em75xx’.
[virt] No toolchain found for target ‘virt’.
warlord@ubuntu:~/legato_cmd/legato-17.11.0$
warlord@ubuntu:~/legato_cmd/legato-17.11.0$
warlord@ubuntu:~/legato_cmd/legato-17.11.0$ export|grep WP76XX_TOOLCHAIN_DIR
declare -x WP76XX_TOOLCHAIN_DIR="/opt/swi/y22-ext/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi"

Now I am able to compile the AF and sample apps. Are the steps, that I have carried out above, correct?

Thanks,
Yogesh


#8

Hi,

I did not set the WP76xx toolchain by myself.
But anyway, in case you can compile, that should be ok.