Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Nov 1998 19:15:12 -0800
From:      "George W. Dinolt" <george.w.dinolt@lmco.com>
To:        Robert Schulhof <rrs@LMI.Net>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: libc_r link error
Message-ID:  <36450CC0.7F05F71A@lmco.com>
References:  <199811072258.OAA22536@badlans.lanminds.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36450CC0.7F05F71A>