How to specify which toolchain to use when make app/system?


#1

Hi the community! I have been stuck in a building issue. I was using DS native 17.08.1 Legato framework for WP76. When I source bin/configlegatoenv here’s what showed up:

[ar7] No toolchain found for target ‘ar7’.
[ar86] No toolchain found for target ‘ar86’.
[wp85] Toolchain dir[/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi] prefix[arm-poky-linux-gnueabi-]
[wp750x] Toolchain dir[/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi] prefix[arm-poky-linux-gnueabi-]
[wp76xx] Toolchain dir[/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi] prefix[arm-poky-linux-gnueabi-]
[wp77xx] Toolchain dir[/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi] prefix[arm-poky-linux-gnueabi-]
[ar758x] Toolchain dir[/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi] prefix[arm-poky-linux-gnueabi-]
[ar759x] Toolchain dir[/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi] prefix[arm-poky-linux-gnueabi-]
[em75xx] Toolchain dir[/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi] prefix[arm-poky-linux-gnueabi-]
[virt] No toolchain found for target ‘virt’.

I believe this indicates that the tool-chains for these specific modules are available, am I right? But when I make a system say the mangOH system for WP76, this error always occurs:

undefined reference to `qmi_linux_get_conn_id_by_name_ex’

According to previous posts this seems to be a typical error message when a proper toolchain is missing. How can I make sure that I’m using the right toolchain when mkapp of mksys? Where the framework and toolchain are linked?

Really a lot of thanks for kind replies.

BTW, I also seriously followed the steps in http://legato.io/legato-docs/latest/basicBuildLegato.html, but with no luck.


#2

That error happens when you’re using a wp85 toolchain for a wp76xx build.
You can eventually force the toolchain to use by using WP76XX_TOOLCHAIN_DIR.

export WP76XX_TOOLCHAIN_DIR=$HOME/.legato/sdk/wp76xx/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi

for instance, if you want to install the toolchain in $HOME/.legato/sdk/wp76xx/

I have a couple of patches to improve the toolchain experience that I’m trying to finish, especially regarding versioning, so we should have something better for 18.01.


#3

Thanks @CoRfr. Now I have the following error:

ninja: build stopped: subcommand failed.

The whole console log of making mangOH Green for wp76 is here log.txt (13.8 KB).

In the original post the toolchains found by configlegatoenv are in the same directory, but in that directory I only installed the one for wp76. Is that normal?


#4

I think it’s the same error, cf from your log:

/home/lichen/legato/packages/legato.framework.17.8.1.wp76xx-201710231405/resources/legato/platformAdaptor/qmi/bin/wp76xx/components/le_pa/libComponent_le_pa.so: undefined reference to `qmi_linux_get_conn_id_by_name_ex'

Could you try to remove /opt/swi/y17-ext and then reinstall the wp76 toolchain?
Also, where did you download that toolchain from?


#5

I’ll try, thanks. The toolchain was downloaded from here, Rebuild Linux Distribution or/and Legato from source section, and click 64-bit ToolChain


#6

Hi @CoRfr, problem is solved according to your solution by removing y17-ext and reinstalling toolchain. I have a doubt now since it seems that only if folder y17-ext contains the proper toolchain for a certain target module the build process can be successful. Then does that mean only one module can be built against at a time? If I want to change a module to build against shall I remove y17-ext and reinstall toolchain again everytime?


#7

Hi @lichen

You can have multiple toolchains installed at a time by using legato-spm
By the, we’re working at improving the command-line packaging in the coming releases.