NetBSD vs libxml2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: NetBSD vs libxml2
Date: 2018-08-11 17:18:26
Message-ID: 32035.1534007906@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

In a moment of idle curiosity, I tried to build PG --with-libxml
on NetBSD-current (well, mostly current, from May or so).
The configure script blew up, complaining that it couldn't execute
a test program. Investigation showed that xml2-config reports this:

$ xml2-config --libs
-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lxml2 -L/usr/lib -lz -L/usr/lib -llzma -L/usr/lib -lm

and we're only paying attention to the -L switches out of that.
So we successfully link to /usr/pkg/lib/libxml2.so, but then
execution fails for lack of rpath pointing at /usr/pkg/lib.

We could fix this by teaching configure to absorb -Wl,-R... switches
into LDFLAGS from xml2-config's output, and that seems to make things
work, but I wonder whether we should or not. This seems like a new height
of unfriendliness to non-default packages on NetBSD's part, and it's a bit
hard to believe the behavior will make it to a formal release. I don't
see any comparable behavior on FreeBSD for instance --- it puts packages'
libraries into /usr/local/lib, but that seems to be searched automatically
without additional switches beyond -L. Don't have an easy way to check
things on OpenBSD.

Thoughts?

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nico Williams 2018-08-11 18:12:09 Re: NetBSD vs libxml2
Previous Message Andreas Seltenreich 2018-08-11 15:45:43 [sqlsmith] ERROR: plan should not reference subplan's variable