|
From: Cristi C. <cri...@ya...> - 2008-03-21 09:33:34
|
Hi,
I made some investigations regarding the problem with .wavfiles processing ending up with the error message "Could not find datachunk".
Bellow is the environment configuration I've used:
gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)
Red Hat Enterprise Linux ES release 4 (Nahant Update 3) running on 32-bit architecture
Kernel 2.6.21.1
SoX is trying to use 64 bit offset values through "#define _FILE_OFFSET_BITS 64".
The issue applies only for a C program when the offset parameter is given as off_t type.
It seems like the gcc compiler does not bind fseeko to the fseeko64 function implementation.
Note that it works OK for a similar CPP program (g++ is used instead of gcc).
In order to fix the issue, we have to use "#define _LARGEFILE_SOURCE".
The SoX configure script already performs a test for deciding whether to use or not
this definition, but the final answer is "no":
"checking for _LARGEFILE_SOURCE value needed for large files... no"
Any ideas on what does the test consist of and how can it be improved?
Trying to use CLFAGS=-D_LARGEFILE_SOURCE as an argument to configure does not solve
the problem because the environment variable is never used during the compilation process.
Could that be a bug in the configure script? Note that I've tried to use also the
"export CLFAGS=-D_LARGEFILE_SOURCE" before running the configure script, but I've got
the same result.
The workarround is to manually modify the src/soxconfig.h file generated after running configure:
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
#define _LARGEFILE_SOURCE 1
Best regards,
Cristian
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ |