On Thu, Aug 11, 2011 at 11:58:29PM +0300, Octavian Rasnita wrote:
> I have tried to build it under Windows XP, using Perl 5.10.1 and Visual
> Studio 6 but it gave the error below on `perl build` phase.
Visual Studio 6 was released in 1998. Though some people still use it because
of the MSCVRT.DLL issue, it's not easy to support and I don't currently have
access to it.
Lucy currently builds for me under Windows 7 with ActivePerl and the free
version of MSVC from 2010. If switching to a more recent version of MSVC
is an option for you, try that.
> -c src\Charmonizer\Test\TestLargeFiles.c
> -Fosrc\Charmonizer\Test\TestLargeFiles.obj
> TestLargeFiles.c
> src\Charmonizer\Test\TestLargeFiles.c(31) : error C2065: 'off64_t' :
> undeclared identifier
> src\Charmonizer\Test\TestLargeFiles.c(31) : error C2146: syntax error :
> missing ';' before identifier 'offset'
> src\Charmonizer\Test\TestLargeFiles.c(31) : error C2065: 'offset' :
> undeclared identifier
> src\Charmonizer\Test\TestLargeFiles.c(36) : error C2146: syntax error :
> missing ';' before identifier 'gb4_plus'
> src\Charmonizer\Test\TestLargeFiles.c(36) : error C2065: 'gb4_plus' :
> undeclared identifier
> src\Charmonizer\Test\TestLargeFiles.c(36) : error C2143: syntax error :
> missing ')' before 'constant'
> src\Charmonizer\Test\TestLargeFiles.c(36) : error C2059: syntax error : ')'
> src\Charmonizer\Test\TestLargeFiles.c(37) : error C2146: syntax error :
> missing ';' before identifier 'gb2_plus'
> src\Charmonizer\Test\TestLargeFiles.c(37) : error C2065: 'gb2_plus' :
> undeclared identifier
> src\Charmonizer\Test\TestLargeFiles.c(37) : error C2143: syntax error :
> missing ';' before 'constant'
> src\Charmonizer\Test\TestLargeFiles.c(37) : warning C4307: '+' : integral
> constant overflow
> src\Charmonizer\Test\TestLargeFiles.c(55) : error C2065: 'fopen64' :
> undeclared identifier
> src\Charmonizer\Test\TestLargeFiles.c(55) : error C2440: '=' : cannot convert
> from 'int' to 'struct _iobuf *'
> Conversion from integral type to pointer type requires reinterpret_cast,
> C-style cast or function-style cast
> src\Charmonizer\Test\TestLargeFiles.c(60) : error C2065: 'fseeko64' :
> undeclared identifier
> src\Charmonizer\Test\TestLargeFiles.c(63) : error C2065: 'ftello64' :
> undeclared identifier
> src\Charmonizer\Test\TestLargeFiles.c(89) : error C2440: '=' : cannot convert
> from 'int' to 'struct _iobuf *'
> Conversion from integral type to pointer type requires reinterpret_cast,
> C-style cast or function-style cast
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual
> Studio\VC98\bin\cl.EXE"' : return code '0x2'
> Stop.
Charmonizer doesn't think this system provides large file support, because it
hasn't found a combination of commands that make the function S_probe_off64()
in charmonizer/src/Charmonizer/Probe/LargeFiles.c pass.
This combination generally works for MSVC:
{ "", "fopen", "_ftelli64", "_fseeki64", "__int64" },
However, some web research indicates that _ftelli64 and _fseeki64 were
introduced later and are not in VS6. For large file support under VS6, you
need to use _lseeki64, which operates on file descriptors rather than C89
FILE* streams.
http://msdn.microsoft.com/en-us/library/aa298446%28v=vs.60%29.aspx
This approach is actually feasible for Lucy, since we switched from FILE* to
file descriptors a long time ago. It will just take some rejiggering of
LargeFiles.c so that we don't depend on there being some form of fseek/ftell
when defining off64_t.
Marvin Humphrey