Last modified: [20070120] Installation of QLogic PathScale Compiler C/C++ 2.5

Hardware spec

System Works POWER MASTER Vision T8009.

  • CPU: AMD Opteron 250 2.4GHz (1MB) x 2
  • M/B: TYAN Tiger K8W
  • MEM: 1GB DDR400 SDRAM ECC (PC3200, Registered) x 2
  • VGA: AOPEN MX4000-V64 (nVIDIA GeForce 4 MX 440, AGP)

Additional proprietary software

Installation

I followed the instruction in The Debian GNU/Linux AMD64 Howto and Debian From Scratch. This document attempts to complement them. Also, DebianWiki contains other important documents.

Creating the Debian CD

  1. Download the iso image from Debian From Scratch.
  2. Burn it to CD-R.

I used dfs-0.6.13, the version of Aug 12, 2004. Notice that the Debian-Installer can be another choice. I guess this is easier to use than dfs, though I never used it.

Booting the machine

  1. Turn your machine on.
  2. The grub menu appears on the screen.
  3. Choose the appropriate kernel from the list.
  4. Login as root.

I chose vmlinux-2.6.6-amd64-scsi-sata, because my HDD is Serial ATA.

Partitioning

  1. Find the device name of the HDD. dmesg(1) may help.
  2. # fdisk <device name>
  3. Create linux partitions and a swap partition.
  4. Set the labels of partitions appropriately.

The device name of my HDD was /dev/sda. So I typed # fdisk /dev/sda and made partitions as follows.

/dev/sda1 40GB  /
/dev/sda2 16GB  swap
/dev/sda3 100GB /home

Initialize and mount swap

  1. # mkfs -t xfs -f /dev/sda1
  2. # mkfs -t xfs -f /dev/sda3
  3. # mkswap -c /dev/sda2
  4. # swapon /dev/sda2

I chose xfs as the file system.

Formatting and Mounting Filesystems

  1. # mount /dev/sda1 /mnt

Installing Base System

Before starting the installation, make sure that the network is working. If your provider supports DHCP try # ifup eth0.

  1. # cdebootstrap --arch amd64 sid /mnt http://debian.inode.at/pure64/
  2. # cp /etc/hostname /etc/resolv.conf /etc/network/interfaces /mnt/etc
  3. Edit /mnt/etc/fstab. The following is my fstab.
    /dev/sda1    /        xfs    defaults    0    0
    /dev/sda2    none     swap   sw          0    0
    /dev/sda3    /home    xfs    defaults    0    0
    
  4. # chroot /mnt
  5. # base-config

The sources.list

During the installation process, sources.list for apt must be set. I chose

deb http://debian.inode.at/pure64/ sid main
deb-src http://debian.inode.at/pure64/ sid main

because the primary server (alioth) was too busy.

Configuring Base System

  1. # apt-get update
  2. # apt-get install module-init-tools grub
  3. # exit from chroot'ed environment.
  4. # cp /boot/grub/* /mnt/boot/grub
  5. # cd /mnt/root
  6. # dpkg-repack --arch amd64 kernel-image-2.6.6-amd64-scsi-sata
  7. # chroot /mnt
  8. # dpkg -i /root/kernel-image-2.6.6-amd64-scsi-sata*
  9. # grub
    grub> root (hd0,0)
    grub> setup (hd0)
    grub> quit
    
  10. # update-grub which seeks available kernels and creates menu.lst automatically.

Finishing the installation

  1. # dpkg-reconfigure -plow console-data
  2. Select the appropriate keymap from the full list.
  3. # exit from chroot.
  4. Reboot.

Finish!

Post-installation process

Kernel reconfiguration

  1. # apt-get install kernel-source-2.6.8
  2. # apt-get install kernel-package libc6-dev g++ libqt3-dev
  3. # cd /usr/src/kernel-source-2.6.8
  4. # make-kpkg clean
  5. # make xconfig
  6. Configure the kernel.
  7. # make-kpkg clean
  8. # make-kpkg kernel_image
  9. # cd ..
  10. # dpkg -i kernel-image*.deb
  11. # update-grub

I forgot what packages were really necessary to reconfigure the kernel. Some more packages must be installed.

Misc. setup

  • /etc/hosts was missing. I made it as follows.
    127.0.0.1    datecourse    localhost
    
  • The ethernet driver was not loaded automatically at the boot time. I added e1000 in /etc/modules.
  • # apt-get install locales and created ja_JP.EUC-JP locale.
  • # apt-get install kterm to install the terminfo entry.

Creating user

  • # useradd -u <uid> -G users -d /home/tyam -s /bin/zsh -c "YAMAZAKI Tadashi" tyam
  • # passwd tyam
  • # mkdir /home/tyam
  • # chown tyam:users /home/tyam

Installation of Proprietary softwares

Installation of QLogic PathScale Compiler C/C++ 2.5 [20070120]

I created debian packages from the RPM packages for SuSE9 and installed them [20070120].

Prerequisite conditions

  • Packages are installed in /opt/pathscale.
  • Install ia32 libraries in advance.
    # apt-get install ia32-libs ia32-libs-dev lib32gcc1 lib32stdc++6
  • Dependencies between packages are not resolved.

