Bug 41251 - libc_r broken. syscall open fails.
Summary: libc_r broken. syscall open fails.
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 4.6-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: mini
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-02 01:10 UTC by Charlie &
Modified: 2002-08-02 05:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie & 2002-08-02 01:10:01 UTC
Problem with libc_r.
Compiling using gcc with the -pthread switch yields the following error:

wade@archeron-~:gcc -pthread test.c 
/usr/lib/libc_r.so: undefined reference to `__sys_close'
wade@archeron-~:
	

I have not been able to repeat this problem on my next-newest build:
	FreeBSD ylw.noc.dbitech.bc.ca 4.6-STABLE FreeBSD 4.6-STABLE #0: Mon Jul 15 08:08:23 PDT 2002     root@ylw.noc.dbitech.bc.ca:/usr/src/sys/compile/WORKSTATION  i386

Fix: 

I have verified this on 3 boxen all cvsup'd today.
Compile the following program with the -pthread switch:

  test.c
----------

main(){}

	

Do not compile re-entrant programs.
Comment 1 Joe Marcus Clarke freebsd_committer freebsd_triage 2002-08-02 03:18:21 UTC
Responsible Changed
From-To: freebsd-bugs->	 robert

Over to committer that touched uthread_dup2.c last.  I believe the problem 
can be resolved by changing line 74 of uthread_dup2.c to read: 

_thread_sys_close(ret);
Comment 2 mini freebsd_committer freebsd_triage 2002-08-02 04:57:12 UTC
Responsible Changed
From-To: robert->mini

I'm in the middle of this code right now; I'll fix this.
Comment 3 mini freebsd_committer freebsd_triage 2002-08-02 05:19:58 UTC
State Changed
From-To: open->closed

Fixed.