[uClibc] Postfix dns_query problem

Reet reet79 at ggs.ch
Wed Jun 30 10:01:41 UTC 2004


Hi everyone,

I got a problem compiling postfix in an actual uclibc buildroot.
I've seen that uwoody includes postfix-1.1.11-0, so it must be
compilable somehow. The question is : how :)

After applying the following patch:

diff -ru postfix-1.1.11/makedefs postfix-1.1.11/makedefs
--- postfix-1.1.11/makedefs	Sat May  4 09:36:23 2002
+++ postfix-1.1.11/makedefs	Wed Oct 30 10:33:58 2002
@@ -171,22 +171,6 @@
 		*)	echo "Unknown AIX version: `uname -v`." 1>&2; exit 1;;
 		esac;;
     Linux.2*)	SYSTYPE=LINUX2
-		# Postfix no longer needs DB 1.85 compatibility
-		if [ -f /usr/include/db.h ]
-		then
-		    : we are all set
-		elif [ -f /usr/include/db/db.h ]
-		then
-		    CCARGS="$CCARGS -I/usr/include/db"
-		else
-		    # No, we're not going to try db1 db2 db3 etc.
-		    # On a properly installed system, Postfix builds
-		    # by including <db.h> and by linking with -ldb
-		    echo "No <db.h> include file found." 1>&2
-		    echo "Install the appropriate db*-devel package first." 1>&2
-		    echo "See the RELEASE_NOTES file for more information." 1>&2
-		    exit 1
-		fi
 		# GDBM locks the DBM .pag file after open. This breaks postmap.
 		# if [ -f /usr/include/gdbm-ndbm.h ]
 		# then
@@ -197,7 +181,7 @@
 		#     CCARGS="$CCARGS -DHAS_DBM -DPATH_NDBM_H='<gdbm/ndbm.h>'"
 		#     GDBM_LIBS=gdbm
 		# fi
-		SYSLIBS="-ldb"
+		SYSLIBS=""
 		for name in nsl resolv $GDBM_LIBS
 		do
 		    test -e /usr/lib/lib$name.a -o -e /usr/lib/lib$name.so \
diff -ru postfix-1.1.11/src/util/sys_defs.h
postfix-1.1.11/src/util/sys_defs.h
--- postfix-1.1.11/src/util/sys_defs.h	Thu Mar 28 14:57:54 2002
+++ postfix-1.1.11/src/util/sys_defs.h	Wed Oct 30 10:34:59 2002
@@ -482,10 +482,10 @@
 #define INTERNAL_LOCK	MYFLOCK_STYLE_FLOCK
 #define DEF_MAILBOX_LOCK "flock, dotlock"
 #define HAS_FSYNC
-#define HAS_DB
-#define DEF_DB_TYPE	"hash"
-#define ALIAS_DB_MAP	"hash:/etc/aliases"
-#define HAS_NIS
+#undef HAS_DB
+#define DEF_DB_TYPE	"cdb"
+#define ALIAS_DB_MAP	"cdb:/etc/aliases"
+#undef HAS_NIS
 #define GETTIMEOFDAY(t)	gettimeofday(t,(struct timezone *) 0)
 #define ROOT_PATH	"/bin:/usr/bin:/sbin:/usr/sbin"
 #define FIONREAD_IN_TERMIOS_H

I do:
# make makefiles
# make

and I still get the error:
gcc  -g -O -I. -I../../include -DLINUX2 -o smtpd smtpd.o smtpd_token.o
smtpd_check.o smtpd_chat.o smtpd_state.o smtpd_peer.o smtpd_sasl_proto.o
smtpd_sasl_glue.o ../../lib/libmaster.a ../../lib/libglobal.a
../../lib/libdns.a ../../lib/libutil.a -lnsl -lresolv
../../lib/libdns.a(dns_lookup.o)(.text+0x81): In function `dns_query':
/var/postfix-1.1.11/src/dns/dns_lookup.c:168: undefined reference to
`__res_search'
collect2: ld returned 1 exit status
make: *** [smtpd] Error 1
make: *** [update] Error 1

what's wrong exatly? do I have to apply another patch? change postfix
release ? (I tried also 1.1.12, 1.1.13, 2.0..no success) or do I have to
install another lib? I searched all over the net but didn't find a
solution for this...as I said, I'm using the actual uclibc buildroot.

Any help is appreciated!
Thank you very much
Reto Bürki




More information about the uClibc mailing list