Legato installation issue

Hi,

I’m having problems getting Legato installed. I suspect I have a problem with git, but I’m not really sure and haven’t been able to solve it. When I run make to install legato I get the following messages:

isabel@isabel-F3Sv:~/Legato/legato-AlphaB-r1$ make
Makefile:47: AR7_TOOLCHAIN_DIR not defined. Using default.
Makefile:56: WP7_TOOLCHAIN_DIR not defined. Using default.
Makefile:65: RASPI_TOOLCHAIN_DIR not defined.
fatal: No names found, cannot describe anything.
mkdir -p build/tools && cd build/tools && cmake …/…/buildTools && make
– Flex found at /usr/bin/flex.
– Bison found at /usr/bin/bison.
– Configuring done
– Generating done
– Build files have been written to: /home/isabel/Legato/legato-AlphaB-r1/build/tools
make[1]: Entering directory /home/isabel/Legato/legato-AlphaB-r1/build/tools' make[2]: Entering directory /home/isabel/Legato/legato-AlphaB-r1/build/tools’
make[3]: Entering directory /home/isabel/Legato/legato-AlphaB-r1/build/tools' make[3]: Leaving directory /home/isabel/Legato/legato-AlphaB-r1/build/tools’
[ 35%] Built target ObjectModel
make[3]: Entering directory /home/isabel/Legato/legato-AlphaB-r1/build/tools' make[3]: Leaving directory /home/isabel/Legato/legato-AlphaB-r1/build/tools’
[ 75%] Built target Parser
make[3]: Entering directory /home/isabel/Legato/legato-AlphaB-r1/build/tools' make[3]: Leaving directory /home/isabel/Legato/legato-AlphaB-r1/build/tools’
[100%] Built target mk
make[2]: Leaving directory /home/isabel/Legato/legato-AlphaB-r1/build/tools' make[1]: Leaving directory /home/isabel/Legato/legato-AlphaB-r1/build/tools’
mkdir -p bin
ln -sf /home/isabel/Legato/legato-AlphaB-r1/build/tools/bin/mk* bin/
ln -sf mk bin/mkexe
ln -sf mk bin/mkapp
ln -sf /home/isabel/Legato/legato-AlphaB-r1/framework/tools/scripts/* bin/
ln -sf /home/isabel/Legato/legato-AlphaB-r1/framework/tools/ifgen/ifgen bin/

Configure Legato

export PATH=/usr/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/android-sdk-linux/tools:/opt/android-sdk-linux/platform-tools:/opt/android-sdk-linux:/opt/android-sdk-linux/tools:/opt/android-sdk-linux/platform-tools &&
cd dirname build/localhost/Makefile &&
cmake …/…
-DLEGATO_TARGET=localhost
-DTEST_COVERAGE=
-DINCLUDE_AIRVANTAGE=
Building Legato for target localhost
fatal: Needed a single revision
CMake Error at cmake/GetGitRevision.cmake:16 (string):
string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
CMakeLists.txt:97 (get_git_revision)

– Git Revision: Unknown
– Coverage reporting (TEST_COVERAGE): Disabled
– Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
CMake Warning at framework/doc/CMakeLists.txt:47 (message):
Documentation: Doxygen not found, no documentation will be produced.

– Audio Component (LEGATO_COMPONENTS_AUDIO): STUB
– Modem Component (LEGATO_COMPONENTS_MODEM): AT
– GNSS Component (LEGATO_COMPONENTS_GNSS): AT
Positioning test uses simulator.
– Configuring incomplete, errors occurred!
make: *** [build/localhost/Makefile] Error 1

Any idea how I can fix this?

Best regards,

Isabel.

Hi Isabel,

A couple of quick questions:

  1. What Linux distribution are you using?
  2. Did you follow the setup instructions in the getting started guide? (in particular the packages that need to be installed)

Regards,
Andrew

Hi Isabel,

Before you build the Legato toolchain, you have to (a) install the Yocto compiler distribution & (b) set the environment variables correctly.

After installing the Yocto compiler, according to the getting started (Install Legato Toolchain section) doco, you have to do the following:

cd <your legato toolchain directory>
make
. bin/configlegatoenv
make wp7; make ar7
make docs

Note that the . bin/configlegatoenv is critical - otherwise the makefiles can’t find the correct compiler.

And, you have to run this every time you log-on or open a new terminal. I got sick of this, and have added the following to the end of my .bashrc file:

[code]# djc: add the path to the Android toolkit and Yocto compiler

Note, these are both single (long) lines

PATH=${PATH}:/opt/android-sdk-linux:/opt/android-sdk-linux/tools:/opt/android-sdk-linux/platform-tools
PATH=${PATH}:/opt/swi/y14-ext/tmp/sysroots/x86_64-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi

exec the legato environment setup

MYDIR=pwd

This is the path to your Legato framework directory

cd $HOME/legato-AlphaB-r1
. bin/configlegatoenv > /dev/null
cd ${MYDIR}

disable UNITY menu proxy to stop errors in DS3

UBUNTU_MENUPROXY=“”

[/code]

To add this to your .bashrc file so that the environment is set up correctly, do the following:
[ul][li]Log into your Ubuntu dev environment[/li]
[li]open a Terminal (from the bar down the left hand side)[/li]
[li]type the following:nano .bashrc (the leading ‘.’ is important - this is a ‘hidden’ file that you’re working with[/li]
[li]Scroll down to the end of the file and hit enter a couple of time to insert some blank lines[/li]
[li]Copy the above shell script fragment and paste it into the editor[/li]
[li]Save<CTRL>-O and exit nano<CTRL>-X[/li]
[li]Open ANOTHER terminal[/li]
[li]In the new terminal, type the following:echo $AR7_TOOLCHAIN_DIR and hit enter. You should get something like this:/opt/swi/y14-ext/tmp/sysroots/x86_64-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabiwhich is the path to your yocto GCC compiler chain. If you don’t then check that the paths in the .bashrc file are appropriate for your installation.[/li][/ul]

Now, every time you log on or open a new terminal, the environment will be correctly set up.

Hope this helps you get going.

ciao, Dave

Hi guys,

Thanks for your responses, but unfortunatelly it’s still not working :frowning:

I discovered I hadn’t installed all packages (I think I just got the first line, and the other were lost when copy-pasting). However I installed them all now and still got the same problem.

I’m using Ubuntu 12.04.3 LTS, which I specially installed for this project.

I hadn’t installed Yocto yet, but like the packages this didn’t improve the situation.

Using
. bin/configlegatoenv
export AR7_TOOLCHAIN_DIR=/…
export WP7_TOOLCHAIN_DIR=/…

Does make the warnings on these toolchains disappear, but doesn’t change anything in the errors.

Any other ideas?

Best regards,

Isabel.

Hiya Isobel,

You need to install the Yocto tarball(s).

It contains the correct GCC compilers required to build applications for the WP7.

You should have a directory something like /opt/swi/y14-ext/tmp/sysroots/x86_64-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi which is where the Legato WP7 gcc compiler family is installed.

ciao, Dave

Hi Isobel,

Have you installed all these tools on your Linux box as per the getting started guide?

$ sudo apt-get install bison build-essential chrpath cifs-utils cmake coreutils curl desktop-file-utils diffstat docbook-utils doxygen fakeroot flex g++ gawk gcc git-core gitk graphviz help2man libgmp3-dev libmpfr-dev libreadline6-dev libtool libxml2-dev libxml-libxml-perl make m4 python-pip python-pyparsing python-pysqlite2 quilt samba scons sed subversion texi2html texinfo unzip wget

Did they all install properly? From your reported errors it looks like (at least) git (source code control) and doxygen (Documentation generator) haven’t been installed correctly.

It shouldn’t hurt to re-run the above command line as it won’t modify any tools that are already installed and don’t need updating.

ciao, Dave

Hi Isobel,

A couple more thoughts to try:

Check that doxygen is installed:dev@legato-dev:~$ which doxygen /usr/bin/doxygen
Check that git is installed:dev@legato-dev:~$ which git /usr/bin/git
If either of these commands don’t return a path similar to that given above, then you will need to install the approriate package using sudo apt-get install

If these packages are installed, you can try making from scratch again:
Try a the following in your legato framework directory:make clean . bin/configlegatoenv make make wp7 make docs

Finally, you can try the nuclear option - remove the legato framework directory completelycd ~ rm -rf legato-AlphaB-r1untar the tarball as per the getting started notes and start the make process again.

ciao, Dave

I am getting following error when i am trying to run make ar7 command.

How to install particular tool chain. I couldn’t able to get individual tool chain installable.

ubuntu@ubuntu:/dev/Legato/legato-af-master$ make ar7

No toolchain found for target ‘ar6’.
Makefile:159: AR7_TOOLCHAIN_DIR not defined. Using default.
No toolchain found for target ‘ar7’.
No toolchain found for target ‘ar86’.
No toolchain found for target ‘wp7’.
No toolchain found for target ‘wp85’.

Create the build/tools directory, run cmake in there to construct Makefiles, then run make.

mkdir -p build/tools &&
cd build/tools &&
cmake …/…/framework/tools/mkTools
-DUSE_CLANG=0
-DHOST_ARCH=i686
-DTOOLS_ARCH=i686 &&
make
– Version: 15.08.1.Beta
– Build Host arch: i686
– Tools arch: i686
– Configuring done
– Generating done
– Build files have been written to: /dev/Legato/legato-af-master/build/tools
make[1]: Entering directory /dev/Legato/legato-af-master/build/tools' make[2]: Entering directory /dev/Legato/legato-af-master/build/tools’
make[3]: Entering directory /dev/Legato/legato-af-master/build/tools' make[3]: Leaving directory /dev/Legato/legato-af-master/build/tools’
[ 2%] Built target PrecompiledHeader
make[3]: Entering directory /dev/Legato/legato-af-master/build/tools' make[3]: Leaving directory /dev/Legato/legato-af-master/build/tools’
[ 14%] Built target mkTools
make[3]: Entering directory /dev/Legato/legato-af-master/build/tools' make[3]: Leaving directory /dev/Legato/legato-af-master/build/tools’
[ 26%] Built target parser
make[3]: Entering directory /dev/Legato/legato-af-master/build/tools' make[3]: Leaving directory /dev/Legato/legato-af-master/build/tools’
[ 34%] Built target parseTree
make[3]: Entering directory /dev/Legato/legato-af-master/build/tools' make[3]: Leaving directory /dev/Legato/legato-af-master/build/tools’
[ 60%] Built target conceptualModel
make[3]: Entering directory /dev/Legato/legato-af-master/build/tools' make[3]: Leaving directory /dev/Legato/legato-af-master/build/tools’
[ 66%] Built target modeller
make[3]: Entering directory /dev/Legato/legato-af-master/build/tools' make[3]: Leaving directory /dev/Legato/legato-af-master/build/tools’
[ 76%] Built target buildScriptGenerator
make[3]: Entering directory /dev/Legato/legato-af-master/build/tools' make[3]: Leaving directory /dev/Legato/legato-af-master/build/tools’
[ 82%] Built target codeGenerator
make[3]: Entering directory /dev/Legato/legato-af-master/build/tools' make[3]: Leaving directory /dev/Legato/legato-af-master/build/tools’
[ 84%] Built target configGenerator
make[3]: Entering directory /dev/Legato/legato-af-master/build/tools' make[3]: Leaving directory /dev/Legato/legato-af-master/build/tools’
[ 86%] Built target avManifestGenerator
make[3]: Entering directory /dev/Legato/legato-af-master/build/tools' make[3]: Leaving directory /dev/Legato/legato-af-master/build/tools’
[100%] Built target mk
make[2]: Leaving directory /dev/Legato/legato-af-master/build/tools' make[1]: Leaving directory /dev/Legato/legato-af-master/build/tools’

Create the ./bin directory and create symlinks to tools in there.

mkdir -p bin
ln -sf /dev/Legato/legato-af-master/build/tools/bin/mk* bin/
ln -sf mk bin/mkcomp
ln -sf mk bin/mkexe
ln -sf mk bin/mkapp
ln -sf mk bin/mksys
ln -sf /dev/Legato/legato-af-master/framework/tools/scripts/* bin/
ln -sf /dev/Legato/legato-af-master/framework/tools/ifgen/ifgen bin/

ninja is called ninja-build on some distros (e.g., Fedora).

if ! which ninja ;
then
if which ninja-build ;
then
ln -s which ninja-build bin/ninja ;
else
echo “***ERROR: Ninja build tool not found.” 1>&2 ;
exit 1;
fi;
fi
/usr/bin/ninja
mkdir -p build/ar7/bin/apps

Configure Legato

export PATH=:/dev/Legato/legato-af-master/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/dev/Legato/legato-af-master/build/localhost/bin:/dev/Legato/legato-af-master/bin &&
cd dirname build/ar7/Makefile &&
cmake …/…
-DLEGATO_TARGET=ar7
-DTEST_COVERAGE=
-DINCLUDE_ECALL=1
-DUSE_CLANG=0
-DPLATFORM_SIMULATION=
-DCMAKE_TOOLCHAIN_FILE=/dev/Legato/legato-af-master/cmake/toolchain.yocto.cmake
Building Legato for target ar7
Including eCall to target ar7
CMake Error at cmake/toolchain.yocto.cmake:45 (message):
Unable to find C compiler
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:93 (include)
CMakeLists.txt:130 (project)

CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file: /dev/Legato/legato-af-master/build/ar7/CMakeFiles/2.8.12.2/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file: /dev/Legato/legato-af-master/build/ar7/CMakeFiles/2.8.12.2/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
– Configuring incomplete, errors occurred!
make: *** [build/ar7/Makefile] Error 1

please guide me where i am doing wrong. I have installed all necessary packages as suggested in Get Started doc

Hi.

Downloads for Legato, including toolchains, are available at source.sierrawireless.com/resour … downloads/. You will need to log in.

If you have an AR7 I presum eyou also have a support contact who should be able to supply you the correct toolchain. It is important that you are using the correct version.

Regards,
Andrew