Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lNkt6-0006jm-0n for pgsql-hackers@arkaria.postgresql.org; Sat, 20 Mar 2021 23:20:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lNkt4-0004vg-AU for pgsql-hackers@arkaria.postgresql.org; Sat, 20 Mar 2021 23:20:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lNkt3-0004vY-S8 for pgsql-hackers@lists.postgresql.org; Sat, 20 Mar 2021 23:20:05 +0000 Received: from mail-io1-xd36.google.com ([2607:f8b0:4864:20::d36]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lNksy-0007Xi-HN for pgsql-hackers@lists.postgresql.org; Sat, 20 Mar 2021 23:20:04 +0000 Received: by mail-io1-xd36.google.com with SMTP id z136so10052500iof.10 for ; Sat, 20 Mar 2021 16:20:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rAAp0FKD7AuRCa4xDUfKuqbjiPSW/0YbDMCeccV6kBQ=; b=1lRHjAUs01npgIzcEqj4Qz6CJOzlSU3HQS2nXPkQ/7WQ9j/OdMPliu0KI6atpYX2qp zcG7BZWPxzGpxprmELSLFDPQWOye0a+f7cbXww0HHel4qRRMbLeNxlSZcqqWJcHNw9MR wRtmhVR+/UjQuQ3uzO5zF9DLyIMHHud9jvtlozwpFPd1+DD27ai0ppRmkd/IEPTypxyT ov7TX1BDgPzBhovLpEpUEQRPvqODDqOmlLhr7x8gLSLtPVF1aYc6YZUqWY035sKUeW1f FkxvgGW8qCw4M4u0TYNHveE/DDSZqT4//hYPpGsP9V/Mf1VM47C2H2lrTUridzVb/uht 3ojQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=rAAp0FKD7AuRCa4xDUfKuqbjiPSW/0YbDMCeccV6kBQ=; b=FRidOTR3i0qbpaZruIVCvzbuxmzYeQS3QwuoUhljo2kk/cJO5CmKIv4616yd2vg+RD WVhNQCnTxKuOcmXolajUXBEbyPpdapQN+KxvajNM3Kqh+hdbP+XOALbhqkwHt19bxiui ZfksYAVIGd0wZJNdaSK2uqDeV/jFJauf1ZzOyMFh0Q58uGRdLI/h+SRi4XIxF6EY68Ad bHv1ZyGT6nYjE3vUhqqiKl7hjf8ZfbObpc3/Z0lSCtRmtVfr9YbaBrQuMeDMocp61tPg 5sdlUv3w71vgzrh4XMba6te/bhs3dQsundpI6NWYw7jYs2pyIU5GuIO9MLa/zNXXrns7 Hckw== X-Gm-Message-State: AOAM53165NOM6KQy8mhg1EoQDn2aZX4PeQAFXQHlVfgzzJ+I7ttWExmi F/UxhZM/T+EJkD15Ef/Omw7Ecw== X-Google-Smtp-Source: ABdhPJzpbAKaEDwKmIkh9d2Dxb/n7ddbfbJ8+VDkJ1+BTVDu6hjyH1Nt1pjMIAOhzAA9AzC83riVXA== X-Received: by 2002:a5e:de0d:: with SMTP id e13mr6860807iok.208.1616282399608; Sat, 20 Mar 2021 16:19:59 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id h24sm4911067ila.43.2021.03.20.16.19.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Mar 2021 16:19:58 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id DB972800671; Sat, 20 Mar 2021 18:19:57 -0500 (CDT) Date: Sat, 20 Mar 2021 18:19:57 -0500 From: Justin Pryzby To: Tom Lane Cc: Robert Haas , Dilip Kumar , Andres Freund , Tomas Vondra , Alexander Korotkov , David Steele , Ildus Kurbangaliev , Dmitry Dolgov <9erthalion6@gmail.com>, Andrey Borodin , pgsql-hackers@lists.postgresql.org Subject: Re: [HACKERS] Custom compression methods (mac+lz4.h) Message-ID: <20210320231957.GX11765@telsasoft.com> References: <20210319163511.GL11765@telsasoft.com> <20210319174425.GM11765@telsasoft.com> <20210320212302.GW11765@telsasoft.com> <301730.1616276227@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <301730.1616276227@sss.pgh.pa.us> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Mar 20, 2021 at 05:37:07PM -0400, Tom Lane wrote: > Justin Pryzby 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 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