Building p4est with no system-wide zlib

62 views
Skip to first unread message

Michał Wichrowski

unread,
Sep 16, 2021, 3:39:12 PM9/16/21
to deal.II User Group
Dear all,
I am trying to set up deal.II on a computer with no system-wide zlib. I do not have sudo privileges, thus I cannot just install, so I compiled it from the source and installed in my home directory. Now I am trying to build p4est using it. According to the message thrown by the scrip (https://www.dealii.org/current/external-libs/p4est.html) I should 
export CPPFLAGS="-DSC_LOG_PRIORITY=SC_LP_ESSENTIAL  -I/export/home/mwichro/lib/zlib/include/"
export LDFLAGS="-L/export/home/mwichro/lib/zlib/lib/"
Apparently setting those does not resolve the problem, the script still complains about zlib.

By going through what the script really does, I think the following line triggers an error:
grep -q 'P4EST_HAVE_ZLIB *1' "$BUILD_FAST/src/p4est_config.h" \ || bdie "$MISSING_ZLIB_MESSAGE"

As far as I understood, it looks into p4est-build/FAST/src/p4est_config.h . That file on my system does not exist. I also went through the config.log, it looks like it contains:
#define LIBS "  -lz -lm   "
so I guess it links with zlib?


By the way, I moved to Heidelberg and I am happy to continue my work with deal.II library.

Best,
Michał

Wolfgang Bangerth

unread,
Sep 16, 2021, 8:26:23 PM9/16/21
to dea...@googlegroups.com
Michal: I don't know whether anyone still remembers how that
installation script came about. What happens if you just remove the line
that causes the script to abort?


> By the way, I moved to Heidelberg and I am happy to continue my work
> with deal.II library.
Nice, glad to hear you landed in a good place a lot of us have good
memories of!

Best
Wolfgang

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Marc Fehling

unread,
Sep 17, 2021, 2:36:09 AM9/17/21
to deal.II User Group
Hi Michał,

maybe it will help to invoke `configure --help` on the source of your p4est tarball. Hopefully there will be instructions on how to connect custom zlib libraries -- I couldn't find anything in their README :(

Best,
Marc

Michał Wichrowski

unread,
Sep 17, 2021, 6:34:50 AM9/17/21
to deal.II User Group
@Wolfgang:
I commented out that lines, compiled deal.II and it looks OK, at least `make test` passes and  step-37 works in both release and debug mode. 

@Marc
I had the same idea, but there was nothing in `configure --help` to put custom zlib patch.

Thank you for the answers. For reference, I was using p4est-2.3.2 

Reply all
Reply to author
Forward
0 new messages