This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: lseek.c location


On Wed, Oct 7, 2009 at 3:49 AM, James Edwards <jedwards@cse.psu.edu> wrote:
> When trying to compile glibc (2.1.0.1), I get hung up on trying to
> compile lseek.o:
>
> 373386 ? ? ? ? ?No need to remake target `/src/gnu/glibc-build/io/write.o'.
> 373387 ? ? ? ? ?Considering target file `/src/gnu/glibc-build/io/lseek.o'.
> 373388 ? ? ? ? ? ?Considering target file `lseek.c'.
> 373389 ? ? ? ? ? ? File `lseek.c' does not exist.
> 373390 ? ? ? ? ? ? Finished prerequisites of target file `lseek.c'.
> 373391 ? ? ? ? ? ?Must remake target `lseek.c'.
> make[2]: *** No rule to make target `lseek.c', needed by
> `/src/gnu/glibc-build/io/lseek.o'. ?Stop.
> 373392 ?make[2]: Leaving directory `/src/gnu/glibc-2.10.1/io'
> make[1]: *** [io/subdir_lib] Error 2
> make: *** [all] Error 2
> 373393 ?make[1]: Leaving directory `/src/gnu/glibc-2.10.1'
>
> Note the io/ subdirectory. ?The thing is, lseek.c isn't in the io/
> subdirectory, it is in the misc/ subdirectory. ?The Makefile in the
> io/ subdirectory references both lseek and lseek64 (line 41), yet
> while lseek64.c is in io/, lseek.c is in misc/. ?Further, the Makefile
> in the misc/ subdirectory doesn't mention lseek.
>
> So not knowing better, I moved lseek.c from misc/ to io/ and re-ran
> make -- it got much further. ?I checked my tarball and it matched what
> was available on gnu.org -- I checked a few other source versions and
> it exists much earlier ( I tried 2.6.1 ), so there must be some reason
> for the file being there that I don't understand.
>
> Assuming I screwed up somewhere (a safe assumption, really), would
> this file compile without problems had I done everything correctly?

The lseek.c in the misc/ subdirectory is an empty stub, intended to be
used on machines that don't implement lseek.

The lseek64.c in the io/ subdirectory is an empty stub, intended to be
used on machien that don't implement lseek64.

The file io/lseek.o is built by processing sysdeps/unix/syscalls.list
and generating an assembly wrapper that calls the lseek syscall.

Your build has gone wrong somewhere.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]