Maurice Lombardi wrote:
Running the gpc test suite results in only one failure: y2k.pas (which is new). The problem is with the function sleep: Has this function been changed recently ? (We have been discussing at length of various delay functions).
Nope. (I haven't gotten around to doing anything about the delay issue yet, and AFAIUI, it doesn't affect sleep (whole seconds), anyway.)
What fails exactly? The errors given below seem quite unrelated to anything this test program does. Do they also occur when running the test suite, or are there other problems then?
To check I have also installed your abovementioned gpc2953b.zip and tried to compile y2k.pas. It fails with:
C:\djgpp\gnu\gcc-2.953\gcc\p\test>gpc y2k.pas -o y2k.exe --autobuild -D__BP_UNPO RTABLE_ROUTINES__ c:/djgpp/lib/gcc-lib/djgpp/2.953/libgpc.a(file.o)(.text+0x49d):file.c: undefined reference to `lstat' c:/djgpp/lib/gcc-lib/djgpp/2.953/libgpc.a(file.o)(.text+0x18e2):file.c: undefine d reference to `llseek' c:/djgpp/lib/gcc-lib/djgpp/2.953/libgpc.a(file.o)(.text+0x266b):file.c: undefine d reference to `llseek' c:/djgpp/lib/gcc-lib/djgpp/2.953/libgpc.a(file.o)(.text+0x26a9):file.c: undefine d reference to `llseek' c:/djgpp/lib/gcc-lib/djgpp/2.953/libgpc.a(file.o)(.text+0x26e8):file.c: undefine d reference to `llseek' c:/djgpp/lib/gcc-lib/djgpp/2.953/libgpc.a(file.o)(.text+0x2802):file.c: undefine d reference to `llseek' collect2: ld returned 1 exit status
Only with this test program? This would seem quite strange. The routines referenced by file.o in libgpc.a don't depend on the program being compiled, and file.o is used in any GPC program, so if there are really undefined references, they should occur with any program.
It is a config problem. In my native building tree I find in gcc/p/rts/rts-config.h
<snip> /* Define if the llseek function is declared in <unistd.h>. */ /* #undef LLSEEK_DECLARED */ <snip> /* Define if you have the lstat function. */ /* #undef HAVE_LSTAT */ <snip> and this is correct when looking to my %DJGPP%/include files.
Yes (and HAVE_LLSEEK should also be unset).
From the RTS sources, it seems quite clear that lstat and llseek
aren't called unless these symbols are defined. Maybe something went wrong when you built GPC? (Some foreign config file or config cache lying around, I don't know... Do you build GPC for several platforms?)
Oh wait... this was a GPC binary built by Andris, right? Maybe he's used a newer DJGPP version which does have these functions, while yours (and mine) doesn't. This could explain the problem. (This should be reflected in the settings rts-config.inc in this binary.)
I don't follow DJGPP releases too closely, so I don't know. If it's a new official DJGPP release, it just means that this GPC binary requires that release. Otherwise, if it's a DJGPP developer version, a public GPC binary should probably not be built against it...
Frank