SoftwareSetup

From EECS568
Jump to: navigation, search

This page describes software setup steps for getting your computer ready to run the april libraries. The recommended method for Mac and PC users is to use VirtualBox to run Ubuntu. For linux users, VirtualBox does not adequately support native 3D acceleration. If you run linux, you can use virtual box without 3D acceleration enabled, or you may choose instead to get the the libraries to work on your distribution. Instructions for ubuntu are below.

There are two options for getting a virtual box image. You can either (A) download a pre-configured virtual box or (B) configure one yourself:

Option A: Download a pre-configured Virtual Box image

Note: So far, we are only providing a preconfigured 64bit machine, which requires intel VT-x or AMD-v technology. Check your BIOS under either the CPU or Security menus to check if your machine supports these. Intel CPUs Core2 Duo and later have this support. If not, you should configure your own 32-bit machine as described below.


1. Visit http://www.virtualbox.org/ and download the appropriate virtual machine, and run the installer.

2. Download and extract the pre-configured machine. The file is over 1GB, and once extracted will be over 3GB: http://umbrella.eecs.umich.edu/eecs568/f12/568-64bit.tar.gz

3. Open VirtualBox, and choose "Add" from the "Machine" menu. Navigate to the 568-64bit folder, and choose the 568-64bit.vbox file

4. Run the new virtual machine. Login username and password are the same, all lowercase, 'eecs568'. Test that your machine is working correctly by running the following command in a terminal

java april.vis.VisTest

Make sure you can can close this demo without crashing your VM.

Option B: Download and configure Ubuntu using Virtual Box yourself

Note: These instructions are from the F11 semester and are intended for Ubuntu 11.04. No guarantees are made for Ubuntu 12.04

1. Visit http://www.virtualbox.org/ and download the appropriate virtual machine, and run the installer.

2. Choose which OS you want to install: either Ubuntu Desktop 11.04 32bit or 64bit. For dual booting, 64 bit is recommended, while bios options such as VT-x (intel) or AMD-v (amd) must be enabled to allow virtualization of a 64bit operating system. You can download these iso files from http://www.ubuntu.com/download/ubuntu/download. Click through to the 'alternate' methods to find a torrent link if you are in a hurry.

3. Use virtual box to create a new Linux/Ubuntu virtual machine. Make sure you specify if you are using a 64bit distribution. If your host OS is either Windows or Mac OS, before you run the VM for the first time, select "Settings" for your VM, go to the "Display" tab and enable 3D acceleration (don't enable 2D acceleration). Also, allocate at least 32MB of video ram using the slide on the same page. Next, run the VM you just created, and load the installer iso (from where you downloaded it to in the last step) when the first run wizard runs, and follow the instructions to install.

4. After the install is complete, when you log in the first time, make sure to select "Ubuntu Classic (no effects)" as your login mode. (After you select your username, but before you authenticate).

5. Once you're logged in, select 'Install guest additions' from the Devices menu. Enter your password, and when prompted, press enter to close the window. Then reboot your VM.

Note: If your host os is Linux, checking the Enable 3D Acceleration in the VM preferences will currently cause your entire VM to crash whenever a vis application is closed.


6. After installing the guest additions, install the following packages

sudo apt-get install git-core ant openjdk-6-jdk mesa-common-dev

Your OS is now configured to be able to download and compile the course libraries

Download and configure the course libraries

If you chose option B, we are assuming that you have set up an Ubuntu virtual machine or have Ubuntu running natively on your computer already. If you have done either, you must do the following to setup the course libraries:

Download: Download the starting source code from the problem set page and move it to the directory you create below. For now, we will assume that you are working on PS1.

cd ~
mkdir -p eecs568/ps1
mv <path/to/tarfile>/ps1_f12.tar.gz ~/eecs568/ps1/
cd ~/eecs568/ps1
tar -xvf ps1_f12.tar.gz

You should now have a folder called april in your ps1 directory.

Update your CLASSPATH

Use nano or emacs or some editor to open your .bashrc file, and append the following lines:

export CLASSPATH=$HOME/eecs568/ps1/april/java/april.jar:$HOME/eecs568/ps1/april/java/lcm.jar:./
export LD_LIBRARY_PATH=$HOME/eecs568/ps1/april/lib
alias java='java -ea -server'

After updating your bashrc, you either need to close your open terminals and re open them, or type the following command in each open terminal.

source ~/.bashrc

Compile:

cd ~/eecs568/ps1/april/java
ant

Note If you are running in virtualization, you may receive errors about -lGL not found. To remedy this, you can modify the april/java/jni/jgl/Makefile: to replace lines 10 and 15 (or similar ones, as the makefile has been updated) with the following:

	ld --shared $(LIBJGL_OBJS) -o libjgl.so -L./ -lX11 -lGL

and

	$(GCC) -o $@ $(GLTEST_OBJS) -L./ -lX11 -lGL

After modifying the Makefile, you will also need make a symbolic link to libGL.so

cd ~/eecs568/java/jni
ln -s /usr/lib/mesa/libGL.so.1 libGL.so


Test your installation You should be able to tab complete the following command:

java april.vis.VisTest