nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Re: compile nmh on Mac OS X breaks on slocal.c

2006-05-06 15:31:16
Matthias Teege wrote:

I'm going to assume here that you're dealing with head of CVS nmh;
I have no great interest in identifying problems with the dbm
detection in nmh 1.2 because I know it's broken :-)

Joel Reicher <joel@panacea.null.org> writes:
env CPPFLAGS=-I/Developer/SDKs/MacOSX10.4u.sdk/usr/include 
LDFLAGS=-L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib ./configure

% setenv LDFLAGS -L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib
% setenv CPPFLAGS -I/Developer/SDKs/MacOSX10.4u.sdk/usr/include  
% ./configure
% make

slocal.c:1595: warning: implicit declaration of function 'dbm_store'
slocal.c:1595: error: 'DBM_INSERT' undeclared (first use in this function)
slocal.c:1600: warning: implicit declaration of function 'dbm_close'
make[1]: *** [slocal.o] Error 1
make: *** [all-recursive] Error 1

I don't know anything about MacOS X but I'd be willing to bet that
you're not supposed to put those directories on your path directly.
I'm guessing /usr/include and /usr/lib are symlinks to them or some
similar scheme.

These errors look like we found the include file but not the library.
Is this head-of-cvs nmh or the released tarball?

assuming the path is correct and the name is libndbm.

That maybe the problem.

I've also tryed

% setenv CPPFLAGS -I/opt/local/include
% setenv LDFLAGS -L/opt/local/lib
% make

This definitely won't work -- you can't change CFLAGS or LDFLAGS
after configure but before make, as configure's guesses will be
wrong. If you want to try that then you must reconfigure.

In another mail you wrote:

% locate 'ndbm.*'
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/ndbm.h
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/ndbm.h
/usr/include/ndbm.h
% ./configure --with-ndbm=/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/ 
--with-ndbmheader=/Developer/SDKs/MacOSX10.4u.sdk/usr/include/
checking for dbm in /Developer/SDKs/MacOSX10.4u.sdk/usr/include/ and 
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/... no
configure: error: could not find a working ndbm library/header combination

% port install gdbm
% find /opt/local -name '*dbm.[a|h]'
/opt/local/include/gdbm.h
/opt/local/lib/libgdbm.a
./configure --with-ndbm=/opt/local/lib --with-ndbmheader=/opt/local/include
checking for dbm in /opt/local/include and /opt/local/lib... no
configure: error: could not find a working ndbm library/header combination

This is not the correct way to use those configure options. Try
./configure --with-ndbm=dbm --with-ndbmheader=ndbm.h
or set CPPFLAGS/LDFLAGS to put the /opt/local directories on the compiler
include paths and
./configure --with-ndbm=gdbm --with-ndbmheader=gdbm.h --with-ndbm=gdbm

-- PMM


_______________________________________________
Nmh-workers mailing list
Nmh-workers@nongnu.org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>