ROSE  0.9.9.123
Installing EDG

ROSE uses the Edison Design Group's software for parsing C/C++.

This is a proprietary parser, although EDG does provide source code licenses. ROSE can use either the EDG source code, or precompiled EDG binaries that the ROSE team makes available. The precompiled EDG libraries depend on the ROSE version and your compiler, and ROSE's build system calculates the name of the EDG tarball and downloads it automatically when necessary.

Automatically calculating the EDG binary name and downloading it has two main modes of failure: either the system where you're running "make" lacks an Internet connection, or your system calculated that it needs a version of EDG which is not available for download. These failure modes can occur both at once also.

Installing EDG binaries without an Internet connection

Use these instructions to install an EDG binary when your machine doing the ROSE compile has no Internet connection.

Step 1: Configure ROSE as if you have a network connection, but stop after the "configure" or "cmake" step.

Step 2: Change into the "src/frontend/CxxFrontend" directory of your build tree (not source tree) and run "make show-edg-url". This will compile a few files and eventually spit out a URL. It also sets up some other files that might be needed later.

Step 3: Download the URL on a machine that has a network connection and copy it to the "src/frontend/CxxFrontend" directory on the machine that has no network connection.

Step 4: Continue by following ROSE's main installation instructions after the "configure" or "cmake" step (i.e., you're likely at the step to run "make" in the top of the build tree).

Manually overriding the EDG version

The EDG binary file name is calculated by hashing those parts of ROSE on which the binary depends, including some header files that are generated when ROSE is built on your system. Since the EDG binary also depends on your compiler vendor and version number, the ROSE team may not have generated a compatible binary. If this happens and the ROSE team instructs you to use a different URL, follow these steps:

Step 1: Change to the "src/frontend/CxxFrontend" directory of your build tree (not source tree).

Step 2: Run "make show-edg-url". This sets up some files that will be needed later.

Step 3: Use wget or a web browser to download from the URL you were given. Save this file in the "src/frontend/CxxFrontend" directory of your build tree (not source tree) and leave it in compressed tar form.

Step 4: Create a symbolic link from your downloaded file to "EDG.tar.gz" in the same directory (ln -sf file_you_downloaded.tar.gz EDG.tar.gz) and make sure the date is current (touch EDG.tar.gz).

Step 5: Untar the EDG binary (tar xf EDG.tar.gz) which will create a directory whose name starts with "roseBinaryEDG-".

Step 6: Replace the (probably empty) "EDG" directory with the new "roseBinaryEDG-*" directory from the tarball (rm -rf EDG; mv the-roseBinaryEDG-big-long-directory-name EDG).

Step 7: Make sure that ls EDG shows a file named "libroseEDG.la", then run touch EDG/libroseEDG.la so that it has the current date.

Step 8: The "touch" commands should have arranged things correctly. To test it, run make; echo $? in this src/frontend/CxxFrontend build directory and verify that the last line shows "0".

Step 9: Continue by following ROSE's main installation instructions after the "configure" or "cmake" step (i.e., you're likely at the step to run "make" in the top of the build tree).

Collaboration diagram for Installing EDG: