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
- Download the iso image from Debian From Scratch.
- 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
- Turn your machine on.
- The grub menu appears on the screen.
- Choose the appropriate kernel from the list.
- Login as root.
I chose vmlinux-2.6.6-amd64-scsi-sata, because my HDD is
Serial ATA.
Partitioning
- Find the device name of the HDD.
dmesg(1)may help. # fdisk<device name>- Create linux partitions and a swap partition.
- 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
# mkfs -t xfs -f /dev/sda1# mkfs -t xfs -f /dev/sda3# mkswap -c /dev/sda2# swapon /dev/sda2
I chose xfs as the file system.
Formatting and Mounting Filesystems
# 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.
# cdebootstrap --arch amd64 sid /mnt http://debian.inode.at/pure64/# cp /etc/hostname /etc/resolv.conf /etc/network/interfaces /mnt/etc- Edit
/mnt/etc/fstab. The following is myfstab./dev/sda1 / xfs defaults 0 0 /dev/sda2 none swap sw 0 0 /dev/sda3 /home xfs defaults 0 0
# chroot /mnt# 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
# apt-get update# apt-get install module-init-tools grub# exitfrom chroot'ed environment.# cp /boot/grub/* /mnt/boot/grub# cd /mnt/root# dpkg-repack --arch amd64 kernel-image-2.6.6-amd64-scsi-sata# chroot /mnt# dpkg -i /root/kernel-image-2.6.6-amd64-scsi-sata*# grubgrub> root (hd0,0) grub> setup (hd0) grub> quit
# update-grubwhich seeks available kernels and createsmenu.lstautomatically.
Finishing the installation
# dpkg-reconfigure -plow console-data- Select the appropriate keymap from the full list.
# exitfrom chroot.- Reboot.
Finish!
Post-installation process
Kernel reconfiguration
# apt-get install kernel-source-2.6.8# apt-get install kernel-package libc6-dev g++ libqt3-dev# cd /usr/src/kernel-source-2.6.8# make-kpkg clean# make xconfig- Configure the kernel.
# make-kpkg clean# make-kpkg kernel_image# cd ..# dpkg -i kernel-image*.deb# update-grub
I forgot what packages were really necessary to reconfigure the kernel. Some more packages must be installed.
Misc. setup
/etc/hostswas 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
e1000in/etc/modules. # apt-get install localesand createdja_JP.EUC-JPlocale.# apt-get install ktermto install theterminfoentry.
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
- Prepare an RPM package for SUSE9.
- Extract the package by # alien -g (RPM filename). Let ${DIR} be the directory extracted.
- Edit ${DIR}/debian/control by hand. Specifically, modify the line: Architecture: i386 to Architecture: amd64.
- Run # debian/rules binary at ${DIR} to create the debian package.
- The debian pakcage (*.deb) is created at the parent directory of ${DIR}.
- Install the package by # dpkg -i (package name).deb.
- Finish.
Installation process for each package
Installing the license server
- # alien -g ${SUSE9}/subscription-server/pathscale-sub-server-2.5-2.429_suse9.0_psc.i386.rpm
- # cd pathscale-sub-server-2.5
- # vi debian/control
- Modify the architecture from Architecture: i386 to Architecture: amd64.
- # debian/rules binary
- # cd ..
- # dpkg -i pathscale-sub-server_2.5-3.429_amd64.deb
- 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
- # cd /opt/pathscale/bin
- 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
- Log into http://www.pathscale.com/support/.
- Download the file "binary only, non-root install, tar file, 22MB" for SuSE Enterprise Linux 9 and SuSE Linux 9.1 & 9.2.
- Extract the file in an arbitrary directory.
pathscale-compilers-suse9.0-2.1-325.3063_suse9.0_psc.tar.bz2is extracted inpathscale-eko-compilers-2.1/SuSE9/tar/. - Extract it into the installation directory. I chose
/usr/local/optas the directory. - /usr/local/opt/pathscale-compilers-suse9.0-2.1-325.3063_suse9.0_psc/ is created and all files are extracted in this directory.
- Put the license file (
pscsubscription.xml) to<installdir>/lib/2.1. - Edit
PATH,LD_LIBRARY_PATH, or/etc/ld.so.confif necessary. - Finish.
Installation of version 1.4
- Download the Source and binaries for all versions,
which is
PathScale-Compiler-Suite-1.4-54.iso. - Extract the compiler.
mount -o loop PathScale-Compiler-Suite-1.4-54.iso /mnt- cd <installdir>
I chose/usr/local/opt/pathscaleas <installdir>. tar jxvf /mnt/SuSE9/tar/pathscale-compilers-suse9.0-1.4-178.2382_suse9.0_psc.tar.bz2
- Put the license file (
pscsubscription.xml) to<installdir>/lib/1.4 - Finish.
Installation of version 1.3 for evaluation
- Download the Source and binaries for all versions,
which is
PathScale-Compiler-Suite-1.3-103.iso. - Burn it to CD-R or try
# mount -r -o loop PathScale-Compiler-Suite-1.3-103.iso /mntif your kernel supports the loopback device. - Find
PathScale-Compiler-Suite-1.3-SuSE9.tar. # cd <installdir>; tar xvf PathScale-Compiler-Suite-1.3-SuSE9.tar. I chose/usr/local/opt/pathscaleas<installdir>.- Put the license file (
pscsubscription.xml) in<installdir>/lib/1.3. # apt-get install ia32-libs ia32-libs-dev lib32gcc1 lib32stdc++6- Set
PATHto include<installdir>/bin. - Add
<installdir>/lib/1.3to/etc/ld.so.confand run# ldconfig, or setLD_LIBRARY_PATHto include the directory. - If
# file <installdir>/bin/pathccdoes not display the correct information,# ln -s /emul/ia32-linux/lib/ld-2.3.2.so /lib/ld-linux.so.2. - 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
- Download the 64bit version of PGI compiler and the related files from Softec Download Page.
- Read the instruction (INSTALL64.txt) and follow it. Briefly,
untar
linux86-64.tar.gzand type# install. - If the installer complains about missing
ld-linux.so.2, do# cd /lib; ln -s ld-2.3.2.so ld-linux.so.2. - Edit
<INSTALLDIR>/linux86-64/5.2/bin/localrcand fillGCCDIRandGCCINCif 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;
- That's all.
Small tips
sshd(8)requiresxauth(1x)for X11 forwarding, which is inxbase-clientspackage. 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_tis extended to 64bit, the year 2038 problem doesn't occur.
References
- Date Course Pentagon Royal Garden
- Debian From Scratch
- The Debian GNU/Linux AMD64 Howto [Copy]
- Debian GNU/Linux AMD64 Port @ debian.org
- Debian-Installer
- DebianWiki: debian-amd64
- PathScale
- PGI
- PGI Evaluation version download (Japanese)
- System Works
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
- 20040914: Basic installation