]> https://gitweb.dealii.org/ - candi.git/commitdiff
Update p4est.package according to dealii 279/head
authorFabian Castelli <fabian.castelli@kit.edu>
Tue, 15 Feb 2022 18:59:20 +0000 (19:59 +0100)
committerFabian Castelli <fabian.castelli@kit.edu>
Tue, 15 Feb 2022 18:59:20 +0000 (19:59 +0100)
deal.II-toolchain/packages/p4est.package

index 9aaa1ab826aa634a1817b2eba232d7fcd191c3f0..12f4a0001f469a0f805cd98064b3ade7a61e425e 100644 (file)
@@ -21,6 +21,13 @@ BUILDCHAIN=custom
 INSTALL_PATH=${INSTALL_PATH}/${NAME}
 
 package_specific_setup() {
+    # error message when zlib is not found
+    MISSING_ZLIB_MESSAGE="deal.II requires that p4est be built with zlib support. Please \
+    either ensure that zlib is installed in a standard location or add appropriate \
+    flags to LDFLAGS and CPPFLAGS to both calls to configure to describe where zlib's \
+    shared object files and headers are (e.g., LDFLAGS=\"-L/path/to/shared-objects/\" \
+    and CPPFLAGS=\"-DSC_LOG_PRIORITY=SC_LP_ESSENTIAL -I/path/to/headers/\")."
+
     function bdie() {
         echo "Error: $@"
         exit 1
@@ -91,6 +98,10 @@ package_specific_setup() {
         "$@" >config.output || bdie "Error in configure"
     make -C sc -j${JOBS} >make.output || bdie "Error in make sc"
     make -j${JOBS} >>make.output || bdie "Error in make p4est"
+    # ensure that we built p4est with zlib
+    find "${BUILD_FAST}" -name "p4est_config.h" -type f -exec \
+    grep -q "P4EST_HAVE_ZLIB *1" {} \; \
+    || bdie "${MISSING_ZLIB_MESSAGE}"
     make install >>make.output || bdie "Error in make install"
     echo "FAST version installed in ${INSTALL_FAST}"
 
@@ -105,8 +116,11 @@ package_specific_setup() {
         "$@" >config.output || bdie "Error in configure"
     make -C sc -j${JOBS} >make.output || bdie "Error in make sc"
     make -j${JOBS} >>make.output || bdie "Error in make p4est"
+    # ensure that we built p4est with zlib
+    find "$BUILD_DEBUG" -name "p4est_config.h" -type f -exec \
+    grep -q "P4EST_HAVE_ZLIB *1" {} \; \
+    || bdie "$MISSING_ZLIB_MESSAGE"
     make install >>make.output || bdie "Error in make install"
-    grep -q "#define P4EST_HAVE_ZLIB" ${INSTALL_DEBUG}/include/p4est_config.h || bdie "Error: p4est couldn't find zlib"
     echo "DEBUG version installed in ${INSTALL_DEBUG}"
     echo
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.