Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open and -e fail w/largefiles (>2G) on solaris 2.6 x86 #176

Closed
p5pRT opened this issue Jul 9, 1999 · 3 comments
Closed

open and -e fail w/largefiles (>2G) on solaris 2.6 x86 #176

p5pRT opened this issue Jul 9, 1999 · 3 comments

Comments

@p5pRT
Copy link
Collaborator

@p5pRT p5pRT commented Jul 9, 1999

Migrated from rt.perl.org#981 (status was 'resolved')

Searchable as RT981$

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Jul 9, 1999

From patrick@dante.alexa.com

Perl cannot open files greater than 2G in size on Solaris 2.6 x86 (in other words, Perl is not largefile compliant). Specifically​:

1) open FH, "largefile" fails to open a file

2) -e/-f/-s fails to detect the file (reports FALSE when should report TRUE)

in the examples below, the files "large" and "small" are​:

ls -l
-rw-r--r-- 1 patrick staff 2150684158 Jun 24 17​:42 large
-rw-r--r-- 1 patrick staff 16131861 Jul 7 15​:13 small

open summary and code sample​:

perl
open FH, "large" or die "$!";

Value too large for defined data type at - line 1.

-e/-f/-s summary and code examples​:

The file tests (-f, -e, -s, etc) are not large file compliant and return FALSE when given 2G+ files. These are the operators in Perl to test for existance (-e), non-zero size (-s), etc.

Here's an example​:

Let's test for the existance of a 2G+ file using the "-e" command​:

First, with large (a >2G file)

perl -e 'if (-e qq#large#) {print qq#IT EXISTS\n#} else {print qq#IT DOES NOT EXIST\n#}'
IT DOES NOT EXIST

And now, on small (a 16M file)​:

perl -e 'if (-e qq#small#) {print qq#IT EXISTS\n#} else {print qq#IT DOES NOT EXIST\n#}'
IT EXISTS

Perl Info


Site configuration information for perl 5.00502:

Configured by root at Sat Nov  7 01:22:21 PST 1998.

Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration:
  Platform:
    osname=solaris, osvers=2.6, archname=i86pc-solaris
    uname='sunos liza.alexa.com 5.6 generic_105182-05 i86pc i386 i86pc '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='gcc', optimize='-O', gccversion=2.8.1
    cppflags='-I/usr/local/include'
    ccflags ='-I/usr/local/include'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    alignbytes=4, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /shlib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
    libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'

Locally applied patches:
    


@INC for perl 5.00502:
    /usr/local/lib/perl5/5.00502/i86pc-solaris
    /usr/local/lib/perl5/5.00502
    /usr/local/lib/perl5/site_perl/5.005/i86pc-solaris
    /usr/local/lib/perl5/site_perl/5.005
    .


Environment for perl 5.00502:
    HOME=/home/patrick
    LANG (unset)
    LD_LIBRARY_PATH=/usr/openwin/lib
    LOGDIR (unset)
    PATH=/home/patrick/bin/SunOS_56_i386:/home/patrick/alexa/platform/SunOS_56_i386/bin:/usr/local/bin:/usr/bin:/usr/dt/bin:/bin:/usr/sbin:/usr/ccs/bin:/usr/openwin/bin:/usr/ucb:/opt/SUNWspro/bin:/home/patrick/bin:/export/data/dad-archive/bin:.:/home/patrick/alexa/bin
    PERL_BADLANG (unset)
    SHELL=/usr/local/bin/tcsh

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Sep 1, 1999

From @jhi

Patrick Tufts writes​:

This is a bug report for perl from patrick@​alexa.com,
generated with the help of perlbug 1.26 running under perl 5.00502.

-----------------------------------------------------------------
[Please enter your report here]

Perl cannot open files greater than 2G in size on Solaris 2.6 x86 (in other words, Perl is not largefile compliant). Specifically​:

1) open FH, "largefile" fails to open a file

2) -e/-f/-s fails to detect the file (reports FALSE when should report TRUE)

Perl 5.6 should be aware of large files but only iff separately Configured
with -Duse64bits.

--
$jhi++; # http​://www.iki.fi/jhi/
  # There is this special biologist word we use for 'stable'.
  # It is 'dead'. -- Jack Cohen

@p5pRT p5pRT closed this Nov 28, 2003
@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Nov 28, 2003

From The RT System itself

see

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.