Subject: Re: librep build breaks on gdbm
To: James K. Lowden <jklowden@schemamania.org>
From: Frederick Bruckman <fredb@immanent.net>
List: netbsd-help
Date: 01/06/2002 16:04:19
On Sun, 6 Jan 2002, James K. Lowden wrote:

> On Sun, Jan 06, 2002 at 03:00:08PM -0600, Frederick Bruckman wrote:
> > On Sun, 6 Jan 2002, Frederick Bruckman wrote:
> > > On Sun, 6 Jan 2002, James K. Lowden wrote:
> > > > ===> Building for librep-0.15.1
> > > > ( cd src && /usr/pkg/bin/gmake repdoc )
> > > > gmake[1]: Entering directory `/usr/pkgsrc/lang/librep/work/librep-0.15.1/src'
> > > > /bin/sh ../libtool --mode=link cc  -o repdoc repdoc.o -lgdbm
> > > > cc -o repdoc repdoc.o  -lgdbm
> > >
> > > The error seems to be that there's no `-L${BUILDLINK_DIR}/lib on the
> > > command line. I'll take a look at the package.
> >
> > I can't reproduce this on 1.5.3_ALPHA. Are you running current?
>
> Oh, sorry, I should mentioned that.  No, I'm at 1.5:
>
> $ sysctl -a |grep kern.version
> kern.version = NetBSD 1.5 (GENERIC) #1: Sun Nov 19 21:42:11 MET 2000
>
> What do you suggest?

1) Please, file a PR, so that this can be fixed properly.

2) Edit /usr/pkgsrc/lang/librep/work/librep-0.15.1/src/Makefile. Find
the part where CPPFLAGS, CFLAGS, LDFLAGS and LIBS are defined, and
change them to:

CPPFLAGS=-DHAVE_CONFIG_H -I. -I$(top_srcdir)/src -I.. -I/t/pkgobj/lang/librep/work.i386/.buildlink/include
CFLAGS=-I/t/pkgobj/lang/librep/work.i386/.buildlink/include -O2
LDFLAGS=-L/t/pkgobj/lang/librep/work.i386/.buildlink/lib -Wl,-R/usr/pkg/lib
LIBS=-L/t/pkgobj/lang/librep/work.i386/.buildlink/lib -Wl,-R/usr/pkg/lib

or maybe even

LIBS=-L/t/pkgobj/lang/librep/work.i386/.buildlink/lib -Wl,-R/usr/pkg/lib -lintl -lcrypt

(That's from my successful "configure"). That should let you get back
to what you were doing.

What I suspect is happening, is that the "-L" flags are only being
added conditionally on "-lintl" being needed, and either that isn't
needed on your system (it's not on current, for sure), or else it's
need isn't being properly detected.

Frederick