On Wed, Jun 02, 2004 at 12:08:36PM +0100, Edd wrote:

> Couple of quick queries.
> 
> a) How might i find my OSVERSION. I have tried echo $OSVERSION.

The standard way of doing this is:

    % uname -r

There's also:

    % sysctl kern.osreldate

or in the special case of dealing with ports, you can just run:

    % make -VOSVERSION

in any port directory.
 
> b) I am trying to compile ardour (manually) . It tells me that I need
> posix threads support. What do I need to install?

The answer depends on what version of FreeBSD you are running.

For 4.x: add -D_THREAD_SAFE to the compile flags when compiling the
code, and add -pthread at the linking stage.

For 5.x at or earlier than about 5.2 use -D_THREAD_SAFE on
compilation, but add -lc_r to the link flags.

For 5.x after that, no extra compile flags are necessary, but you
should add -lpthreads to the link line.

The precise bounduaries where those sets of flags change can be
obtained from /usr/port/Mk/bsd.ports.mk:

    .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?=          -lpthread
    .endif

        Cheers,

        Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

Attachment: pgpqXoZ6Tee3I.pgp
Description: PGP signature

Reply via email to