Monday, November 30, 2009

[nslu2-linux] Re: Problem with perl and large files

 

optware perl is maintained collectively. Initially gda and I made it cross compilable, and I was responsible for adding a few targets. Recently I've been busy with lot of other things, so have not been able to spend as much time on optware as I'd like.

Perl is not the easiest thing to cross compile and maintain.

Regarding this particular issue, I can only say that as far as I can see,

$ grep =64 sources/perl/5.10/config.sh-cs08q1armel
ccflags='-fno-strict-aliasing -pipe -I/opt/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
cppsymbols='_FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=200112L _POSIX_SOURCE=1 __APCS_32__=1 __ARMEL__=1 __ARM_ARCH_4T__=1 __ARM_EABI__=1 __CHAR_BIT__=8 ... unix=1'

I have to look at the build log to see if the option is being applied. Anyone is welcome to dig deeper and find the issue. We have too many issue finders and too few problem solvers.

-Brian

--- In nslu2-linux@yahoogroups.com, "joerg_kuehne" <joerg_kuehne@...> wrote:
>
> Hi,
>
> I hope, that anyone in this group can give me a hint about the maintainer of the perl ipkg-package of the cs08q1armel branch.
> I found an issue with the pert stat() function, that fails for files larger than 2GByte on my QNAP TS119. This function is used from the rsnapshot-diff script to get all informations about a certain file for comparing different backup snapshots. It seems that perl is compiled without 64Bit support for file sizes, with 32Bit one can only store size numbers up to 2GByte. Here a little test script to verify this issue.
>
> test.pl
> --- cut here ---
> #! /opt/bin/perl
>
> @mystat = stat($ARGV[0]);
> print "$ARGV[0]: file size: $mystat[7]\n";
> --- cut here ---
>
> Run test.pl FILE
>
> If file is smaller than 2GByte it will display the right file size, if it is larger then the file size will be empty caused by the failed stat().
> Can anyone tell me why perl is compiled without the
> -D_FILE_OFFSET_BITS=64 option? Is it a restriction of the ARM architecture or glibc? Or has the usage of this option unwanted side effects or was it simply forgotten?
> Thank you in advance
>
> Jörg
>

__._,_.___
.

__,_._,___

No comments:

Post a Comment