Skip to content
xuehaonan27's blog
Go back

Add packages to Module package manager

Edit page

After installed Module package manager on HPC cluster, we should add packages.

Module environment

CMake

Pull from git repository or download via wget. Here I clone from git repository with version 3.31.5.

git clone git@github.com:Kitware/CMake.git --tag v3.31.5
cd v3.31.5/
mkdir /data/software/modules
./bootstrap --prefix=/data/software/modules/cmake/3.31.5
make -j $(nproc)
make install

Module file should be placed here: /data/software/module/tools/modules/modulefiles/cmake/3.25.0.

Modulefile content:

#%Module1.0
set version 3.31.5
set prefix /data/software/modules/cmake/$version

prepend-path PATH $prefix/bin
prepend-path MANPATH $prefix/share/man
prepend-path LD_LIBRARY_PATH $prefix/lib

Note:

VDE-2

Pull source from sourceforge would not compile. I chose to clone source from Github.

git clone git@github.com:virtualsquare/vde-2.git
cd vde-2/
mkdir build
cd build/
cmake .. --install-prefix=/data/software/modules/vde/2.3.3
make -j$(nproc)
make install

Modulefile path: /data/software/module/tools/modules/modulefiles/vde/2.3.3. Modulefile content:

#%Module1.0
set version 2.3.3
set prefix /data/software/modules/vde/$version

prepend-path PATH $prefix/bin
prepend-path LD_LIBRARY_PATH $prefix/lib
prepend-path MANPATH $prefix/share/man

QEMU

Pull source from QEMU official website.

wget https://download.qemu.org/qemu-9.2.0.tar.xz
tar -xvf qemu-9.2.0.tar.xz
cd qemu-9.2.0

Dependencies should be installed. Since my HPC cluster uses Rocky Linux, the package manager is dnf. But on other distributions, you should adopt different package managers and package name might be different as well.

dnf install python3-tomli
dnf install ninja

Compile QEMU with following command.

PKG_CONFIG_PATH=/data/software/modules/vde/2.3.3/lib64/pkgconfig:$PKG_CONFIG_PATH \
./configure \
    --enable-kvm \
    --enable-slirp \
    --enable-vde \
    --enable-system \
    --enable-user \
    --extra-cflags="-I/data/software/modules/vde/2.3.3/include/" \
    --extra-ldflags="-L/data/software/modules/vde/2.3.3/lib64/" \
    --prefix=/data/software/modules/qemu/9.2.0

Command explained:

Build and install.

make -j$(nproc)
make install

Edit page
Share this post:

Previous Post
A Bug Caused by MAC Address
Next Post
CoHPC Project Introduction