Subject: Re: Netatalk 1.6.2 locking errors on -current?
To: Jun-ichiro itojun Hagino <itojun@itojun.org>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-pkg
Date: 10/01/2003 21:54:15
On Thu, 2 Oct 2003, Jun-ichiro itojun Hagino wrote:

> > >	openssl recommends against using /usr/include/openssl.  all #include
> > >	should be like #include <openssl/bn.h>.
> > Quite so. Unfortuantely, the netatalk source files in question #include
> > <des.h>, and in spite of 'cc -I/usr/include -I/usr/include/openssl' the
> > openssl version gets included. Just to see, I edited out all occurrences of
> > '-I/usr/include/openssl' from the Makefile, and the compile ended up
> > including the <kerberosIV/des.h> instead of <des.h>.

That would be the correct fix for the netatalk people (except the
change has to be Makefile.am's and ac{local,include}.m4). We don't
have to work that hard, fortunately...

> 	on netbsd-current /usr/include/kerberosIV/des.h is a symlink to
> 	/usr/include/des.h so they are identical.  not sure about situation
> 	w/ older versions or other OSes.

Evidently, gcc 3.3.1 completely ignores -I/usr/include, so if you want
to *not* override system headers, you have to explicitly invoke the
option provided for that purpose:


    echo '#include <des.h>' \
    | gcc -dI -E - -I/usr/include -I/usr/include/openssl \
    | grep 'include.*des'
    #include <des.h>
    # 1 "/usr/include/openssl/des.h" 1
    # 62 "/usr/include/openssl/des.h"
    # 62 "/usr/include/openssl/des.h"
    # 63 "/usr/include/openssl/des.h" 2
    # 64 "/usr/include/openssl/des.h"
    # 65 "/usr/include/openssl/des.h" 2
    # 65 "/usr/include/openssl/des.h"
    # 66 "/usr/include/openssl/des.h" 2
    # 76 "/usr/include/openssl/des.h"
    # 113 "/usr/include/openssl/des.h"
    # 150 "/usr/include/openssl/des.h"

    echo '#include <des.h>' \
    | gcc -dI -E - -I/usr/include/openssl -I- \
    | grep 'include.*des'
    #include <des.h>
    # 1 "/usr/include/des.h" 1 3 4
    # 68 "/usr/include/des.h" 3 4
    # 68 "/usr/include/des.h" 3 4
    # 69 "/usr/include/des.h" 2 3 4
    # 114 "/usr/include/des.h" 3 4
    # 150 "/usr/include/des.h" 3 4
    # 264 "/usr/include/des.h" 3 4


In any case, that <des.h> needs to be <kerberosIV/des.h> in order to
support NetBSD 1.6.1, and that's enough to let it build on current.

Frederick