Desktop Installation: Difference between revisions

From STRIDE Wiki
Jump to navigation Jump to search
 
(129 intermediate revisions by 5 users not shown)
Line 1: Line 1:
To leverage the STRIDE Sandbox you need to install the STRIDE Framework package on your PC.
== Installation Packages ==
== Installation Packages ==
Files are installed by unzipping the provided package to your PC. Packages are available targeting the following operating systems (your version number may be different than that shown):
Files are installed by unzipping the provided package to your PC. Packages are available targeting the following operating systems (your version number may be different than that shown):
;Windows XP
;Windows (x86)
:<tt>STRIDE_framework-windows_4.1.0x.zip</tt>
:<tt>STRIDE_framework-windows_5.x.yy.zip</tt>
;Linux
;Linux (x86)
:<tt>STRIDE_framework-linux_4.1.0x.tgz</tt>
:<tt>STRIDE_framework-linux_5.x.yy.tgz</tt>
;FreeBSD (x86)
:<tt>STRIDE_framework-freebsd_5.x.yy.tgz</tt>


Please see the appropriate installation instructions below.
Please see the appropriate installation instructions below.


== Linux ==
== Windows Installation ==


=== Unpacking ===
=== Unpacking ===
The following installation example assumes the the installation package is located in your home directory and that the directory <tt>~/stride</tt> exists. You can choose to install to a different location (all instructions below assume you are installing into <tt>~/stride</tt>). The version numbers in your archive file name may be different than those shown in the example.
The following installation example assumes the the installation package is located in your root directory and that the directory <tt>\stride</tt> exists. You can choose to install to a different location (all instructions below assume you are installing into <tt>\stride</tt>).  
 
