tcpdump mailing list archives

OS X compilation from CVS cruft from ssl configuration


From: Neil Spring <nspring () cs washington edu>
Date: Sat, 4 Oct 2003 14:22:53 -0700

1. When configuring from cvs on my mac, I get gobs of messages:

cpp0: warning: changing search order for system directory "/usr/include"
cpp0: warning: as it has already been specified as a non-system directory

which can be avoided by changing configure.in:

sh-2.05a$ diff -u tcpdump/configure.in tcpdump.mine/configure.in
--- tcpdump/configure.in        2003-10-04 13:34:08.000000000 -0700
+++ tcpdump.mine/configure.in   2003-10-04 13:32:24.000000000 -0700
@@ -716,7 +716,10 @@
 done
 AC_MSG_RESULT($ac_cv_ssleay_path)
 if test "$ac_cv_ssleay_path" != no; then
-       V_INCLS="$V_INCLS $incdir"
+       # /usr//include because ${host_alias} may not be defined.
+ if test "$incdir" != "-I/usr/include" -a "$incdir" != "-I/usr//include"; then
+               V_INCLS="$V_INCLS $incdir"
+       fi
        LDFLAGS="-L$dir/lib $LDFLAGS"
        if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then
                LIBS="$LIBS -lRSAglue"

I expect this is at least as safe as the code it replaces, although I'm unsure why $incdir is _a_ppended and $dir/lib is _pre_pended. I'm unsure why the code messes with LDFLAGS first before trying nothing -- In particular, this code would prevent me from using fink's openssl library (in /sw/lib and /sw/include) even if I set CFLAGS and LDFLAGS properly at configure time. If this code fragment is solving an actual problem (eg. some os installs openssl in a crummy place), it'd be great if that was described in a comment, so that I can tell if it isn't going to do what I think it was meant to do. If not, it might be better to leave LDFLAGS and CFLAGS up to the user running configure, or only track down the library in an action-if-not-found argument to AC_CHECK_LIB.

2. Even though it's there, I also get a failure to find openssl/evp.h. From config.log,

configure:4834: gcc -E -no-cpp-precomp -I$(srcdir)/missing -I$(srcdir)/missing -I/usr/include conftest.c >/dev/null
2>conftest.out
cpp0: warning: changing search order for system directory "/usr/include"
cpp0: warning: as it has already been specified as a non-system directory
configure: failed program was:
#line 4829 "configure"
#include "confdefs.h"
#include <openssl/evp.h>
configure:4883: checking for a BSD compatible install

This goes away if I run autoconf locally (even without the modification above), though I can't tell if that's just because my autoconf is version 2.57 instead of 2.13. I'm sorry I don't have anything more helpful, though I hope you have plans to use a recent autoconf for the next release. Without fixing this issue, the build eventually fails when it gets to print-esp.c:

gcc -g -O -Wall -DHAVE_CONFIG_H -I. -I./missing -I/usr/include -c ./print-esp.c
./print-esp.c:79: undefined type, found `EVP_CIPHER'
./print-esp.c:230: undefined type, found `EVP_CIPHER'
./print-esp.c:360: undefined type, found `EVP_CIPHER_CTX'
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode ./print-esp.c:79: warning: type defaults to `int' in declaration of `EVP_CIPHER'
./print-esp.c:79: warning: no semicolon at end of struct or union
./print-esp.c:79: parse error before '*' token
./print-esp.c:84: parse error before '}' token
./print-esp.c: In function `esp_print_addsa':
./print-esp.c:95: sizeof applied to an incomplete type
./print-esp.c:99: dereferencing pointer to incomplete type
./print-esp.c:99: dereferencing pointer to incomplete type
./print-esp.c:104: dereferencing pointer to incomplete type
./print-esp.c: In function `esp_print_decode_onesecret':
./print-esp.c:140: storage size of `sa1' isn't known
...

I don't really know what is supposed to happen when openssl/evp.h is not present, but my guess is that it should prevent the file from being built in the same way that HAVE_LIBCRYPTO does.

thanks,
-neil

Attachment: PGP.sig
Description:


Current thread: