Preparing a Linux machine for Bilder » History » Revision 85
« Previous |
Revision 85/86
(diff)
| Next »
Ted Sume, 08/15/2024 03:08 PM
Preparing a Linux machine for Bilder¶
If all you need is python and sphinx (e.g., for builds of documentation), then you need only
- CMake (probably present)
- Python (probably present)
- Python-dev or Python-devel (on Fedora)
- Latex as installed below
- Perl-dev or Perl-devel with perl-ExtUtils-Embed
and then you can add the arguments, -W python,cmake, and your installed Python and CMake will be used if your path is correct.
Required Packages.¶
Rocky Linux 8
Copy/Paste to execute
dnf install --enablerepo=powertools alsa-lib-devel bison cups-devel dbus-devel flex fontconfig-devel gperf libcap-devel libevent-devel libffi-devel \
libGLU-devel libgcrypt-devel libglvnd-devel libicu-devel libpciaccess-devel libwebp-devel libXcomposite-devel libXcursor-devel libXi-devel \
libxkbcommon-devel libXrandr-devel libxslt-devel libXt-devel libXtst-devel mesa-libEGL-devel nss-devel numactl-devel patch pciutils-devel \
pulseaudio-libs-devel readline-devel re2c ruby systemd-devel tcl-devel tk-devel lapack-devel libsndfile-devel libstdc++-static libxkbcommon-x11-devel \
opus-devel re2c git perl-interpreter dmidecode hdparm libcurl-devel m4 perl-Time-HiRes valgrind rsync bzip2 make wget tar unzip gcc-c++ gcc gcc-gfortran \
kernel-devel kernel-headers kernel subversion gd-devel tmux bc java-1.8.0-openjdk.x86_64 rdma-core libibverbs glibc-langpack-de xauth git-lfs glx-utils \
unzip rdma-core-devel
dnf remove libidn2-devel
GCC¶
Below are the instructions for building gcc
Get and unpack the source package¶
export GCCVER=11.2.0
wget ftp://ftp.gnu.org/gnu/gcc/gcc-${GCCVER}/gcc-${GCCVER}.tar.xz
tar xf gcc-${GCCVER}.tar.xz && cd gcc-${GCCVER}
Patch as needed¶
No patching needs known as of now.
Build¶
Define GCC_INSTS_DIR to be your tarball installation directory, e.g.,
export GCC_INSTS_DIR=/contrib
Usually GCC_INSTS_DIR=/contrib, but if one does not have root access, one has to put this in a user area. If one does have root access, one should execute the following commands:
mkdir /internal /contrib /volatile
chmod 775 /internal /contrib /volatile
Unpack gcc, go into the gcc source directory, and build according to the instructions below.
gcc:
You may need to set some addition options, e.g.,
ADDLOPTS=--with-cpu=power9
on linuxppc64leADDLOPTS=--disable-multilib
if 32bit glibc libraries are not installed.
./contrib/download_prerequisites
mkdir build && cd build
../configure --prefix=$GCC_INSTS_DIR/gcc-${GCCVER} --enable-languages=c,c++,fortran --with-pic $ADDLOPTS
env LD_RUN_PATH=$GCC_INSTS_DIR/gcc-${GCCVER}/lib64 make -j 4
make install
chmod -R a+rX $GCC_INSTS_DIR/gcc-${GCCVER} # Perms issues seen in 9.4.0: 9.4.0/include-fixed/openssl/bn.h
# Alias as desired.
mkdir -p $GCC_INSTS_DIR/bin && cd $GCC_INSTS_DIR/bin
ln -s $GCC_INSTS_DIR/gcc-${GCCVER}/bin/{c,g}* .
Fix permissions¶
chown -R root:root $GCC_INSTS_DIR/gcc-${GCCVER}
chmod -R g+rwX $GCC_INSTS_DIR/gcc-${GCCVER}
chmod -R o+rX $GCC_INSTS_DIR/gcc-${GCCVER}
find $GCC_INSTS_DIR/gcc-${GCCVER} -type d -exec chmod g+rs '{}' \;
LaTeX¶
LaTeX is needed for building documentation using Sphinx.
Bilder prefers the texlive-latex package. For gui usage, see texworks: http://www.tug.org/texworks
If you cannot install in the system area, you can download
wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar xzf install-tl-unx.tar.gz
cd install-tl-20230412 (date might be different)
./install-tl -no-gui
This is now interactive, so set
Set scheme to basic
** To do this type 'S' and hit enter.
** Then enter 'd' to set the scheme to basic.
** Type 'R' and hit enter to return to the main configuration page.Set TEXDIR = $CONTRIB_DIR/texlive
** Start by typing 'D' and hit enter.
** Then enter '1' to change TEXDIR.
** Type $CONTRIB_DIR/texlive and hit return.
** To return to configuration type 'R' and return.Set page size to Letter size
** Type 'O' and hit enter.
** Enter 'P'
** Return to main menu by typing 'R' and enter.Install
** Type 'I' and hit enter to install.Put your texlive in your PATH.
** Edit you bashrc (vim ~/.bashrc)
** Add "export PATH=$PATH:<$CONTRIB_DIR>/texlive/bin/x86_64-linux/" (enter the full CONTRIB_DIR value)
** Exit and save. Then source ~/.bashrc.
To ensure you are using the correct texlive installation type "which pdflatex" and make sure it
the one in $CONTRIB_DIR/texlive/bin/x86_64-linux/. If it is not the correct pdflatex, you may
have to remove the system version (sudo yum remove texlive).
and then install the packages noted at
LaTeX packages needed by Bilder
Language Local¶
The txbase unit tests need a german local package. It can be generated by the command:
sudo locale-gen de_DE.UTF-8
Additional packages¶
Other parts of the toolchain introduce other package requirements. Below are the initial lists.
Qt Prerequisites¶
Qt-5 must be built with QtWebEngine, which particularly introduces requirements for other packages as noted at
- https://doc.qt.io/qt-5.10/qtwebengine-platform-notes.html
- https://wiki.qt.io/QtWebEngine/How_to_Try
- https://www.ics.com/blog/building-qtwebengine
- http://www.linuxfromscratch.org/blfs/view/svn/x/qtwebengine.html
Each of the above websites appears to have made assumptions about what is already installed, so as one encounters more workstations, one is likely to find yet another package missing. This is our list so far.
Fedora¶
sudo yum install alsa-lib-devel bison cups-devel dbus-devel flex fontconfig-devel gperf libicu-devel
sudo yum install libcap-devel libgcrypt-devel libgcrypt libgudev1-devel libsndfile-devel libstdc++-static libwebp-devel
sudo yum install libXcomposite-devel libXcursor-devel libXi-devel libXrandr-devel libxslt-devel libXtst-devel
sudo yum install mesa-libEGL-devel nss-devel opus-devel pciutils-devel pulseaudio-libs-devel re2c ruby systemd-devel
Vendor-specific version of graphics driver¶
If you are preparing a Linux machine for the VisIt Visualization package, the vendor-specific graphics driver for your graphics card should be installed.
By default, a generic graphics driver is installed. On Fedora, the generic driver is "nouveau".
To determine if the nouveau driver is installed on your system, enter the command
lsmod | grep nouv
You will need to download and install the appropriate driver from your graphics card vendor. This generally uninstalls the nouveau drivers.
NVIDIA CUDA Toolkit¶
If you have a compatible GPU and wish to compile with nvcc code, you must first install the CUDA Toolkit. The linux installation page is
https://developer.nvidia.com/cuda-toolkit-70
Download the applicable file. Your Linux distribution may or may not be natively supported for version 7.0. You may alternatively use version 7.5 if supported or an older version if necessary. As an example, we will include the steps known to work for Fedora 22. On Fedora 22, download the Fedora 21 Local RPM package.
cd <location of download>
sudo rpm -i cuda-repo-fedora21-7-0-local-7.0-28.x86_64.rpm #<or whatever file you downloaded>
sudo dnf install cuda
Different Linux distributions will have different package handlers (here we use dnf, ubuntu has apt-get, fedora < 22 uses yum). You should now have the directory /usr/local/cuda-7.0. Add /usr/local/cuda-7.0/bin to your path. To ensure you have gotten the necessary components, type:
which nvcc
The output should be /usr/local/cuda-7.0/bin/nvcc. This will allow bilder to build GPU c++ code.
IMPORTANT NOTE: CUDA versions only support particular GCC versions, and the latest GCC may not support your CUDA. See this wiki page for details
Updated by Ted Sume 3 months ago · 85 revisions