Re: BUG #17733: ERROR: could not load library "/Users/frank/postgres/postgresql-13.9/lib/postgresql/llvmjit.so": dl

From: Andres Freund <andres(at)anarazel(dot)de>
To: frankreppin(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17733: ERROR: could not load library "/Users/frank/postgres/postgresql-13.9/lib/postgresql/llvmjit.so": dl
Date: 2022-12-29 20:36:43
Message-ID: 20221229203643.h2yfkt2titp7tnib@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

On 2022-12-28 16:15:27 +0000, PG Bug reporting form wrote:
> The following bug has been logged on the website:
>
> Bug reference: 17733
> Logged by: Frank Reppin
> Email address: frankreppin(at)gmail(dot)com
> PostgreSQL version: 13.9
> Operating system: macOS Catalina 10.15.7
> Description:
>
> Dear all,
> ... this is maybe related to an older issue #16460 - and it currently only
> fails on 13.x - tested with postgresql-13.9-1-osx-binaries.zip ( from EDB
> ).
>
> Outcome with 13.9 is (simple testcase) in an otherwise empty database
> testdb:
>
> testdb=> create table t1 (id serial);
> CREATE TABLE
> testdb=> insert INTO t1 (id) select * from generate_series(1, 10000000);
> ERROR: could not load library
> "/Users/frank/postgres/postgresql-13.9/lib/postgresql/llvmjit.so":
> dlopen(/Users/frank/postgres/postgresql-13.9/lib/postgresql/llvmjit.so, 10):
> Library not loaded: @loader_path/../..//opt/local/lib/libncurses.6.dylib
> Referenced from:
> /Users/frank/postgres/postgresql-13.9/lib/postgresql/llvmjit.so
> Reason: no suitable image found. Did find:
> file system relative paths not allowed in hardened programs
> testdb=> \q

That looks like an issue with the specific build - you're going to have to
take that up with EDB.

> frank(at)imac postgres % otool -L
> /Users/frank/postgres/postgresql-13.9/lib/postgresql/llvmjit.so
> /Users/frank/postgres/postgresql-13.9/lib/postgresql/llvmjit.so:
> @loader_path/../../lib/libz.1.dylib (compatibility version 1.0.0, current
> version 1.2.13)
> @loader_path/../..//opt/local/lib/libncurses.6.dylib (compatibility version
> 6.0.0, current version 6.0.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
> 1292.100.5)
> /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version
> 905.6.0)

It's pretty odd that llvmjit.so is linking to ncurses. Looks like some
compiler flags might have been injected in a too broad way.

Are other libraries, e.g. plpgsql.so and libpq.dylib also referencing ncurses?

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bryn Llewellyn 2022-12-29 21:30:16 Re: BUG #17734: Doc bug: "initial database user" used where "bootstrap superuser" is meant
Previous Message David G. Johnston 2022-12-29 20:35:50 Re: BUG #17734: Doc bug: "initial database user" used where "bootstrap superuser" is meant