We are building WRF-Hydro from source code, using intel compilers. I also need to build R from source. Today we encountered a problem during compilation using Spack and we totally forget how it’s solved previously when we successfully build from source code(instead of using Spack). Therefore, I figure I’d better record the scripts and solutions for errors. Solutions can be found with google but it’s definitely more convenient to record them in a single place.
Building R
R scripts is used for generating inputs for the WRF-Hydro.
wget https://www.sourceware.org/pub/bzip2/bzip2-latest.tar.gz tar xf bzip2-latest.tar.gz cd bzip2-1.0.8 sudo make install PREFIX=/opt/local/bzip2/1.0.8 make clean make -f Makefile-libbz2_so sudo cp bzip2-shared /opt/bzip2/1.0.8/bin sudo cp libbz2.so.1.0.8 /opt/bzip2/1.0.8/lib sudo ln -s /opt/bzip2/1.0.8/lib/libbz2.so.1.0.8 /opt/bzip2/lib/libbz2.so.1.0 sudo ln -s /opt/bzip2/1.0.8/lib/libbz2.so.1.0.8 /opt/bzip2/lib/libbz2.so # add LD_LIBRARY_PATH
xz-5.2.4
1 2 3 4 5 6
wget https://tukaani.org/xz/xz-5.2.4.tar.gz tar xvfz xz-5.2.4.tar.gz cd xz-5.2.4 ./configure --prefix=/opt/xz/5.2.4 sudo make install # add LD_LIBRARY_PATH
pcre2
1 2 3 4 5 6 7
wget https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.40/pcre2-10.40.tar.gz tar xf pcre2-10.40.tar.gz cd pcre2-10.40 ./configure --prefix=/opt/pcre/10.40 --enable-jit sudo make install # add LD_LIBRARY_PATH # add PATH