[Llvm-bgq-discuss] bgclang (relocatable) RPMs

Hal Finkel hfinkel at anl.gov
Thu Sep 5 20:08:19 CDT 2013


Hello everyone,

This mainly affects those maintaining their own installs...

In order to make install process easier, I've converted the various build scripts and patches into relocatable RPMs. Relocatable RPMs can be installed under an arbitrary prefix directory. Download these RPMs:

http://www.alcf.anl.gov/~hfinkel/bgclang/RPMS/ppc64/bgclang-r189357-20130827-3-1.ppc64.rpm
http://www.alcf.anl.gov/~hfinkel/bgclang/RPMS/ppc64/bgclang-sleef-r189357-20130827-3-1.ppc64.rpm
http://www.alcf.anl.gov/~hfinkel/bgclang/RPMS/ppc64/bgclang-libcxx-r189357-20130827-3-1.ppc64.rpm
http://www.alcf.anl.gov/~hfinkel/bgclang/RPMS/ppc64/bgclang-compiler-rt-r189357-20130827-3-1.ppc64.rpm
http://www.alcf.anl.gov/~hfinkel/bgclang/RPMS/ppc64/vpkg-bin-sh-1-1.ppc64.rpm

A non-root (regular) user can install these RPMs (because they are relocatable), but in addition to specifying the installation prefix (with the --prefix argument), an alternate RPM database directory needs to be specified (in a directory to which you actually have write permission). For example, to install bgclang into the /tmp/bgclang directory using /tmp/rpm as the RPM database directory, run:

    rpm -Uhv --dbpath /tmp/rpm --prefix /tmp/bgclang \
        bgclang-r189357-20130827-3-1.ppc64.rpm \
        bgclang-sleef-r189357-20130827-3-1.ppc64.rpm \
        bgclang-libcxx-r189357-20130827-3-1.ppc64.rpm \
        bgclang-compiler-rt-r189357-20130827-3-1.ppc64.rpm

If the installation fails with an error like:

error: Failed dependencies:
	/bin/sh is needed by bgclang-r189357-20130827-3-1.ppc64

Then first install the vpkg-bin-sh-1-1.ppc64.rpm package (which is a virtual package which exists only to satisfy this /bin/sh dependency):

    rpm -Uhv --dbpath /tmp/rpm --prefix /tmp/bgclang vpkg-bin-sh-1-1.ppc64.rpm

After the install is complete, the prefix directory should look like this:

    $ ls -l /tmp/bgclang | awk '{print $1, $9, $10, $11}'
    lrwxrwxrwx bin -> current/bin
    lrwxrwxrwx compiler-rt -> current/compiler-rt
    lrwxrwxrwx current -> r189357-20130827
    lrwxrwxrwx docs -> current/docs
    lrwxrwxrwx include -> current/include
    lrwxrwxrwx lib -> current/lib
    lrwxrwxrwx libc++ -> current/libc++
    lrwxrwxrwx libstdc++fixup -> current/libstdc++fixup
    lrwxrwxrwx mpi -> current/mpi
    drwxr-xr-x r189357-20130827  
    lrwxrwxrwx scan-build -> current/scan-build
    lrwxrwxrwx scan-view -> current/scan-view
    lrwxrwxrwx share -> current/share
    lrwxrwxrwx sleef -> current/sleef
    lrwxrwxrwx wbin -> current/wbin

These symlinks are only created by the post-install scripts in the RPMs if they don't already exist. As a result, upon subsequent upgrades, you'll need to manually update the 'current' symlink as desired. [Note that this is slightly different than the symlink structure I had been using previously w.r.t. the sleef, libc++, etc. symlinks... please make sure you adjust your setup as necessary].

The corresponding source RPMs are here:

http://www.alcf.anl.gov/~hfinkel/bgclang/SRPMS/bgclang-r189357-20130827-3-1.src.rpm
http://www.alcf.anl.gov/~hfinkel/bgclang/SRPMS/bgclang-sleef-r189357-20130827-3-1.src.rpm
http://www.alcf.anl.gov/~hfinkel/bgclang/SRPMS/bgclang-libcxx-r189357-20130827-3-1.src.rpm
http://www.alcf.anl.gov/~hfinkel/bgclang/SRPMS/bgclang-compiler-rt-r189357-20130827-3-1.src.rpm
http://www.alcf.anl.gov/~hfinkel/bgclang/SRPMS/vpkg-bin-sh-1-1.src.rpm

To rebuild these, first build the bgclang RPM, and install it. Then the others can be built, specifying the same --dbpath command-line argument provided rpm when installing the built bgclang RPM (if any).

This information has also been posted to https://trac.alcf.anl.gov/projects/llvm-bgq/ -- the trac page lists these RPMs under r189357-20130827 (v3). The only changes between v2 and v3 (aside from the new packaging), is that the RPMs have updated mpi wrapper scripts that also should work with driver V1R2M1 (in addition to continuing to work with V1R2M0).

Thanks again,
Hal

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory


More information about the llvm-bgq-discuss mailing list