bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: build of GNU gettext-0.16.1 with posix-threads fails on Solaris 2.6


From: Bruno Haible
Subject: Re: build of GNU gettext-0.16.1 with posix-threads fails on Solaris 2.6
Date: Fri, 13 Apr 2007 14:18:58 +0200
User-agent: KMail/1.5.4

Hi,

Arto C. Nirkko <address@hidden> wrote:
> 
> on Solaris 2.6, build of gettext-0.16.1
> fails when using the default posix thread model (pthread),
> see output below.
> ...
> ...
> gcc -O3 -mcpu=supersparc -mno-app-regs -o test-lock test-lock.o lock.o  
> -lpthread
> test-lock.o(.text+0x310): In function `lock_mutator_thread':
> : undefined reference to `sched_yield'
> ...
> ...
> collect2: ld returned 1 exit status
> gmake[3]: *** [test-lock] Error 1
> gmake[3]: Leaving directory `/build/gettext-0.16.1/gettext-runtime/tests'

Thanks for reporting this. I'm applying the attached fix.

> Maybe --enable-threads=solaris should be the default on
> this platform? (once the tls.c bugs are fixed ;-)

I don't think this is needed. The POSIX API is the more modern API; it should
be used whenever possible. The Solaris threads are useful only for older
platforms (Solaris 2.3/2.4, I think).

Bruno


2007-04-13  Bruno Haible  <address@hidden>

        * configure.ac: For LIBSCHED, try also -lposix4.
        Reported by Arto C. Nirkko <address@hidden>.

*** gettext-runtime/configure.ac        26 Oct 2006 11:50:38 -0000      1.42
--- gettext-runtime/configure.ac        13 Apr 2007 12:14:25 -0000
***************
*** 1,5 ****
  dnl Configuration for the gettext-runtime directory of GNU gettext
! dnl Copyright (C) 1995-1999, 2000-2006 Free Software Foundation, Inc.
  dnl
  dnl This program is free software; you can redistribute it and/or modify
  dnl it under the terms of the GNU General Public License as published by
--- 1,5 ----
  dnl Configuration for the gettext-runtime directory of GNU gettext
! dnl Copyright (C) 1995-1999, 2000-2007 Free Software Foundation, Inc.
  dnl
  dnl This program is free software; you can redistribute it and/or modify
  dnl it under the terms of the GNU General Public License as published by
***************
*** 108,114 ****
  dnl On some systems, sched_yield is in librt, rather than in libpthread.
  LIBSCHED=
  if test $gl_threads_api = posix; then
!   AC_CHECK_LIB(rt, sched_yield, [LIBSCHED=-lrt])
  fi
  AC_SUBST([LIBSCHED])
  
--- 108,117 ----
  dnl On some systems, sched_yield is in librt, rather than in libpthread.
  LIBSCHED=
  if test $gl_threads_api = posix; then
!   dnl Solaris has sched_yield in librt, not in libpthread or libc.
!   AC_CHECK_LIB(rt, sched_yield, [LIBSCHED=-lrt],
!     [dnl Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt.
!      AC_CHECK_LIB(posix4, sched_yield, [LIBSCHED=-lposix4])])
  fi
  AC_SUBST([LIBSCHED])
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]