On 2012/11/08 11:23, Woodhouse, David wrote: > I saw the OpenBSD 5.2 release and figured I should make sure the > OpenConnect VPN client builds OK on it still. It does, but I noticed > that it didn't build with localisation support, and tried to fix that. > > It seems that libintl *is* present, but it's installed in /usr/local and > the compiler doesn't find it by default. I'm not entirely sure if this > is a bug in the libintl/gettext installation, in the compiler default > search paths, or a deliberate design decision that an installed library > should fail to work by default... but I attempted to work around it by > adding 'CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib' to my > configure invocation. That's tolerable for a first test build, but > surely I shouldn't have to advise users to build things that way when > using the platform's stock libintl?
It's deliberate that the system preprocesser and linker don't search /usr/local/include and /usr/local/lib, I'm not sure of the original reasoning behind it. The usual method is exactly what you've done with the explicit LDFLAGS/CPPFLAGS and this is afaik standard behaviour on BSDs. When pkg-config is used there's generally no problem but this doesn't help with the very common libintl. > (I also needed to explicitly link against -liconv in addition to -lintl, > which I've now added to the configure script in git.) > > Anyway, it doesn't *work* either — the build failed. It seems that when > building the openconnect executable, it finds the old libopenconnect.so > in /usr/local/lib *before* the new one it's just built in the build > directory. And thus the link fails. That sounds like it might be a > libtool/autotools bug — surely it should link against the library it > just built, and put -L./.libs on the search path *before* anything else? > I was using the latest available tools where given the choice; autoconf > 2.69, automake 1.12 and libtool (not GNU libtool) 1.5.26. Should I try > with GNU libtool instead? > > I assume I'm doing something wrong here. Advice on how to make it build > properly on OpenBSD would be much appreciated... libtool people: is there something we should be doing something to reorder the library directory list to ensure the .libs directory comes first in the search list? Or is there something else going on here? We have some places in the ports tree where we explicitly override LDFLAGS to include .libs directories (e.g. imagemagick) which I presume is for this same reason - there aren't very many instances of this though it's possible people have only worked-around this problem in cases where they found it really painful to uninstall an existing package and its dependencies when working on an update.