From owner-freebsd-current Sat Nov 7 19:15:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA19096 for freebsd-current-outgoing; Sat, 7 Nov 1998 19:15:15 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from mailgw1.lmco.com (mailgw1.lmco.com [192.31.106.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA19089 for ; Sat, 7 Nov 1998 19:15:14 -0800 (PST) (envelope-from george.w.dinolt@lmco.com) Received: from emss02g01.ems.lmco.com (relay2.ems.lmco.com [198.7.15.39]) by mailgw1.lmco.com (8.8.8/8.8.8) with ESMTP id UAA27618; Sat, 7 Nov 1998 20:15:00 -0700 (MST) Received: from wdl1.wdl.lmco.com ([137.249.32.1]) by lmco.com (PMDF V5.1-10 #20543) with SMTP id <0F23003NE2D0VE@lmco.com>; Sat, 7 Nov 1998 20:15:00 -0700 (MST) Received: from lmco.com by wdl1.wdl.lmco.com (SMI-8.6/WDL-5.0) id TAA04678; Sat, 07 Nov 1998 19:14:57 -0800 Date: Sat, 07 Nov 1998 19:15:12 -0800 From: "George W. Dinolt" Subject: Re: libc_r link error To: Robert Schulhof Cc: freebsd-current@FreeBSD.ORG Message-id: <36450CC0.7F05F71A@lmco.com> Organization: Lockheed Martin Western Development Labs MIME-version: 1.0 X-Mailer: Mozilla 4.07 [en] (X11; I; FreeBSD 3.0-CURRENT i386) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit References: <199811072258.OAA22536@badlans.lanminds.com> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Robert Schulhof wrote: > > Hi, > > I'm having problems linking to libc_r using cc/egcs1.1 with a current as of > today version of the library. I get an unresolved symbol SYS_sendfile which > I can't track down. I can't find a reference to sendfile() in > any of the library source code, except for a man page > > /usr/lib/libc_r.so: undefined reference to `SYS_sendfile' > > Thanks! > > Rob > > > Robert Schulhof > UNIX System Administrator > LanMinds Internet. (LMI Net) > rrs@lmi.net > http://www.lmi.net > (510) 843-6389 VOX > (510) 843-6390 FAX > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message I can confirm that the problem is there. It happend for me when I tried to execute python, which is linked with libc_r. It arose for me yesterday when I recompiled libc_r using several ctm updates (src-cur.360[0-9].gz). A little investigation showed that sendfile.S is a generated file, that is it "defines" (I am not sure what the correct word is) a system call. More investigation showed that SYS_sendfile is defined in /usr/src/sys/sys/syscall.h as #define SYS_sendfile 336 so, in theory, it should not appear as an undefined symbol. The following happened to me which may explain the problem. I recompiled libc_r by just cd'ing to the libc_r directory and typing make. (Probably not a good thing to do.) cc referenced the version of syscall.h in /usr/include/sys rather than the one in /usr/src/sys/sys. The version in /usr/include/sys had not been updated with the new define. (In fact, the update was to syscalls.master in /usr/src/sys/kern. syscalls.h should be generated from that master file. In my case, though, it was updated through a ctm-file). The upshot of all this (pedantry) is that updating syscall.h in /usr/include/sys and recompiling libc_r (after removing the offending files) fixed the problem. Of course the "right" thing to do is a new "make world". That will happen tonight after I go to bed. This does bring up some interesting make dependencies problems, but I am not expert enough to even consider what should be done here. (Should the makefiles be set up to reference /usr/src/sys/sys/syscall.h rather than the one in /usr/include/sys?) Hope this helps. George Dinolt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message