From jon@spock.org  Tue Nov 28 13:28:49 2000
Return-Path: <jon@spock.org>
Received: from spock.org (cm-24-169-11-24.nycap.rr.com [24.169.11.24])
	by hub.freebsd.org (Postfix) with ESMTP id 6736237B69C
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 28 Nov 2000 13:28:48 -0800 (PST)
Received: (from jon@localhost)
	by spock.org  serial EF600Q3T-B7F;
	Tue, 28 Nov 2000 16:28:47 -0500 (EST)
	(envelope-from jon)
Message-Id: <200011282128.eASLSlj91789@spock.org>
Date: Tue, 28 Nov 2000 16:28:47 -0500 (EST)
From: jon@freebsd.org
Sender: jon@spock.org
Reply-To: jon@spock.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: threaded perl incorrectly suggests -lc when using embedded perl
X-Send-Pr-Version: 3.2

>Number:         23162
>Category:       misc
>Synopsis:       threaded perl incorrectly suggests -lc when using embedded perl
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 28 13:30:01 PST 2000
>Closed-Date:    Thu May 31 19:49:54 PDT 2001
>Last-Modified:  Thu May 31 19:50:05 PDT 2001
>Originator:     Jonathan Chen
>Release:        -STABLE and -CURRENT
>Organization:
>Environment:

	

>Description:

When perl with thread support is enabled, using "perl -MExtUtils::Embed
-e ldopts" outputs a suggestion for linker options with -lc as one of
the libraries. This is incorrect.  Linking stuff with both -pthreads and
-lc results in the program segfaulting when dup2() (and I'm sure other
functions as well) is invoked.

>How-To-Repeat:

make world with PERL_THREADED enabled, then make the news/inn
port.  innd when started will segfault while doing a dup2().

>Fix:

remove the -lc from the libs= line in the files
src/gnu/usr.bin/perl/libperl/config.SH-threads*
Or, alternatively, change -lc to -lc_r

(Also, note that the "Target system" comment is slightly out of date for
many config files in that directory on both current and stable.  Perhaps
it'll be easy to just say FreeBSD?)

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: dd 
State-Changed-When: Thu May 31 19:49:54 PDT 2001 
State-Changed-Why:  
Threaded perl is no longer supported. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=23162 
>Unformatted:
