[Home]

Summary:ASTERISK-16066: [patch] pthread_rwlock_timedwrlock autoconf test is wrong
Reporter:Stuart Henderson (stuarth)Labels:
Date Opened:2010-05-06 18:51:15Date Closed:2010-05-07 15:44:52
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/BuildSystem
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20100507__issue17303__1.6.2__everything.diff.txt
( 1) 20100507__issue17303__1.6.2.diff.txt
( 2) 20100507__issue17303__everything.diff.txt
( 3) 20100507__issue17303.diff.txt
( 4) centos.txt
( 5) openbsd.txt
Description:The pthread_rwlock_timedwrlock() test doesn't link with the thread library, so the test always fails (confirmed on OpenBSD -current, which now has this function, and Linux).

****** STEPS TO REPRODUCE ******

./configure
...
checking for pthread_rwlock_timedwrlock() in pthread.h... no

Minimal fix is to do something like

saved_LIBS="${LIBS}"
LIBS="${PTHREAD_CFLAGS}"
...
LIBS="${saved_LIBS}"

around this test, but more might be wanted.
Comments:By: Paul Belanger (pabelanger) 2010-05-06 20:00:49

Attach your output from ./configure, to help triage the issue.

By: Stuart Henderson (stuarth) 2010-05-07 02:47:23

I've attached configure output from OpenBSD and centos, and the relevant part of config.log.

By: Tilghman Lesher (tilghman) 2010-05-07 11:23:28

Uploaded patch.  You should test the __1.6.2__everything patch.  The others are simply the sources to the generated files.

By: Stuart Henderson (stuarth) 2010-05-07 15:14:38

Thanks, your diff works.

By: Digium Subversion (svnbot) 2010-05-07 15:35:18

Repository: asterisk
Revision: 261913

U   trunk/configure
U   trunk/configure.ac
U   trunk/include/asterisk/autoconfig.h.in

------------------------------------------------------------------------
r261913 | tilghman | 2010-05-07 15:35:18 -0500 (Fri, 07 May 2010) | 14 lines

Use the detected pthread building flags in every place, instead of hardcoding -lpthread.

We nicely detect the right flags on each system for building Asterisk with
pthreads, then ignore it for every other build option that requires us to
build with pthreads.  This caused some items to return a false negative.
Also cleanup some minor naming issues that caused "library library" redundancy
in the output.

(closes issue ASTERISK-16066)
Reported by: stuarth
Patches:
      20100507__issue17303.diff.txt uploaded by tilghman (license 14)
Tested by: stuarth

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=261913

By: Digium Subversion (svnbot) 2010-05-07 15:42:38

Repository: asterisk
Revision: 261914

_U  branches/1.6.0/
U   branches/1.6.0/configure
U   branches/1.6.0/configure.ac
U   branches/1.6.0/include/asterisk/autoconfig.h.in

------------------------------------------------------------------------
r261914 | tilghman | 2010-05-07 15:42:37 -0500 (Fri, 07 May 2010) | 21 lines

Merged revisions 261913 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r261913 | tilghman | 2010-05-07 15:35:17 -0500 (Fri, 07 May 2010) | 14 lines
 
 Use the detected pthread building flags in every place, instead of hardcoding -lpthread.
 
 We nicely detect the right flags on each system for building Asterisk with
 pthreads, then ignore it for every other build option that requires us to
 build with pthreads.  This caused some items to return a false negative.
 Also cleanup some minor naming issues that caused "library library" redundancy
 in the output.
 
 (closes issue ASTERISK-16066)
  Reported by: stuarth
  Patches:
        20100507__issue17303.diff.txt uploaded by tilghman (license 14)
  Tested by: stuarth
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=261914

By: Digium Subversion (svnbot) 2010-05-07 15:43:31

Repository: asterisk
Revision: 261915

_U  branches/1.6.1/
U   branches/1.6.1/configure
U   branches/1.6.1/configure.ac
U   branches/1.6.1/include/asterisk/autoconfig.h.in

------------------------------------------------------------------------
r261915 | tilghman | 2010-05-07 15:43:31 -0500 (Fri, 07 May 2010) | 21 lines

Merged revisions 261913 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r261913 | tilghman | 2010-05-07 15:35:17 -0500 (Fri, 07 May 2010) | 14 lines
 
 Use the detected pthread building flags in every place, instead of hardcoding -lpthread.
 
 We nicely detect the right flags on each system for building Asterisk with
 pthreads, then ignore it for every other build option that requires us to
 build with pthreads.  This caused some items to return a false negative.
 Also cleanup some minor naming issues that caused "library library" redundancy
 in the output.
 
 (closes issue ASTERISK-16066)
  Reported by: stuarth
  Patches:
        20100507__issue17303.diff.txt uploaded by tilghman (license 14)
  Tested by: stuarth
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=261915

By: Digium Subversion (svnbot) 2010-05-07 15:44:51

Repository: asterisk
Revision: 261916

_U  branches/1.6.2/
U   branches/1.6.2/configure
U   branches/1.6.2/configure.ac
U   branches/1.6.2/include/asterisk/autoconfig.h.in

------------------------------------------------------------------------
r261916 | tilghman | 2010-05-07 15:44:51 -0500 (Fri, 07 May 2010) | 21 lines

Merged revisions 261913 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r261913 | tilghman | 2010-05-07 15:35:17 -0500 (Fri, 07 May 2010) | 14 lines
 
 Use the detected pthread building flags in every place, instead of hardcoding -lpthread.
 
 We nicely detect the right flags on each system for building Asterisk with
 pthreads, then ignore it for every other build option that requires us to
 build with pthreads.  This caused some items to return a false negative.
 Also cleanup some minor naming issues that caused "library library" redundancy
 in the output.
 
 (closes issue ASTERISK-16066)
  Reported by: stuarth
  Patches:
        20100507__issue17303.diff.txt uploaded by tilghman (license 14)
  Tested by: stuarth
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=261916