From: Justin Pryzby <pryzby@telsasoft.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: David Steele <david@pgmasters.net>
Cc: Ildus Kurbangaliev <i.kurbangaliev@gmail.com>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: [HACKERS] Custom compression methods (mac+lz4.h)
Date: Sat, 20 Mar 2021 18:19:57 -0500
Message-ID: <20210320231957.GX11765@telsasoft.com> (raw)
In-Reply-To: <301730.1616276227@sss.pgh.pa.us>
References: <CAFiTN-sBH65e4B5kQB5MT8BQOPajkrKvSdKA-07+ra3f2x4vCA@mail.gmail.com>
<CAFiTN-tErP5x54pvkZP7yLVJhpNBOZcd5TN_k1BDhjYCA9D0VQ@mail.gmail.com>
<CA+TgmoYRsapWz2vDSQXFAEL_BAMq1aY37avcq9GAB=SUUvFhaw@mail.gmail.com>
<CAFiTN-t03PqWCaRW1GoWQa0i2NwYw_p=FDj+Kxu_-rY_viALqw@mail.gmail.com>
<20210319163511.GL11765@telsasoft.com>
<CA+TgmobuFsxf=nrweN7NYW9VMUV7dX4GYmN966kjeEgXxdxtrg@mail.gmail.com>
<20210319174425.GM11765@telsasoft.com>
<CA+TgmobXnzCRf-UOWnjk+OoCT-mzFR867HvoxM2N9uA7+_V-+g@mail.gmail.com>
<20210320212302.GW11765@telsasoft.com>
<301730.1616276227@sss.pgh.pa.us>
On Sat, Mar 20, 2021 at 05:37:07PM -0400, Tom Lane wrote:
> Justin Pryzby <pryzby@telsasoft.com> writes:
> > On Fri, Mar 19, 2021 at 02:07:31PM -0400, Robert Haas wrote:
> >> On Fri, Mar 19, 2021 at 1:44 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
> >>> configure: WARNING: lz4.h: accepted by the compiler, rejected by the preprocessor!
> >>> configure: WARNING: lz4.h: proceeding with the compiler's result
>
> >> No, I don't see this. I wonder whether this could possibly be an
> >> installation issue on Andrey's machine? If not, it must be
> >> version-dependent or installation-dependent in some way.
>
> > Andrey, can you check if latest HEAD (bbe0a81db) has these ./configure warnings ?
>
> FWIW, I also saw that, when building HEAD against MacPorts' version
> of liblz4 on an M1 Mac. config.log has
...
> Digging around, it looks like the "-I/opt/local/include" bit came
> from LZ4_CFLAGS, which we then stuck into CFLAGS, but it needed
> to be put in CPPFLAGS in order to make this test work.
If it's the same as the issue Andrey reported, then it causes a ./configure
WARNING, which is resolved by the ac_save hack, which I copied from ICU.
I'll shortly send a patchset including my tentative fix for that.
The configure.ac bits are also on this other thread:
https://www.postgresql.org/message-id/20210315180918.GW29463%40telsasoft.com
0005-re-add-wal_compression_method-lz4.patch
+if test "$with_lz4" = yes; then
+ ac_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$LZ4_CFLAGS $CPPFLAGS"
+
+ # Verify we have LZ4's header files
+ AC_CHECK_HEADERS(lz4/lz4.h, [],
+ [AC_CHECK_HEADERS(lz4.h, [], [AC_MSG_ERROR([lz4.h header file is required for LZ4])])])
+
+ CPPFLAGS=$ac_save_CPPFLAGS
+fi
--
Justin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: pryzby@telsasoft.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, dilipbalaut@gmail.com, andres@anarazel.de, tomas.vondra@2ndquadrant.com, a.korotkov@postgrespro.ru, david@pgmasters.net, i.kurbangaliev@gmail.com, 9erthalion6@gmail.com, x4mmm@yandex-team.ru, pgsql-hackers@lists.postgresql.org
Subject: Re: [HACKERS] Custom compression methods (mac+lz4.h)
In-Reply-To: <20210320231957.GX11765@telsasoft.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox