You are not logged in.
Trying to build sendmail from source fails on Archlinux:
cc -O2 -I. -I../../include -DNEWDB -c -o util.o util.c
cc -O2 -I. -I../../include -DNEWDB -c -o version.o version.c
cc -o sendmail main.o alias.o arpadate.o bf.o collect.o conf.o control.o convtime.o daemon.o deliver.o domain.o envelope.o err.o headers.o macro.o map.o mci.o milter.o mime.o parseaddr.o queue.o ratectrl.o readcf.o recipient.o sasl.o savemail.o sfsasl.o shmticklib.o sm_resolve.o srvrsmtp.o stab.o stats.o sysexits.o timers.o tls.o trace.o udb.o usersmtp.o util.o version.o /home/idefix/src/sendmail-8.13.5/obj.Linux.2.6.10-ARCH.i686/libsmutil/libsmutil.a /home/idefix/src/sendmail-8.13.5/obj.Linux.2.6.10-ARCH.i686/libsm/libsm.a -ldb -lresolv -lcrypt -lnsl -ldl
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../libdb.so: undefined reference to `pthread_condattr_setpshared'
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../libdb.so: undefined reference to `pthread_mutexattr_destroy'
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../libdb.so: undefined reference to `pthread_mutexattr_setpshared'
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../libdb.so: undefined reference to `pthread_mutexattr_init'
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../libdb.so: undefined reference to `pthread_mutex_trylock'
collect2: ld returned 1 exit status
make: *** [sendmail] Error 1
How can I fix this?
Offline
It seems that the linker flags should include -lpthread.
Offline
It seems that the linker flags should include -lpthread.
Yes, thanks!
I had to add -lpthread to the linker flags to some of the Makefiles below obj.Linux.2.6.10-ARCH.i686.
Offline