Subject: Re: FreeBSD and "Spinlock called when not threaded" and arts and
To: Juan RP <juan@xtrarom.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 05/04/2005 10:44:45
On Wed, 4 May 2005, Juan RP wrote:
> > But the pkgsrc/glib2/Makefile says:
> >
> > # FreeBSD fix for libgthread:
> > # Be sure libgthread is linked to the threaded library (libc_r), otherwise
> > # -pthread is added and this won't work with libraries, only executable
> > # binaries.
> >
> > Any ideas about this?
> >
> > Is the above FreeBSD fix applicable for FreeBSD 5.3 or is it for FreeBSD
> > -current or FreeBSD 4.x??
>
> This was necessary for FreeBSD >= 5.2 if I remember correctly, maybe
> libpthread has to be used again?
>
> (Haven't used FreeBSD in long time).
I commented out your FreeBSD patching for threads and reinstalled glib2
and then arts finished compiling fine.
I am looking closer at FreeBSD. FreeBSD does with the ports:
.if ${OSVERSION} < 500016
PTHREAD_CFLAGS?= -D_THREAD_SAFE
PTHREAD_LIBS?= -pthread
.elif ${OSVERSION} < 502102
PTHREAD_CFLAGS?= -D_THREAD_SAFE
PTHREAD_LIBS?= -lc_r
.else
PTHREAD_CFLAGS?=
PTHREAD_LIBS?= -pthread
.endif
where OSVERSION is "sysctl -n kern.osreldate"
I think that pkgsrc/mk/pthread.builtin.mk or
pkgsrc/mk/pthread.buildlink3.mk can be improved so the workaround in
devel/glib2/Makefile can be removed.
Jeremy C. Reed
BSD News, BSD tutorials, BSD links
http://www.bsdnewsletter.com/