Installation process in general

  1. Prepare an RPM package for SUSE9.
  2. Extract the package by # alien -g (RPM filename). Let ${DIR} be the directory extracted.
  3. Edit ${DIR}/debian/control by hand. Specifically, modify the line: Architecture: i386 to Architecture: amd64.
  4. Run # debian/rules binary at ${DIR} to create the debian package.
  5. The debian pakcage (*.deb) is created at the parent directory of ${DIR}.
  6. Install the package by # dpkg -i (package name).deb.
  7. Finish.

Installation process for each package

Installing the license server
  1. # alien -g ${SUSE9}/subscription-server/pathscale-sub-server-2.5-2.429_suse9.0_psc.i386.rpm
  2. # cd pathscale-sub-server-2.5
  3. # vi debian/control
  4. Modify the architecture from Architecture: i386 to Architecture: amd64.
  5. # debian/rules binary
  6. # cd ..
  7. # dpkg -i pathscale-sub-server_2.5-3.429_amd64.deb
  8. Finish.
Installing the compiler

Convert and install all *.rpm files in ${SUSE9}/rpms in the same way for the license server. You would be bored, if you did it manually (hint: there are 12 RPM files). I myself used the following shell script to convert the packages automatically.

bash or zsh:
for i in ${SUSE9}/rpms/*.rpm; do
  alien -g $i
  j=`basename $i`
  k=`echo $j|sed 's/\(.*\)-\(.*\)-\(.*\)-\(.*\)/\1-\2-\3/'`
  cd $k
  cp debian/control debian/control.orig
  cat debian/control.orig | sed 's/Architecture: i386/Architecture: amd64/' > debian/control
  debian/rules binary
  cd ..
  rm -rf $k $k.orig
done

After the conversion, install all packages except pathscale-pathdb_2.5-2.879_amd64.deb using dpkg -i.

There are two packages for pathdb:

  • pathscale-pathdb-2.5-1.879_suse9.0_psc.i386.rpm for ia32,
  • pathscale-pathdb-2.5-2.879_suse9.0_psc.x86_64.rpm for x86_64.

The deb packages for them are respectively:

  • pathscale-pathdb-2.5-2.879_amd64.rpm
  • pathscale-pathdb-2.5-3.879_amd64.rpm

Only x86_64 version seems to be necessary.

Post-installation process

Installing the license file

Put the license file (pscsubscription-*.xml) sent from PathScale onto /opt/pathscale/lib/2.5.

Creating the init script for the license server.

The installed /etc/init.d/pathscale-sub by package doesn't work for debian but for SuSE. I made the debian version from /etc/init.d/skeleton for me.

Mine.

Run # update-rc.d pathscale-sub defaults to create symbolic links for each /etc/rc?.d directory.

Creating the symbolic link to pathdb
  1. # cd /opt/pathscale/bin
  2. ln -s pathdb-x86_64-2.5 pathdb

Test!

Run # /etc/init.d/pathscale-sub start and invoke the license server. Test to compile.

That's all. Thank you.

Notes

1.

You will get an error if you convert an RPM package using alien directory instead of alien -g and debian/rules binary The error message follows:

# alien ${SUSE9}/subscription-server/pathscale-sub-server-2.5-2.429_suse9.0_psc.i386.rpm 
Package build failed. Here's the log:
dh_testdir
dh_testdir
dh_testroot
dh_clean -k -d
dh_installdirs
dh_installdocs
dh_installchangelogs
find . -maxdepth 1 -mindepth 1 -not -name debian -print0 | \
        xargs -0 -r -i cp -a {} debian/pathscale-sub-server
dh_compress
dh_makeshlibs
dh_installdeb
dh_shlibdeps
dpkg-shlibdeps: warning: unable to find dependency information for shared library libstdc++ (soname 5, path /emul/ia32-linux/usr/lib/libstdc++.so.5, dependency field Depends)
dpkg-shlibdeps: warning: unable to find dependency information for shared library libgcc_s (soname 1, path /emul/ia32-linux/usr/lib/libgcc_s.so.1, dependency field Depends)
dh_gencontrol
dpkg-gencontrol: error: current build architecture amd64 does not appear in package's list (i386)
dh_gencontrol: command returned error code 65280
make: *** [binary-arch] Error 1
find: pathscale-sub-server-2.5: no such file or directory

So, you have to modify the Architecture section.

2.

The tar.bz2 file contains more files than RPM packages.

# diff -r /opt/pathscale /usr/local/opt/pathscale-from-tarbz2
Only in /usr/local/opt/pathscale: .rpm_sources
Only in /usr/local/opt/pathscale/bin: pathdb-i386-2.5
Only in /usr/local/opt/pathscale/bin: reproduce
Only in /usr/local/opt/pathscale/include/2.5: dwarf.h
Only in /usr/local/opt/pathscale/include/2.5: libdwarf.h
Only in /usr/local/opt/pathscale/include/2.5: libelf
Only in /usr/local/opt/pathscale/lib/2.5/32: dwarfdump
Only in /usr/local/opt/pathscale/lib/2.5/32: libdwarf.a
Only in /usr/local/opt/pathscale/lib/2.5/32: libelf.a
Only in /usr/local/opt/pathscale/lib/2.5: dwarfdump
Only in /usr/local/opt/pathscale/lib/2.5: libdwarf.a
Only in /usr/local/opt/pathscale/lib/2.5: libelf.a
Only in /usr/local/opt/pathscale/man/man1: dwarfdump.1.gz

Are they necessary or not?

PathScale C/C++ compiler

Installation of version 2.1

  1. Log into http://www.pathscale.com/support/.
  2. Download the file "binary only, non-root install, tar file, 22MB" for SuSE Enterprise Linux 9 and SuSE Linux 9.1 & 9.2.
  3. Extract the file in an arbitrary directory. pathscale-compilers-suse9.0-2.1-325.3063_suse9.0_psc.tar.bz2 is extracted in pathscale-eko-compilers-2.1/SuSE9/tar/.
  4. Extract it into the installation directory. I chose /usr/local/opt as the directory.
  5. /usr/local/opt/pathscale-compilers-suse9.0-2.1-325.3063_suse9.0_psc/ is created and all files are extracted in this directory.
  6. Put the license file (pscsubscription.xml) to <installdir>/lib/2.1.
  7. Edit PATH, LD_LIBRARY_PATH, or /etc/ld.so.conf if necessary.
  8. Finish.

Installation of version 1.4

  1. Download the Source and binaries for all versions, which is PathScale-Compiler-Suite-1.4-54.iso.
  2. Extract the compiler.
    1. mount -o loop PathScale-Compiler-Suite-1.4-54.iso /mnt
    2. cd <installdir>
      I chose /usr/local/opt/pathscale as <installdir>.
    3. tar jxvf /mnt/SuSE9/tar/pathscale-compilers-suse9.0-1.4-178.2382_suse9.0_psc.tar.bz2
  3. Put the license file (pscsubscription.xml) to <installdir>/lib/1.4
  4. Finish.

Installation of version 1.3 for evaluation

  1. Download the Source and binaries for all versions, which is PathScale-Compiler-Suite-1.3-103.iso.
  2. Burn it to CD-R or try # mount -r -o loop PathScale-Compiler-Suite-1.3-103.iso /mnt if your kernel supports the loopback device.
  3. Find PathScale-Compiler-Suite-1.3-SuSE9.tar.
  4. # cd <installdir>; tar xvf PathScale-Compiler-Suite-1.3-SuSE9.tar. I chose /usr/local/opt/pathscale as <installdir>.
  5. Put the license file (pscsubscription.xml) in <installdir>/lib/1.3.
  6. # apt-get install ia32-libs ia32-libs-dev lib32gcc1 lib32stdc++6
  7. Set PATH to include <installdir>/bin.
  8. Add <installdir>/lib/1.3 to /etc/ld.so.conf and run # ldconfig, or set LD_LIBRARY_PATH to include the directory.
  9. If # file <installdir>/bin/pathcc does not display the correct information, # ln -s /emul/ia32-linux/lib/ld-2.3.2.so /lib/ld-linux.so.2.
  10. That's all.

You have to send an email twice to the support team: one for getting the username and password to access the private support website, and the other for getting the license file (pscsubscription.xml). They send back emails showing the above information, and their responses are not immediate, rather they take almost one day.

PGI compiler 5.2

  1. Download the 64bit version of PGI compiler and the related files from Softec Download Page.
  2. Read the instruction (INSTALL64.txt) and follow it. Briefly, untar linux86-64.tar.gz and type # install.
  3. If the installer complains about missing ld-linux.so.2, do # cd /lib; ln -s ld-2.3.2.so ld-linux.so.2.
  4. Edit <INSTALLDIR>/linux86-64/5.2/bin/localrc and fill GCCDIR and GCCINC if they are blank. I did as follows.
    set GCCDIR=/usr/lib/gcc-lib/x86_64-linux/3.3.4;
    set GCCINC=/usr/lib/gcc-lib/x86_64-linux/3.3.4/include;
    
  5. That's all.

Small tips

  • sshd(8) requires xauth(1x) for X11 forwarding, which is in xbase-clients package. See /usr/share/doc/ssh/README.Debian.
  • PGI compiler does not understand '//' style comments in C programs.
  • # cdrecord dev=/dev/hdc <isoimage> works. The hardware is Pioneer DVR-A07-J.
  • apt-listbugs(1) lists critical bugs before each apt upgrade/installation. It is very useful because AMD64 port is tagged as unstable.

Some goodies

  • Since time_t is extended to 64bit, the year 2038 problem doesn't occur.

References

Other documents

About

Author
YAMAZAKI Tadashi <tyam@brain.riken.jp>
Date
20070120
Changelog
20040818: Initial version
20040914: Basic installation
20040915: Added PGI installation
20040917: Added PathScale-1.3 evaluation installation
20041014: Added PathScale-1.4 installation
20050517: Added PathScale-2.1 installation
20070120: Installation of QLogic PathScale Compiler C/C++ 2.5