Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Mar 2014 22:27:46 -0700 (PDT)
From:      Jeremy Chadwick <jdc@koitsu.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/187472: lang/ruby21 -- configure has mistakes/errors relating to pthread detection
Message-ID:  <20140312052746.BB0AD73A3B@icarus.home.lan>
Resent-Message-ID: <201403120530.s2C5U0AP076020@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         187472
>Category:       ports
>Synopsis:       lang/ruby21 -- configure has mistakes/errors relating to pthread detection
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 12 05:30:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Jeremy Chadwick
>Release:        FreeBSD 9.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD icarus.home.lan 9.2-STABLE FreeBSD 9.2-STABLE #0 r262477: Tue Feb 25 01:04:30 PST 2014 root@icarus.home.lan:/usr/obj/usr/src/sys/X7SBA_RELENG_9_amd64 amd64
>Description:
	This may affect other ruby ports (ruby19, ruby20), I haven't checked.

	During configure-time, the following lines are shown (and easily
	missed because they scroll by so fast):

checking for pthread_kill in -lpthread... yes
./configure: pthread,: not found
checking for pthread_np.h... yes

	The problem appears to be around line 19613 of the configure script (not
	configure.in, I haven't reviewed that):

19608     if test x"$rb_with_pthread" = xyes; then
19609         $as_echo "#define _REENTRANT 1" >>confdefs.h
19610
19611         $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
19612
19613         pthread,  MAINLIBS="-pthread $MAINLIBS",
19614         $as_echo "#define HAVE_LIBPTHREAD 1" >>confdefs.h

	This looks quite broken.  Since autoconf is used, the "source" for
	this comes from configure.in.  The code for that:

2431     if test x"$rb_with_pthread" = xyes; then
2432         AC_DEFINE(_REENTRANT)
2433         AC_DEFINE(_THREAD_SAFE)
2434         [pthread],  [MAINLIBS="-pthread $MAINLIBS"],
2435         AC_DEFINE(HAVE_LIBPTHREAD)

	Line 2434 shown above comes directly from files/patch-configure.in,
	so it appears to me someone needs to investigate the following:

	1) If files/patch-configure.in is TRULY doing the correct thing
	for ruby21 (and possibly the other ports) -- or if it's even
	necessary (someone may want to talk to the Ruby folks), and,

	2) Examination of post-patch in Makefile to make sure it's doing the
	right thing as well.

	I tried looking at the SVN annotations for this port, but the commit
	lfor the section where post-patch is is so old that it precedes use
	of Subversion thus the commit reason is unknown.
>How-To-Repeat:
	See above.
>Fix:
	Correct fix unknown at this time.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140312052746.BB0AD73A3B>