Sun Java Solaris Communities My SDN Account Join SDN
 
Solaris

Tru_to_Solaris Migration Tool for C/C++ Source Code

 

March 2004

Contents

Overview

The Tru_to_Solaris Migration tool for C/C++ Source Code application is based on Java technology and is used to identify porting issues in C/C++ source code files. This utility analyzes the difficulty of porting such source files from Tru64 or HP-UX to the Solaris Operating System (OS), and it can help you estimate the total effort required for the port.

The Tru_to_Solaris Migration tool identifies potential problems during the porting effort by providing:

  • Names of potential porting issues
  • Sources, with potential porting issues
  • Solutions for resolving select porting issues

Using Tru_to_Solaris Migration tool can save significant time and effort for developers working with large projects.

How Tru_to_Solaris Migration Tool Works

Tru_to_Solaris Migration tool is an application based on Java technology that can identify porting issues for C/C++ source code. This utility can help you analyze the efforts that may be needed to port C/C++ source code from Tru64 or HP-UX to the Solaris OS.

Installing Tru_to_Solaris Migration Tool

You can download this tool from the Sun Download Center.

Follow these instructions to install the Tru_to_Solaris Migration tool. You need to log in as root or have root permissions for the login you are using.

  • Unzip and untar the SUNWtru2solaris.tar.gz file.
  • Run the pkgadd command to install Tru_to_Solaris Analyzer.
  • Then set the following environment variables as shown here:
    	-Solaris SPARC/X86
    	export PATH=$PATH:/opt/SUNWtru2solaris/bin
    	export MANPATH=/usr/local/man:/usr/share/man/:/opt/SUNWtru2Solaris/man
    
  • To use the Tru_to_Solaris tool, you need to have installed the Java Virtual Machine (JVM) 1.2 and above (1.4.2 is recommended). You can obtain the Java platform on the Java Technology Downloads home page.
  • Set the DISPLAY variable (if necessary) before running the Tru2Solaris GUI.

Invoking Tru_to_Solaris Migration Tool

After installing the Tru_to_Solaris Migration tool, you must perform the following steps:

  • Update your PATH variable.
  • Update your CLASSPATH variable.

On Solaris systems, the Tru2Solaris script sets up JScore_HOME and CLASSPATH automatically. You need to have installed the JVM version 1.2.1 or higher.

By default the THREADS_FLAG is set to "native" for performance reasons. If you encounter issues with your JVM supporting native threads, then change the THREADS_FLAG to "green" in the respective script files.

Note: You must have a JVM, version 1.2.1 or higher, installed on your system for the GUI version to run. However, we strongly recommend using the JVM 1.4.0 or later to get better performance results from the tool.

Running the tool without arguments will invoke the graphical user interface mode:

    Tru2Solaris

Options

Running the Tru_to_Solaris Migration Tool for C/C++ Source Code with invalid arguments will provide the following online help for the command-line mode:

    Tru2Solaris foo
    Usage: Tru2Solaris [-nonoise] [-nodb] [-revdb] [-flist ] 
    filespec or file1 file2
    
    -nodb (Just show all functions without checking for issues)
    -revdb (Show all functions that are NOT in the database)
    -nonoise (Don't display all that helpful database text stuff; this 
    option is for advanced users)
    -flist (Specify a file containing a list of source files to score
    -maxthreads <NUM> (Maximum # of threads for Tru2Solaris to spawn: default 
      10)
    -debug (Show in-depth processing -- needed if reporting a problem) 

Additional Features

  1. Positive database (-revdb)

    The existing databases are "negative" currently, in that they contain a list of issues that, if found in the source, are reported. An issue of positive items can also be created to report issues that are not in the database by using the -revdb flag.
        Tru2Solaris -revdb myfile.c
    
    The preceding would then report all issues that are not in the database.

  2. No database (-nodb)

    When you just want to report all functions in a particular body of source, you can use the -nodb option.
Rate and Review
Tell us what you think of the content of this page.
Excellent   Good   Fair   Poor  
Comments:
Your email address (no reply is possible without an address):
Sun Privacy Policy

Note: We are not able to respond to all submitted comments.