[Pkg-postgresql-public] Bug#717073: Bug#717073: The libpq-dev package misses some dependencies

Evgeni Golov evgeni at debian.org
Tue Jul 16 14:15:56 UTC 2013


On Tue, Jul 16, 2013 at 04:01:07PM +0200, Pierre Pronchery wrote:
> On 16/07/2013 15:40, Pierre Pronchery wrote:
> > 
> > I have just installed libpq-dev on a fresh wheezy install (amd64), and
> > building against it fails as follows:
> > 
> > $ cc -shared -o pgsql.so pgsql.o   `pkg-config --cflags libSystem` -L
> > `pg_config --libdir` -Wl,-rpath,`pg_config --libdir` `pg_config --libs`
> > -lpq
> > /usr/bin/ld: cannot find -lxslt
> > /usr/bin/ld: cannot find -lpam
> > /usr/bin/ld: cannot find -ledit
> > collect2: error: ld returned 1 exit status
> > *** Error code 1
> > [...]
> > FTR the output of `pg_config --libs` is as follows:
> > -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lkrb5 -lcom_err
> > -lgssapi_krb5 -lz -ledit -lcrypt -ldl -lm
> > (so it could be more dependencies are required)
> 
> The real issue might as well be that the output of `pg_config --libs` is
> wrong: I have just been able to link a program to libpq without libxml2,
> libxslt or libedit and it runs fine.

Nope, the real issue is that pg_config is not pkg-config :)

pg_config --help says
  --libs                show LIBS value used when PostgreSQL was built

So it has nothing in common with pkg-config --libs pq (if that would 
exist) which will tell you which libs are needed to link with libpq.

Greets
Evgeni

-- 
Bruce Schneier can read and understand Perl programs.



More information about the Pkg-postgresql-public mailing list