Обсуждение: Need to install liblz4-dev

Поиск
Список
Период
Сортировка

Need to install liblz4-dev

От
Bruce Momjian
Дата:
FYI, a few hours ago I started getting build errors on master due to
a missing liblz4 library error:

-->    checking for liblz4... no
-->    configure: error: Package requirements (liblz4) were not met:
    
-->    Package 'liblz4', required by 'virtual:world', not found
    
    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.
    
    Alternatively, you may set the environment variables LZ4_CFLAGS
    and LZ4_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.
    make: *** [../../../src/Makefile.global:870: ../../../config.status] Error 1

However, I had /usr/lib/x86_64-linux-gnu/liblz4.so.1 installed on Debian
13.  I had to install liblz4-dev ("dev") to allow the configure/compile
to succeed.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.



Re: Need to install liblz4-dev

От
Michael Paquier
Дата:
On Wed, Mar 04, 2026 at 12:50:24AM -0500, Bruce Momjian wrote:
> However, I had /usr/lib/x86_64-linux-gnu/liblz4.so.1 installed on Debian
> 13.  I had to install liblz4-dev ("dev") to allow the configure/compile
> to succeed.

That's because of 7c1849311e49, hence my fault.  You can also bypass
the failure by appending a --without-lz4 to your configure switches,
like one can do for ICU.
--
Michael

Вложения

Re: Need to install liblz4-dev

От
Jelte Fennema-Nio
Дата:
On Wed, 4 Mar 2026 at 07:15, Michael Paquier <michael@paquier.xyz> wrote:
>
> On Wed, Mar 04, 2026 at 12:50:24AM -0500, Bruce Momjian wrote:
> > However, I had /usr/lib/x86_64-linux-gnu/liblz4.so.1 installed on Debian
> > 13.  I had to install liblz4-dev ("dev") to allow the configure/compile
> > to succeed.
>
> That's because of 7c1849311e49, hence my fault.

"Fault" seems the wrong word. This error is intentional. So you have to
go out of your way to build postgres in a way that cannot open
datadirs created by the default configuration.



Re: Need to install liblz4-dev

От
Bruce Momjian
Дата:
On Wed, Mar  4, 2026 at 08:17:57AM +0100, Jelte Fennema-Nio wrote:
> On Wed, 4 Mar 2026 at 07:15, Michael Paquier <michael@paquier.xyz> wrote:
> >
> > On Wed, Mar 04, 2026 at 12:50:24AM -0500, Bruce Momjian wrote:
> > > However, I had /usr/lib/x86_64-linux-gnu/liblz4.so.1 installed on Debian
> > > 13.  I had to install liblz4-dev ("dev") to allow the configure/compile
> > > to succeed.
> >
> > That's because of 7c1849311e49, hence my fault.
> 
> "Fault" seems the wrong word. This error is intentional. So you have to
> go out of your way to build postgres in a way that cannot open
> datadirs created by the default configuration.

My bigger point is that I didn't see any notification on hackers that
installing liblz4-dev would be necessary to continue compiling master.
I thought other hackers would want to know this.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.



Re: Need to install liblz4-dev

От
John Naylor
Дата:
On Wed, Mar 4, 2026 at 12:50 PM Bruce Momjian <bruce@momjian.us> wrote:
>
> FYI, a few hours ago I started getting build errors on master due to
> a missing liblz4 library error:
>
> -->     checking for liblz4... no
> -->     configure: error: Package requirements (liblz4) were not met:
>
> -->     Package 'liblz4', required by 'virtual:world', not found
>
>         Consider adjusting the PKG_CONFIG_PATH environment variable if you
>         installed software in a non-standard prefix.
>
>         Alternatively, you may set the environment variables LZ4_CFLAGS
>         and LZ4_LIBS to avoid the need to call pkg-config.
>         See the pkg-config man page for more details.
>         make: *** [../../../src/Makefile.global:870: ../../../config.status] Error 1

Works on my machine:

# to start
Program lz4 found: NO
Run-time dependency liblz4 found: NO (tried pkgconfig and cmake)
Run-time dependency lz4 found: NO (tried cmake)

john=# show default_toast_compression ;
 default_toast_compression
---------------------------
 pglz
(1 row)

# install just lz4 -- the build still succeeds
sudo dnf install lz4

<clean build dir>

Program lz4 found: YES (/usr/bin/lz4)
Run-time dependency liblz4 found: NO (tried pkgconfig and cmake)
Run-time dependency lz4 found: NO (tried cmake)

john=# show default_toast_compression ;
 default_toast_compression
---------------------------
 pglz
(1 row)

# also install liblz4-dev
Program lz4 found: YES (/usr/bin/lz4)
Run-time dependency liblz4 found: YES 1.10.0

john=# show default_toast_compression ;
 default_toast_compression
---------------------------
 lz4
(1 row)

--
John Naylor
Amazon Web Services