From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: rb9999999@gmail.com
Subject: BUG #16737: error running compiled C program with connection to Postgres
Date: Sat, 21 Nov 2020 09:14:49 +0000
Message-ID: <16737-71e193335e499c9a@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 16737
Logged by: richard bee
Email address: rb9999999@gmail.com
PostgreSQL version: 13.1
Operating system: Mac iOS Big Sur
Description:
This is an issue for both Apple and Postgres - I have registered the same
issue with Apple here:
https://feedbackassistant.apple.com/feedback/8907834
when running a compiled C program with connection attributes to postgres, I
now get the following error after upgrading to Big Sur:
dyld: Library not loaded: /usr/lib/libpq.5.dylib
Referenced from: /xxdir/program
Reason: image not found
Abort trap: 6
indeed, there is nothing in /usr/lib directory that resembles
libpq.5.dylib,
neither file nor link
and the /usr/lib directory in Big Sur is locked down and so cannot enter
anything here
have implemented the following without resolution:
https://stackoverflow.com/questions/64256675/copy-libpq-5-dylib-to-usr-lib-libpq-5-dylib
The code itself is the usual example of C to Progress connection code and
worked prior to Big Sur upgrade on my macbook pro 2018
sample c program to compile is here:
https://www.postgresql.org/docs/9.1/libpq-example.html
compilation command being used is:
gcc -o e1_ e1.c -I "/Library/PostgreSQL/13/include" -lpq -std=c99
The same error also happens with the clang compiler
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-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, rb9999999@gmail.com
Subject: Re: BUG #16737: error running compiled C program with connection to Postgres
In-Reply-To: <16737-71e193335e499c9a@postgresql.org>
* 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