Compile error mail/alpine

Mel Flynn mel.flynn+fbsd.ports at mailing.thruhere.net
Tue Aug 4 16:39:58 UTC 2009


On Tuesday 04 August 2009 01:15:04 David Southwell wrote:

> latest error messages:
>
> cc -std=gnu99 -g -D_THREAD_SAFE -O2 -fno-strict-aliasing -pipe -
> DLDAP_DEPRECATED -rpath=/usr/local/lib -o alpine addrbook.o adrbkcmd.o
> after.o alpine.o arg.o busy.o colorconf.o confscroll.o context.o dispfilt.o
> flagmaint.o folder.o help.o imap.o init.o kblock.o keymenu.o ldapconf.o
> listsel.o mailcmd.o mailindx.o mailpart.o mailview.o newuser.o pattern.o
> pipe.o print.o radio.o remote.o reply.o roleconf.o send.o setup.o signal.o
> status.o takeaddr.o titlebar.o smime.o date.o  -lcrypt -lpam -L/usr/lib -
> L/usr/local/openssl/lib -L/usr/local/lib ../pico/libpico.a
> ../pico/osdep/libpicoosd.a ../pith/libpith.a ../pith/osdep/libpithosd.a
> ../pith/charconv/libpithcc.a osdep/libpineosd.a ../c-client/c-client.a
> /usr/local/lib/libldap.so -lcrypto -ltinfo /usr/local/lib/liblber.so -lssl
> - Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib
> ../c-client/c-client.a(osdep.o)(.text+0x68a1): In function
> `ssl_onceonlyinit':
> /usr/ports/mail/alpine/work/alpine-2.00/imap/c-client/osdep.c:335: warning:
> warning: tmpnam() possibly used unsafely; consider using mkstemp()
> after.o(.text+0x36d): In function `start_after':
> /usr/ports/mail/alpine/work/alpine-2.00/alpine/after.c:77: undefined
> reference to `pthread_create'

David, given that all your errors posted in the last 24 hours point to a 
messed up pth/pthread installation I suggest you look into that before trying 
to build more ports.

The shell archive attached should compile and run cleanly, by typing "make 
run" once extracted. If it does not, then even the base compiler/linker cannot 
find pthread, which is not a good thing, but at least you know where to start 
(reinstall world and possibly kernel).
-- 
Mel
-------------- next part --------------
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	threadtest/BSDmakefile
#	threadtest/thrtest.c
#
echo x - threadtest/BSDmakefile
sed 's/^X//' >threadtest/BSDmakefile << 'd68d3d39019a946b87b33afe0474b0cc'
XPROG=thrtest
XNO_MAN=yes
XLDFLAGS+=-pthread
X
Xrun: ${PROG}
X	${.OBJDIR}/${PROG}
X
X.include <bsd.prog.mk>
d68d3d39019a946b87b33afe0474b0cc
echo x - threadtest/thrtest.c
sed 's/^X//' >threadtest/thrtest.c << '22cb4804387108296f45df39552f86e9'
X#include <pthread.h>
X#include <stdlib.h>
X#include <stdio.h>
X#include <err.h>
X
Xvoid *thr_main(void *priv);
X
Xint main(int argc, char **argv)
X{
X	pthread_t tid[5];
X	int i, res;
X
X	printf("main\n");
X
X	for(i=0; i<5; i++)
X	{
X		res = pthread_create(&tid[i], NULL, thr_main, NULL);
X		if( res )
X			errc(EXIT_FAILURE, res, "pthread_create");
X	}
X	for(i=0; i<5; i++)
X	{
X		int *ex;
X
X		ex = malloc(sizeof(int));
X		if( !ex )
X			err(EXIT_FAILURE, "malloc: %zu bytes", sizeof(int));
X		res = pthread_join(tid[i], (void*)&ex);
X		if( res )
X			errc(EXIT_FAILURE, res, "pthread_join");
X	}
X
X	return (0);
X}
X
Xvoid *thr_main(void *priv)
X{
X	printf("Thread tid %u\n", (unsigned int)pthread_self());
X
X	return (priv);
X}
22cb4804387108296f45df39552f86e9
exit



More information about the freebsd-ports mailing list