Subject: Re: Netatalk 2.0.2 configure looking for DB library version in vain
To: None <tech-pkg@netbsd.org>
From: Daniel R. Killoran,Ph.D. <drkilloran@speakeasy.net>
List: tech-pkg
Date: 03/29/2005 10:51:49
On Mar 28, 2005, at 11:52 PM, Louis Guillaume wrote:

> Daniel R. Killoran,Ph.D. wrote:
>> Using:
>> Netatalk 2.0.2
>> Berkley DB 4.3
>> NetBSD 2.0
>> Mac IIvx 68030
>> I am trying to get netatalk 2.0.2 working on NetBsd (because I 
>> couldn't  get the version in pkgsrc to work with NetBSD 2.0).
>> I got the source from the Netatalk people on sourceforge,
>>>     http://marc.theaimsgroup.com/?l=netatalk
>>>      http://netatalk.sourceforge.net/2.0/htmldocs/ 
>>> installation.html#id2832939
>> and after figuring out how to get & install the Berkley DB libraries, 
>>  and how to tell Netatalk where they were, I got most of the way 
>> through  configure when it complained
>> checking for Berkeley DB headers in  
>> /usr/local/BerkeleyDB.4.3/include/db4... no
>> checking for Berkeley DB headers in  
>> /usr/local/BerkeleyDB.4.3/include/... yes
>> checking /usr/local/BerkeleyDB.4.3/include//db.h version >= 4.1.0...  
>> 4.3.27, yes
>> checking for Berkeley DB link (-ldb-4.2)... no
>> checking for Berkeley DB link (-ldb42)... no
>> checking for Berkeley DB link (-ldb-42)... no
>> checking for Berkeley DB link (-ldb-4-2)... no
>> checking for Berkeley DB link (-ldb-4.1)... no
>> checking for Berkeley DB link (-ldb41)... no
>> checking for Berkeley DB link (-ldb-41)... no
>> checking for Berkeley DB link (-ldb-4-1)... no
>> checking for Berkeley DB link (-ldb-4)... yes
>> checking Berkeley DB library version >= 4.1.0... no     
>> <----------------------- the problem!
>> checking for Berkeley DB headers in 
>> /usr/local/BerkeleyDB.4.3/db4.2...  no
>> checking for Berkeley DB headers in /usr/local/BerkeleyDB.4.3/db42... 
>> no
>> checking for Berkeley DB headers in 
>> /usr/local/BerkeleyDB.4.3/db4.1...  no
>> checking for Berkeley DB headers in /usr/local/BerkeleyDB.4.3/db41... 
>> no
>> checking for Berkeley DB headers in /usr/local/BerkeleyDB.4.3/db4... 
>> no
>> checking for Berkeley DB headers in /usr/local/BerkeleyDB.4.3/... no
>> Ok, the archives told me to:
>>> $ LD_LIBRARY_PATH=/usr/local/BerkeleyDB.4.3/lib ; export  
>>> LD_LIBRARY_PATH
>>> $ LDFLAGS=-Wl,-rpath,/usr/local/BerkeleyDB.4.3/lib ; export LDFLAGS  
>>>  <- add
>> actually I used (I am using csh):
>> set LD_LIBRARY_PATH=/usr/local/BerkeleyDB.4.3/lib
>> set LDFLAGS=-Wl,-rpath,/usr/local/BerkeleyDB.4.3/lib
>> which didn't work. Feeling uneasy about the comma after -rpath, I  
>> omitted it, trying with either a space instead, or with no space.
>> With a space, the shell naturally complained, and with no space it  
>> still didn't work.
>> Further googling yielded the advice:
>>> Most likely /usr/local/db4/lib is not in the linkers search path, so 
>>>  linking
>>> to libdb fails.
>>> I'd suggest adding "/usr/local/db4/lib" to /etc/ld.so.conf, then run
>>> ldconfig. Configure should work fine then.
>> but the docs say that the preferred way is NOT to use 
>> /etc/ld.so.conf,  but to specify rpath, which I had already tried.
>> Anyway, my system has no ld.so.conf file.
>> I can't find any further suggestions in the docs or archives. Any  
>> suggestions?
>> TIA,
>> Dan Killoran
>
> I just built netatalk-2.0.2nb1 from pkgsrc (pkgsrc-2005Q1 branch). But 
> this was on -current, not 2.0. Unfortunately I don't have a 2.0 
> machine handy that isn't in production.
>
> What exactly about the version in pkgsrc didn't work?
>
> It would be great to know what kind of trouble you ran into with the 
> pkgsrc package. As Jeremy suggested, it would be vastly easier to work 
> with pkgsrc, at least as a starting point.
>
>

... and Mark Davies added:
> Just to echo what Louis and Jeremy said, what was the problem you 
> struck with
> pkgsrc and netatalk?

Well, it's been nearly a month, so the details are a bit hazy, but 
reviewing the logs it seems that:

1) I have installed System 2.0
2) The version of netatalk in the corresponding package folder 
(ftp://ftp.NetBSD.org/pub/NetBSD/packages/2.0/mac68k/net) goes no 
higher than netatalk-1.5.3.1.tgz, which corresponds to System 1.6.1. 
But when I try to pkg_add this version, I get:

    pkg_add: Package 'netatalk-1.5.3.1.tgz' OS mismatch
    pkg_add: NetBSD/m68k 1.6_RC1 (pkg) vs NetBSD/m68k 2.0 (this host)

3) So I tried to install from source. After several days of compiling 
(it had to compile perl, among other things) It finally seemed to 
succeed. However, the highest rev available at the time for mac68k was 
netatalk-1.6.2nb2.
4) But when I tried it, I could transfer from OS-X to NetBSD, but not 
the other way around! I also got messages like this:

> MacIIvx# Mar 13 09:00:18 MacIIvx afpd[428]: [dsi_stream.c:81]: 
> E:Default: dsi_stream_read(0): une
> xpected EOF
> Mar 13 09:00:18 MacIIvx afpd[428]: [dsi_stream.c:81]: E:Default: 
> dsi_stream_read(0): unexpected E
> OF
> Mar 13 09:00:18 MacIIvx afpd[428]: [dsi_tcp.c:152]: E:Default: 
> dsi_tcp_open: invalid header
> Mar 13 09:00:18 MacIIvx afpd[428]: [dsi_tcp.c:152]: E:Default: 
> dsi_tcp_open: invalid header

5) So I figured there was probably a mismatch between OS and netatalk 
versions (1.6.2nb2 corresponds to NetBSD 1.6.2), so I decided to get 
the most recent version of Netatalk source and try that.
6) As shown above, the configure failed looking for Berkeley DB 
library. I had earlier obtained and installed this library, and I had 
called the configure pointing to it, viz:

./configure --with-bdb=/usr/local/BerkeleyDB.4.3 --enable-netbsd

and got the failure above.


I reported this on the netatalk email list and got no reply.
I would not have thought to bother the tech-pkg@netbsd.org people about 
it except that I noticed, looking through the archives, that
someone else encountered exactly the same error (can't find the 
messages now) and I hoped they had a solution.

TIA,

Dan Killoran