bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autoconf 2.52 vs Solaris 2.6 AC_SYS_LARGEFILE problems


From: Mark D. Baushke
Subject: Re: autoconf 2.52 vs Solaris 2.6 AC_SYS_LARGEFILE problems
Date: Fri, 30 Nov 2001 11:25:42 -0800

Hi Paul,

Paul wrote:
>GCC 2.7.2.3 can compile "hello world" programs on Solaris 2.6.  But it
>cannot compile many important programs, and I would include OpenSSH in
>that list.  You must upgrade to GCC 2.8 or later.  I suggest GCC
>2.95.3.  You can also use GCC 3.0.2 if you're feeling more
>adventurous.

Okay, I fetched and bootstrapped gcc-2.95.3 and now the example
program compiles, but it does not really work...

Paul wrote:
>and here's the behavior I get when running the program:
>
>  $ ulimit -f 4294967296
>  $ ./a.out 
>  file size limit is 4398046511104


% /usr/local/packages/gcc/gcc-2.95.3/bin/gcc -g eggert.c 
% ./a.out
file size limit is -3
% /usr/bin/ulimit -f 4294967296
/usr/bin/ulimit[8]: ulimit: exceeds allowable limit
% sudo -s
# ulimit -f 4294967296
# ulimit
0
# man ulimit
Reformatting page.  Wait...File Size Limit Exceeded - core dumped
sys(cd /usr/man; tbl /usr/man/man1/limit.1 |nroff -u0 -Tlp -man - | col -x > 
/tmp/mpMiaqK2) fail!
 aborted (sorry)
# exit
% cat eggert.c
#define _FILE_OFFSET_BITS 64
#include <sys/resource.h>
#include <stdio.h>
int main()
{
  struct rlimit r;
  if (getrlimit (RLIMIT_FSIZE, &r) != 0)
    perror ("getrlimit");
   printf ("file size limit is %lld\n", r.rlim_cur);
  return 0;
}
% gdb a.out
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (sparc-sun-solaris2.6), 
Copyright 1996 Free Software Foundation, Inc...
(gdb) b main
Breakpoint 1 at 0x108cc: file eggert.c, line 7.
(gdb) run
Starting program: /users1/mdb/a.out 
warning: Unable to find dynamic linker breakpoint function.
warning: GDB will be unable to debug shared library initializers
warning: and track explicitly loaded dynamic code.

Breakpoint 1, main () at eggert.c:7
7         if (getrlimit (RLIMIT_FSIZE, &r) != 0)
(gdb) n
9          printf ("file size limit is %lld\n", r.rlim_cur);
(gdb) p r
$1 = {rlim_cur = 0xfffffffffffffffd, rlim_max = 0xfffffffffffffffd}
(gdb) q
The program is running.  Quit anyway (and kill it)? (y or n) y
% 

So, bring things back to the orginal point, it remains unclear to me
that big file support is really working on Solaris 2.6 when autoconf
adds the '#define _FILE_OFFSET_BITS 64'

        Thanks,
        -- Mark




reply via email to

[Prev in Thread] Current Thread [Next in Thread]