The example uses the open source [http://www.7-zip.org/ 7-Zip] utility to unzip the archive.


  cd ~/stride
  cd \stride
  tar -zxvf ../STRIDE_framework-linux_4.1.0x.tgz
  "\Program Files\7-Zip\7z" x ..\STRIDE_framework-windows_5.x.yy.zip


Once unzipped, files will have been installed under the <tt>~/stride</tt> directory.
Once unzipped, files will have been installed under the <tt>\stride</tt> directory.


=== Verify Environment Variables ===
=== Verify Environment Variables ===


==== Updated PATH ====
==== Updated PATH ====
As a final step, you will need to update your PATH environment variable to include <tt>~/stride/bin</tt>.  
As a final step, you will need to update your <tt>[http://en.wikipedia.org/wiki/Path_(variable) PATH]</tt> environment variable to include <tt>\stride\bin</tt>.
For instructions on modifying it, please see [http://support.microsoft.com/kb/310519 http://support.microsoft.com/kb/310519].


If you use the bash shell, enter the following at a command prompt, or to automatically set at each login, add to your <tt>.bashrc</tt>:
NOTE: ''Make sure to insert '''no spaces''' before and after the semicolon separators(;).''
export PATH=$PATH:~/stride/bin


For other shells, and more information, please see the following articles:
==== Create/Update STRIDE_DIR====
* [http://www.linuxheadquarters.com/howto/basic/path.shtml http://www.linuxheadquarters.com/howto/basic/path.shtml].
* [http://en.wikipedia.org/wiki/Environment_variable#UNIX http://en.wikipedia.org/wiki/Environment_variable]


==== Create/Update STRIDE_DIR====
Verify that the  <tt>STRIDE_DIR</tt> environment variable exists and is set to the root installation directory (<tt>\stride</tt>). If this environment variable does not yet exist, you should create it as a user environment variable.
Verify that the  <tt>STRIDE_DIR</tt> environment variable exists and is set to the root installation directory (<tt>~/stride</tt>). If this environment variable does not yet exist, you should automatically set at each login, add to your <tt>.bashrc</tt>.


====  Create/Update PERL5LIB ====
To confirm installation and display ''help'' run the following command in a console window:
In  order to run the host script modules in perl, you must ensure that the  following two directories are part of your <tt>PERL5LIB</tt> environment variable:


* <tt>~/stride/lib/perl</tt>
stride -h
* <tt>~/stride/lib/perl/5.X.Y</tt>  -- where X matches your minor version of perl. The sub-minor version (Y) does not typically need to match, but we include it so that we know which exact perl source version our files were built against. If your version of perl does not match any of the versions we provide, please consider upgrading.


If this environment variable does not yet exist, you should  automatically set at each login, add to your <tt>.bashrc</tt>. Unique directory paths should be separated by a colon when creating  this environment variable.
=== Uninstalling ===
To uninstall STRIDE simply:
* Remove any reference to <tt>\stride\bin</tt> in your <tt>PATH</tt> environment variable.  
* Remove <tt>STRIDE_DIR</tt> environment variable.
* Remove <tt>\stride</tt> directory.


=== Other prerequisites ===
== Linux/FreeBSD Installation ==


==== perl ====
=== Unpacking ===
The following installation example assumes the the installation package is located in your home directory and that the directory <tt>~/stride</tt> exists. You can choose to install to a different location (all instructions below assume you are installing into <tt>~/stride</tt>).


If you intend to use [[Test Modules Overview|STRIDE Script modules]] for expectation testing in script, you will need a recent version of perl installed. As of this writing, we support versions 5.8.9 and 5.10.x (5.12 support will be available shortly). Our STRIDE perl libraries have a few dependencies on standard packages that might not be installed on your system:
cd ~/stride
tar -zxvf ../STRIDE_framework-linux_5.x.yy.tgz


* [http://search.cpan.org/~ingy/YAML-LibYAML-0.33/lib/YAML/XS.pm YAML::XS]
Once unzipped, files will have been installed under the <tt>~/stride</tt> directory.
* [http://search.cpan.org/~makamaka/JSON-2.21/lib/JSON.pm JSON]
* [http://search.cpan.org/~adamk/PPI-1.210/lib/PPI.pm PPI]
* [http://search.cpan.org/~shancock/Perl-Tidy-20090616/lib/Perl/Tidy.pm Perl::Tidy]


If your perl is installed in a system directory (<tt>/usr/bin/perl</tt>, for instance), you will need root access to install shared modules. The simplest method for installing packages is via the [http://www.perl.com/doc/manual/html/lib/CPAN.html CPAN shell]. <tt>sudo perl -MCPAN -eshell</tt> will start the shell in interactive mode. Once in the shell, <tt>install PACKAGE_NAME</tt> will search for and install the latest stable version of PACKAGE_NAME.
=== Verify Environment Variables ===


The STRIDE perl packages also need to load your system's libperl.so (shared object file) at runtime. Depending on your system, this file should be loadable from a perl CORE directory or from one of the shared system directories. If you do not have this shared library on your system, you might need to install a ''libperl-dev'' or ''perl-devel'' package in order to get it.
==== Updated PATH ====
As a final step, you will need to update your <tt>[http://en.wikipedia.org/wiki/Path_(variable) PATH]</tt> environment variable to include <tt>~/stride/bin</tt>.  


== Windows ==
If you use the bash shell, enter the following at a command prompt, or to automatically set at each login, add to your <tt>.bashrc</tt>:
=== Prerequisites ===
export PATH=$PATH:~/stride/bin
The current versions of the STRIDE Framework have only been tested under Windows XP, (SP 2 and greater). If you need to run the framework on Windows Vista or Windows 7, please contact us.


In order to run host-based script modules, you must have a recent build of perl for Windows installed. We recommend the standard distributions from [http://www.activestate.com ActiveState].
For other shells, and more information, please see the following articles:
* [http://www.linuxheadquarters.com/howto/basic/path.shtml http://www.linuxheadquarters.com/howto/basic/path.shtml].
* [http://en.wikipedia.org/wiki/Environment_variable#UNIX http://en.wikipedia.org/wiki/Environment_variable]


=== Unpacking ===
==== Create/Update STRIDE_DIR====
The following installation example assumes the the installation package is located in your root directory and that the directory <tt>\stride</tt> exists. You can choose to install to a different location (all instructions below assume you are installing into <tt>\stride</tt>). The version numbers in your archive file name may be different than those shown in the example.
Verify that the <tt>STRIDE_DIR</tt> environment variable exists and is set to the root installation directory (<tt>~/stride</tt>). If this environment variable does not yet exist, you should automatically set at each login, add to your <tt>.bashrc</tt>:
export STRIDE_DIR=~/stride
 
To confirm installation and display ''help'' run the following command in a console window:
 
stride -h
 
NOTE: ''In a 64-bit environment the above may fail with errors like: <code>"/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory"</code> or <code>"ELF interpreter /libexec/ld-elf32.so.1 not found"</code>. To resolve this issue install the appropriate 32-bit compatibility libraries for your Linux/FreeBSD distribution:''


The example uses the open source [http://www.7-zip.org/ 7-Zip] utility to unzip the archive.
* Debian / Ubuntu
sudo dpkg --add-architecture i386
sudo apt-get install libc6:i386 libstdc++6:i386
* Fedora / CentOS / RHEL
sudo setarch i386 yum install glibc libstdc++
* FreeBSD
Make sure to have <code>lib32</code> installed (via [http://www.freebsd.org/cgi/man.cgi?query=sysinstall&apropos=0&sektion=0&manpath=FreeBSD+8.4-RELEASE&arch=default&format=html sysinstall(8)] - Configure|Distributions|lib32) and have your kernel built with:
options COMPAT_FREEBSD32 # Compatible with i386 binaries


cd \stride
=== Uninstalling ===
"\Program Files\7-Zip\7z" x ..\STRIDE_framework-windows_4.1.0x.zip
To uninstall STRIDE simply:
* Remove any reference to <tt>~/stride/bin</tt> in your <tt>PATH</tt> environment variable.
* Remove <tt>STRIDE_DIR</tt> environment variable.
* Remove <tt>~/stride</tt> directory.


Once unzipped, files will have been installed under the <tt>\stride</tt> directory.
== Directories and Files ==


=== Executing batch file ===
To integrate STRIDE in to your target build system it is required to understand the directories layout and the files inside then. A quick orientation is shown below.


Once the framework package has been unpacked, you must execute the <tt>'''framework_install.bat'''</tt> file in the <tt>bin</tt>. Double click this file to launch it. It should finish within 30 seconds and prompt you to close the window.
<u>''NOTE:''</u> ''It's not necessary to understand the workings of the STRIDE framework to perform evaluation or training. The desktop package contains an [[STRIDE Off-Target Environment]] that utilizes a SDK that is set up with appropriate options and settings to enable "out of the box" functionality.''


=== Verify Environment Variables ===
===<tt>bin</tt>===
This directory contains the [[Build Tools|STRIDE Build Tools]] and the [[STRIDE Runner]].


==== Updated PATH ====
The build tools are invoked early on in the target software build process to generate special STRIDE artifacts that are used in subsequent build steps and later when running tests against the target. In an Off-Target Environment installation, these files are needed on the host computer since this is where we are building the target application. In a production environment, these files are needed only on the computer that performs the target software build.
You must verify that your <tt>PATH</tt> environment variable includes <tt>\stride\bin</tt>. If it does not include this path, you must add it.


The <tt>PATH</tt> is a system environment variable. For instructions on modifying it, please see [http://support.microsoft.com/kb/310519 http://support.microsoft.com/kb/310519].
The [[STRIDE Runner]] is the program you use to run tests from the host.


==== Create/Update STRIDE_DIR====
===<tt>lib</tt>===
This directory contains a set of STRIDE specific core scripting libraries along with prebuild binaries intended to be used for [[Test Modules Overview|testing in scripts]].


Verify that the  <tt>STRIDE_DIR</tt> environment variable exists and is set to the root installation directory (<tt>\stride</tt>). If this environment variable does not yet exist, you should create it as a system environment variable.
===<tt>Samples</tt>===
The Samples directory contains a number of sub-directories, each containing the source for a [[Samples|sample test]].


=== perl Script Execution Prerequisites ===
===<tt>SDK</tt>===
This directory contains the sub-directories <tt>Posix/Windows</tt> and <tt>Runtime</tt>, which contain source code that comprises the [[Runtime_Reference|STRIDE Runtime]]. These sources are built in to a static libary (e.g. STRIDE Runtime library - <tt>stride.a/lib</tt>) as a dependency of your Test Application.


If you want to be able to run script-based STRIDE tests in perl, you will need to have a recent build of perl for windows installed. As mentioned above, we recommend the ActiveState distributions for windows. The following prerequisites are also required.
The <tt>Posix</tt> and <tt>Windows</tt> directories contain the target operating system specific source and configuration. If you are interested in the details, consult the articles [[Posix SDK]] and [[Windows SDK]]. Each of them contains the following sub-directories:


==== Create/Update PERL5LIB ====
*<tt>settings</tt>
: This directory contains a set of <tt>stride.XXX.s2scompile</tt> files, where <tt>XXX</tt> coresponds to the target CPU architecture (i.e. X86, ARM...). These files, used by the [[s2scompile|STRIDE Compiler]], specify target CPU characteristics (endian-ness, data sizes and alignments). On Windows, this directory also contains a set of files for [[STRIDE_Extensions_for_Visual_Studio|use in building target apps with Visual Studio]].
*<tt>src</tt>
: This directory contains the source of the target [[Platform Abstraction Layer]] PAL. In addition there is a sample Makefile used to produce a sandbox TestApp.


You must ensure that the following two directories are part of your <tt>PERL5LIB</tt> environment variable:
== Perl Installation (Optional) ==
<u>''NOTE:''</u> ''This is '''NOT''' required if only [[Test_Units_Overview|tests in C/C++]] will be run.''


* <tt>\stride\lib\perl</tt>
If you intend to use [[Test Modules Overview|STRIDE Script modules]] for testing in script, you will need a recent version of Perl (x86 with threads support) installed.  
* <tt>\stride\lib\perl\5.X.Y</tt>  (where X matches your minor version of perl. The sub-minor version (Y) does not typically need to match, but we include to let you know which source version our files were built against. If your version of perl does not match any of the versions we provide, please consider upgrading.


If this environment variable does not yet exist, you can create it as a system or user environment variable, although we recommend the former. Unique directory paths should be separated by a semicolon when creating this environment variable.
As of this writing, we support only the 32-bit versions 5.8.9, 5.10.x, 5.12.x, 5.14.x, 5.16.x, 5.18.x and 5.20.x of Perl.  


==== Additional perl Packages ====
=== Windows ===  
It is required to use the standard 32-bit Perl distributions from [http://www.activestate.com/activeperl/downloads ActiveState].


The following additional (non-standard) perl packages are also required for full functionality of STRIDE tests in perl:
The following additional (non-standard) Perl packages are also required for full functionality of STRIDE tests in perl:


* [http://search.cpan.org/~adamk/PPI-1.210/lib/PPI.pm PPI]
* [http://search.cpan.org/perldoc/Class::ISA Class::ISA]
* [http://search.cpan.org/~shancock/Perl-Tidy-20090616/lib/Perl/Tidy.pm Perl::Tidy]
* [http://search.cpan.org/perldoc/Pod::POM Pod::POM]
* [http://search.cpan.org/perldoc/Devel::Symdump Devel::Symdump]
* [http://search.cpan.org/perldoc/Config::Tiny Config::Tiny]


If you are using an ActiveState distribution, you can easily install these packages using the [http://docs.activestate.com/activeperl/5.10/faq/ActivePerl-faq2.html ppm tool]. Simple command-line installation typically just requires typing <tt>ppm install PACKAGENAME</tt> where PACKAGENAME is the name of a package to install.
You can easily install these packages using the [http://docs.activestate.com/activeperl/5.16/faq/ActivePerl-faq2.html ppm tool]. If you access the Internet via a proxy make sure to read [http://docs.activestate.com/activeperl/5.16/faq/ActivePerl-faq2.html#ppm_and_proxies this]. Simple command-line installation of PACKAGE_NAME (the package to install) typically just requires typing:


== Directories and Files ==
ppm install PACKAGE_NAME


It's not necessary to understand the workings of the STRIDE framework to perform sandbox evaluation or training. The SDK is set up with appropriate options and settings to enable "out of the box" functionality. A quick orientation to the sandbox directories and files is shown below.
=== Linux/FreeBSD ===
We recommend you to use the standard 32-bit Perl distribution that comes with your OS version or one provided by [http://www.activestate.com/activeperl/downloads ActiveState]. In case you need to manually build from source make sure to configure "shared library" (<tt>-Duseshrplib</tt>), "thread support" (<tt>-Duseithreads</tt>) and no "64-bit support" (<tt>-Uuse64bitall</tt> and for versions 5.16 and older also <tt>-Uuse64bitint</tt>):
<pre>
./Configure -des –Duseshrplib –Duseithreads -Uuse64bitall -Uuse64bitint -Dprefix=${HOME}/perl-516-x86 -Darchname=i686-linux -Accflags="-m32 -march=i686" -Aldflags="-m32 -march=i686" -Alddlflags="-shared -m32 -march=i686"
</pre>


If you are interested in the details, consult the articles [[Linux SDK]] and [[Windows SDK]].
The following additional (non-standard) Perl packages are also required for full functionality of STRIDE tests in perl:


===<tt>bin</tt>===
* [http://search.cpan.org/perldoc/YAML::XS YAML::XS]
This directory contains the [[Build Tools|STRIDE Build Tools]] and the [[STRIDE Runner]].
* [http://search.cpan.org/perldoc/Class::ISA Class::ISA]
* [http://search.cpan.org/perldoc/Pod::POM Pod::POM]
* [http://search.cpan.org/perldoc/Devel::Symdump Devel::Symdump]
* [http://search.cpan.org/perldoc/Config::Tiny Config::Tiny]


The build tools are invoked early on in the target software build process to generate special STRIDE artifacts that are used in subsequent build steps and later when running tests against the target. In a sandbox installation, these files are needed on the host computer since this is where we are building the target application. In a production off-target environment, these files are needed only on the computer that performs the target software build.
If your perl is installed in a system directory (<tt>/usr/bin/perl</tt>, for instance), you will need root access to install shared modules. The simplest method for installing packages is via the [http://www.perl.com/doc/manual/html/lib/CPAN.html CPAN shell]. If you access the Internet via a proxy make sure to set the appropriate [http://search.cpan.org/dist/CPAN/lib/CPAN.pm#Config_Variables CPAN config variables]. To start the shell in interactive mode:


The [[STRIDE Runner]] is the program you use to run tests from the host.
sudo perl -MCPAN -eshell


===<tt>Samples</tt>===
Once in the shell, search for and install the latest stable version of PACKAGE_NAME (the package to install):
The Samples directory contains a number of sub-directories, each containing the source for a [[Test Unit Samples|sample test]].


===<tt>SDK</tt>===
install PACKAGE_NAME
This directory contains the sub-directories <tt>GRS</tt>, <tt>Runtime</tt>, and <tt>SLAP</tt>, which contain source code that comprises the STRIDE Runtime. These sources are built into the STRIDE Runtime library as a dependency of the <tt>testapp</tt> target. (See <tt>src</tt> directory below.)


In addition, there is a directory named either <tt>Linux</tt> or <tt>Windows</tt>, depending on your host operating system.
The STRIDE perl packages also need to load your system's '''libperl.so''' (shared object file) at runtime. Depending on your system, this file should be loadable from a perl CORE directory or from one of the shared system directories. If you '''DO NOT''' have this shared library on your system, you might need to install a ''libperl-dev'', ''perl-devel'' or ''perl-libs'' package in order to get it. Here is how you can do that on the console of some Linux distributions:


'''<tt>[[Windows_SDK| SDK\Windows]](</tt> or <tt>[[Linux_SDK| SDK/Linux]]</tt> )'''
* Debian / Ubuntu
sudo apt-get install libperl-dev
* Fedora / CentOS / RHEL
sudo yum -y install perl-devel


This directory (<tt>Windows</tt> or <tt>Linux</tt> contains the following directories:
=== Validation ===
Once you have installed Perl we recommend you to run the following command in a console window:


*<tt>bin</tt> ''(Windows only)''
<source lang="bash">
: Contains GNU make program files (GNU make is already present on Linux systems)
stride --diagnostics Perl --output PerlCheck
*<tt>sample_src</tt>
</source>
: This directory is originally empty. The sandbox is set up so that any files in this directory are included in the TestApp build.
*<tt>settings</tt>
: This directory contains the file <tt>stride.s2scompile</tt>. This file, used by the <tt>s2scompile</tt> program, specifies target CPU characteristics (endian-ness, data sizes and alignments). Since the SDK targets an x86 processor, its characteristics are reflected in the file. On Windows, this directory also contains two rules files for [[Using_STRIDE_Rules_for_Visual_Studio|use in building target apps with Visual Studio]].
*<tt>src</tt>
: This directory contains the Makefile used to produce the sandbox TestApp as well as the TestApp sources.
*''<tt>out</tt>''
: This directory (and several sub-directories) is created as part of the make process. All of the make targets are written to this directory and its sub-directories.


==License Activation==
If everything was properly set up you should get the following output:
The [[Stride Runner]] executable requires a valid license to run. The first time you execute stride (and any other time a valid license is not found), you will be prompted to accept the Stride Framework License Agreement. If you accept the agreement, you will then be prompted to enter a license activation code.


At this point, enter the activation code supplied by S2 Technologies to perform Internet activation and download of your license. You must be connected to the Internet for this to succeed.
<pre>
Loading database...
Executing diagnostics...
  script "diagnostics.pl"
    > 2 passed, 0 failed, 0 in progress, 0 not in use.
  ---------------------------------------------------------------------
  Summary: 2 passed, 0 failed, 0 in progress, 0 not in use.


Once you have a valid license on your computer, the Internet connection is no longer necessary (except for results upload to [[STRIDE Test Space]]).
Disconnecting from device...
Saving result file...
</pre>


<b>NOTE:</b> Be sure that the clock on your host machine is set correctly. The license server will not issue a license if your clock is set to a date earlier that the current date. (We have seen this occur when using a virtual machine as a host, since the VM's clock is not synchronized with the host machine's clock.)
In addition a report file with name <tt>PerlCheck.xml</tt> will be created in the current directory. If interested in the details you could open that report file in a browser of your choice.


<b>NOTE:</b> If you access the Internet via an HTTP proxy please follow '''[[STRIDE_Runner#Using_a_Proxy|these]]''' simple instructions to resolve any connectivity issues.


[[Category:Installation]]
[[Category:Installation]]
[[Category:The Sandbox]]

Latest revision as of 20:10, 25 June 2015

Installation Packages

Files are installed by unzipping the provided package to your PC. Packages are available targeting the following operating systems (your version number may be different than that shown):

Windows (x86)
STRIDE_framework-windows_5.x.yy.zip
Linux (x86)
STRIDE_framework-linux_5.x.yy.tgz
FreeBSD (x86)
STRIDE_framework-freebsd_5.x.yy.tgz

Please see the appropriate installation instructions below.

Windows Installation

Unpacking

The following installation example assumes the the installation package is located in your root directory and that the directory \stride exists. You can choose to install to a different location (all instructions below assume you are installing into \stride).

The example uses the open source 7-Zip utility to unzip the archive.

cd \stride
"\Program Files\7-Zip\7z" x ..\STRIDE_framework-windows_5.x.yy.zip

Once unzipped, files will have been installed under the \stride directory.

Verify Environment Variables

Updated PATH

As a final step, you will need to update your PATH environment variable to include \stride\bin. For instructions on modifying it, please see http://support.microsoft.com/kb/310519.

NOTE: Make sure to insert no spaces before and after the semicolon separators(;).

Create/Update STRIDE_DIR

Verify that the STRIDE_DIR environment variable exists and is set to the root installation directory (\stride). If this environment variable does not yet exist, you should create it as a user environment variable.

To confirm installation and display help run the following command in a console window:

stride -h

Uninstalling

To uninstall STRIDE simply:

  • Remove any reference to \stride\bin in your PATH environment variable.
  • Remove STRIDE_DIR environment variable.
  • Remove \stride directory.

Linux/FreeBSD Installation

Unpacking

The following installation example assumes the the installation package is located in your home directory and that the directory ~/stride exists. You can choose to install to a different location (all instructions below assume you are installing into ~/stride).

cd ~/stride
tar -zxvf ../STRIDE_framework-linux_5.x.yy.tgz

Once unzipped, files will have been installed under the ~/stride directory.

Verify Environment Variables

Updated PATH

As a final step, you will need to update your PATH environment variable to include ~/stride/bin.

If you use the bash shell, enter the following at a command prompt, or to automatically set at each login, add to your .bashrc:

export PATH=$PATH:~/stride/bin

For other shells, and more information, please see the following articles:

Create/Update STRIDE_DIR

Verify that the STRIDE_DIR environment variable exists and is set to the root installation directory (~/stride). If this environment variable does not yet exist, you should automatically set at each login, add to your .bashrc:

export STRIDE_DIR=~/stride

To confirm installation and display help run the following command in a console window:

stride -h

NOTE: In a 64-bit environment the above may fail with errors like: "/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory" or "ELF interpreter /libexec/ld-elf32.so.1 not found". To resolve this issue install the appropriate 32-bit compatibility libraries for your Linux/FreeBSD distribution:

  • Debian / Ubuntu
sudo dpkg --add-architecture i386
sudo apt-get install libc6:i386 libstdc++6:i386
  • Fedora / CentOS / RHEL
sudo setarch i386 yum install glibc libstdc++
  • FreeBSD

Make sure to have lib32 installed (via sysinstall(8) - Configure|Distributions|lib32) and have your kernel built with:

options 	COMPAT_FREEBSD32	# Compatible with i386 binaries

Uninstalling

To uninstall STRIDE simply:

  • Remove any reference to ~/stride/bin in your PATH environment variable.
  • Remove STRIDE_DIR environment variable.
  • Remove ~/stride directory.

Directories and Files

To integrate STRIDE in to your target build system it is required to understand the directories layout and the files inside then. A quick orientation is shown below.

NOTE: It's not necessary to understand the workings of the STRIDE framework to perform evaluation or training. The desktop package contains an STRIDE Off-Target Environment that utilizes a SDK that is set up with appropriate options and settings to enable "out of the box" functionality.

bin

This directory contains the STRIDE Build Tools and the STRIDE Runner.

The build tools are invoked early on in the target software build process to generate special STRIDE artifacts that are used in subsequent build steps and later when running tests against the target. In an Off-Target Environment installation, these files are needed on the host computer since this is where we are building the target application. In a production environment, these files are needed only on the computer that performs the target software build.

The STRIDE Runner is the program you use to run tests from the host.

lib

This directory contains a set of STRIDE specific core scripting libraries along with prebuild binaries intended to be used for testing in scripts.

Samples

The Samples directory contains a number of sub-directories, each containing the source for a sample test.

SDK

This directory contains the sub-directories Posix/Windows and Runtime, which contain source code that comprises the STRIDE Runtime. These sources are built in to a static libary (e.g. STRIDE Runtime library - stride.a/lib) as a dependency of your Test Application.

The Posix and Windows directories contain the target operating system specific source and configuration. If you are interested in the details, consult the articles Posix SDK and Windows SDK. Each of them contains the following sub-directories:

  • settings
This directory contains a set of stride.XXX.s2scompile files, where XXX coresponds to the target CPU architecture (i.e. X86, ARM...). These files, used by the STRIDE Compiler, specify target CPU characteristics (endian-ness, data sizes and alignments). On Windows, this directory also contains a set of files for use in building target apps with Visual Studio.
  • src
This directory contains the source of the target Platform Abstraction Layer PAL. In addition there is a sample Makefile used to produce a sandbox TestApp.

Perl Installation (Optional)

NOTE: This is NOT required if only tests in C/C++ will be run.

If you intend to use STRIDE Script modules for testing in script, you will need a recent version of Perl (x86 with threads support) installed.

As of this writing, we support only the 32-bit versions 5.8.9, 5.10.x, 5.12.x, 5.14.x, 5.16.x, 5.18.x and 5.20.x of Perl.

Windows

It is required to use the standard 32-bit Perl distributions from ActiveState.

The following additional (non-standard) Perl packages are also required for full functionality of STRIDE tests in perl:

You can easily install these packages using the ppm tool. If you access the Internet via a proxy make sure to read this. Simple command-line installation of PACKAGE_NAME (the package to install) typically just requires typing:

ppm install PACKAGE_NAME

Linux/FreeBSD

We recommend you to use the standard 32-bit Perl distribution that comes with your OS version or one provided by ActiveState. In case you need to manually build from source make sure to configure "shared library" (-Duseshrplib), "thread support" (-Duseithreads) and no "64-bit support" (-Uuse64bitall and for versions 5.16 and older also -Uuse64bitint):

./Configure -des –Duseshrplib –Duseithreads -Uuse64bitall -Uuse64bitint -Dprefix=${HOME}/perl-516-x86 -Darchname=i686-linux -Accflags="-m32 -march=i686" -Aldflags="-m32 -march=i686" -Alddlflags="-shared -m32 -march=i686"

The following additional (non-standard) Perl packages are also required for full functionality of STRIDE tests in perl:

If your perl is installed in a system directory (/usr/bin/perl, for instance), you will need root access to install shared modules. The simplest method for installing packages is via the CPAN shell. If you access the Internet via a proxy make sure to set the appropriate CPAN config variables. To start the shell in interactive mode:

sudo perl -MCPAN -eshell

Once in the shell, search for and install the latest stable version of PACKAGE_NAME (the package to install):

install PACKAGE_NAME

The STRIDE perl packages also need to load your system's libperl.so (shared object file) at runtime. Depending on your system, this file should be loadable from a perl CORE directory or from one of the shared system directories. If you DO NOT have this shared library on your system, you might need to install a libperl-dev, perl-devel or perl-libs package in order to get it. Here is how you can do that on the console of some Linux distributions:

  • Debian / Ubuntu
sudo apt-get install libperl-dev
  • Fedora / CentOS / RHEL
sudo yum -y install perl-devel

Validation

Once you have installed Perl we recommend you to run the following command in a console window:

stride --diagnostics Perl --output PerlCheck

If everything was properly set up you should get the following output:

Loading database...
Executing diagnostics...
  script "diagnostics.pl"
    > 2 passed, 0 failed, 0 in progress, 0 not in use.
  ---------------------------------------------------------------------
  Summary: 2 passed, 0 failed, 0 in progress, 0 not in use.

Disconnecting from device...
Saving result file...

In addition a report file with name PerlCheck.xml will be created in the current directory. If interested in the details you could open that report file in a browser of your choice.