IDL 6.0 SE (Linux version) on FreeBSD mini-HOWTO


Installing IDL 6.0 SE (Linux version) on FreeBSD 4.9



Update [July 19, 2005]: chaos was upgraded to 5.4-STABLE. The only difference with the procedure below is when mounting the cd, use /dev/acd0 instead of /dev/acd0a.

At the time of this writing (Feb. 25, 2005), RSI did not support IDL on FreeBSD, however the Linux version
can be installed and executed with minor changes to the installation scripts once the
CD contents have been copied to a temporary directory for installation.
It is assumed that the system upon which you will be installing the software already has
the kernel module for linux compatibility enabled.

Below are the installation instructions:


Mount the IDL CD to an existing directory:
[root@chaos:/]# mount_cd9660 /dev/acd0a /cdrom
[root@chaos:/]# df -k
Filesystem  1K-blocks    Used   Avail Capacity  Mounted on
/dev/ad0s1a   1007950   48440  878874     5%    /
/dev/ad0s1h   5517918  973354 4103132    19%    /home
/dev/ad0s1f   5040174 3407342 1229620    73%    /usr
/dev/ad0s1g   5040174  570942 4066020    12%    /usr/local
/dev/ad0s1e   2015918   31258 1823388     2%    /var
procfs              4       4       0   100%    /proc
/dev/acd0a     244864  244864       0   100%    /cdrom
[root@chaos:/]# cd /cdrom
[root@chaos:/cdrom]# ls  
adobe           apache          info            install         xinstall.sh
                                                                           
Create a temporary directory in /tmp and copy the contents of the CD to this directory so that the xinstall.sh script can be modified to run on FreeBSD:
[root@chaos:/tmp]# mkdir cdrom
[root@chaos:/tmp]# cd cdrom   
[root@chaos:/tmp/cdrom]# cp -r /cdrom/* .
[root@chaos:/tmp/cdrom]# vi xinstall.sh  
Modify xinstall.sh by removing '/usr/ucb' from PATH environmental variable and adding 'usr/bin'. Add another option within case/esac block for FreeBSD.
Below is a diff:
[teresa@chaos:/tmp/cdrom]$ diff xinstall.sh xinstall.sh.orig
12c12                                                       
< PATH="$PATH:/usr/bin"                                     
---                    
> PATH="$PATH:/usr/ucb"
199,206d198            
<      "FreeBSD")      
<         if [ "$UPPER_CASE" = 1 ]; then
<            OS_INSTALL_TFILE=XI_LIN86.TZ
<         else                           
<            OS_INSTALL_TFILE=xi_lin86.tz
<         fi                             
<         ;;                             
<           
304,305d295 
<          
<     "FreeBSD") OS="freebsd";;
Once the above changes are made, create a symbolic link called xinstall.freebsd that points to the file xinstall.linux.x86:
                     
teresa@chaos:/tmp/cdrom/install/xinstall]$ ls -al x*
lrwxr-xr-x  1 root  wheel       18 Feb 25 21:40 xinstall.freebsd -> xinstall.linux.x86                                              
-r-xr-xr-x  1 root  wheel  1214624 Feb 25 21:23 xinstall.linux.x86
Next, execute /tmp/cdrom/xinstall.sh and the license agreement screen will appear along with the graphic IDL installation screen which will guide you through the rest of the installation.

Once installation is complete, you should find IDL version 6.0 has been installed within /usr/local/rsi/idl_6.0se. Modify your shell startup file to reference idl_setup.bash:
                                                    
. /usr/local/rsi/idl_6.0se/bin/idl_setup.bash
This will load several IDL-specific environment variables:
                                    
IDL_STARTUP=/home/teresa/.idlinit                              
IDL_DIR=/usr/local/rsi/idl_6.0se 
IDL_PATH=/usr/local/rsi/idl      
Last, but not least, edit the /usr/local/rsi/idl/bin/idl script by adding another case/esac block option for FreeBSD. The contents for the Linux option were just copied over. Below is a diff:
            
                                       
[teresa@chaos:/usr/local/rsi/idl/bin]$ diff idl idl.orig
221,236d220                                             
<                                                       
<     "FreeBSD")
<       OS="linux"
<         ARCH=".x86"
<         if [ -x /bin/arch ]; then
<           if [ `/bin/arch` = alpha ]; then
<             ARCH=.alpha                   
<             if [ "$APPLICATION" = "rsilicense" ]; then
<              echo "$APPLICATION: is not supported on this system architecture. Please contact RSI Technical Support for a license."
<                exit 1                              
<             elif [ \( "$APPLICATION" = "idlde" \) -o \( "$APPLICATION" = "idl"\) -o \( "$APPLICATION" = "idldeclient" \) -o \( "$APPLICATION" = "idlrpc" \) ]; then
<                APP_ARGS=-genver
<             fi                 
<           fi                   
<         fi    
<       ;;    
And you're done!!
[teresa@chaos:~]$ idl      
IDL Student Edition 6.0.3 (linux x86 m32). (c) 2004, Research Systems, Inc.
Installation number: 001.                                                  
Licensed for use by: IDL Student Version                                   
                                        
IDL> restore,'Kdwarves1.dat'            
IDL> help                   
% At $MAIN$                 
CATCUT          STRUCT    = ->  Array[301]
PATH            STRING    = '/home/teresa/idl_6.0/lib/:/usr/local/rsi/idl'
Compiled Procedures:                                                      
    $MAIN$                                                               

Compiled Functions:
                   
IDL> help,/st,catcut
** Structure <82d9db4>, 8 tags, length=48, data length=46, refs=1:
   TYCHO           STRING    '0'                                  
   HD              LONG            224690
   RA              FLOAT        0.00426461
   DEC             FLOAT          -19.4988
   VMAG            FLOAT           9.27000
   EPOCH           INT           2000     
   FE_EST          FLOAT         0.0851187
   COMMENTS        STRING    'K3V'