Jump to content

ROSE Compiler Framework/Virtual Machine Image V1

From Wikibooks, open books for an open world

This page is obsolete. We have a newer VM described at ROSE Compiler Framework/Virtual Machine Image

How to use the virtual machine image

[edit | edit source]

Obtain the Virtual Machine Image

[edit | edit source]

Download the virtual machine image created by using VMware Player:

Warning: LLNL users may not be able to download it due to limitations to max downloaded file size within LLNL. It may also be against LLNL's security policy to run a virtual machine without authorization. So this image should not be used inside LLNL.

Content of the VM Image

[edit | edit source]

Copy&paste from README within the virtual machine

This is a virtual machine image for the ROSE source-to-source compiler framework.

sourcetree, cloned from github.com/rose-compiler/rose on July 21, 2012

  • /home/demo/rose

buildtree

  • /home/demo/buildrose

installation tree (--prefix path)

  • /home/demo/opt/rose-inst

A script to set environment variables to use the installed ROSE tools

  • /home/demo/set.rose.env

A test translator: with example Makefile

  • /home/demo/myTranslator

Some dot graphs of a simplest function. Type "run.sh file.dot" will view a dot file

  • /home/demo/dotGraphs

Install VMware Player

[edit | edit source]

You have to install VMware Player to your machine to use the virtual machine image.

Goto http://www.vmware.com/go/downloadplayer/

Select the right bundle for your platform. For example: VMware-Player-4.0.4-744019.i386.txt

After downloading (assuming you are using Ubuntu 10.04)

  • chmod a+x VMware-Player-4.0.4-744019.i386.txt
  • sudo ./VMware-Player-4.0.4-744019.i386.txt
  • follow the GUI to finish the installation

To start VMPlayer, goto Menu->Applications-> System Tools -> VMware Player

Open/Play the virtual machine

[edit | edit source]

After downloading and untar the tar.gz package to a directory, use VMware player to open the configuration file of the directory.

How was the virtual machine made

[edit | edit source]

Host Machine

[edit | edit source]

We used Ubuntu 10.04 LTS as a host machine to create the virtual machine image.

uname -a
Linux 8core-ubuntu 2.6.32-41-generic-pae #91-Ubuntu SMP Wed Jun 13 12:00:09 UTC 2012 i686 GNU/Linux

cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04.4 LTS"

Configurations

[edit | edit source]

VMware player has been installed onto the host machine, as described above.

Basic configuration for the virtual machine

Hardware

  • Memory : 2 GB
  • Processors: 2
  • Hard Disk size: 15 GB: We would like to keep it small while having enough space for users.
    • 5GB is used for Ubuntu system files and
    • 10GB for the demonstration user's home directory
  • Network Adapter: NAT: share the host's IP address

OS

  • OS: Ubuntu 10.04 LTS
  • Demonstration user account (sudo user in Ubuntu):
    • account: demo
    • password: password
  • screen size: 1280x960 (4:3)

Download Ubuntu 10.04 LTS http://releases.ubuntu.com/lucid/ We currently use the i386 desktop ISO as the start point

Within the virtual machine

[edit | edit source]

We installed Software Prerequisites

  • sudo apt-get install gcc g++ gfortran
  • sudo apt-get install autoconf automake libtool
  • sudo apt-get install git bison flex texlive-full graphviz python-all-dev

We then installed ROSE

How to create a new virtual image

[edit | edit source]

Here are some general guidelines for creating a new virtual machine. Following these exact steps are not required, although they are recommended to ensure a consistent user experience with the ROSE VM's.

Please make sure you document the whole process in its entirety.

These steps must be performed within the VM (guest OS):

1. Install the prerequisite software using the platform's software package manager. Only as a last resort should you manually install software. Use the platform's default software versions if possible. (Use bash as the default login shell.)

2. Setup the ROSE workspace

  $ export ROSE_HOME=${HOME}/development/projects/rose
  $ export ROSE_SOURCE=${HOME}/development/projects/rose/src
  $ export ROSE_INSTALL=${HOME}/development/opt/rose

  $ mkdir -p "$ROSE_HOME"
  $ mkdir -p "$ROSE_INSTALL"

3. Clone the ROSE repository as src

  $ cd "$ROSE_HOME"
  $ git clone https://github.com/rose-compiler/rose "$ROSE_SOURCE"

4. Configure, build, and install ROSE

  $ cd "$ROSE_SOURCE"

  # Run ROSE's Autotools bootstrap script
  $ "${ROSE_SOURCE}/build"

  # Configure ROSE using the minimal useful configuration
  $ "${ROSE_SOURCE}/configure" --prefix="${ROSE_INSTALL}" --with-boost=</local/opt>

  $ make
  $ make install

5. Verify ROSE installation works

6. Create simple demo translator(s) in $ROSE_HOME/demo