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

Re: Bug#876840: fseeko() on reference file: Invalid argument (Was: Bug#876840: staden-io-lib FTBFS on non-i386 32bit: FAIL: java)


On 07/12/17 15:28, Andreas Tille wrote:
> On Thu, Dec 07, 2017 at 02:40:36PM +0000, James Bonfield wrote:
>> On Tue, Dec 05, 2017 at 08:02:18AM +0100, Andreas Tille wrote:
>>> this is a kind ping since as I wrote below the issue seems not be solved.
>> I'm not sure I can easily debug this as it only fails on systems I
>> have no access to; it's like trying to debug your grandmother's
>> windows desktop over the phone...
>> I'm still convinced it's something to do with large file support not
>> working correctly, likely with off_t being the wrong size.  Especially
>> given the 64-bit mips build works while the 32-bit one does not.  I
>> assume everything else about these architectures are the same.
>> We don't have any 32-bit build systems any more though.
>>>>> Does adding that fix the fseeko call to start working again?
>>>> Unfortunately not - see here the build logs:
>>>>     https://buildd.debian.org/status/package.php?p=staden-io-lib
>> James
>> -- 
>> James Bonfield (jkb@sanger.ac.uk) | Hora aderat briligi. Nunc et Slythia Tova
> I'm just forwarding this to debian-arm and debian-mips.  I see no other
> chance to deal with this bug rather than removing these architectures
> from the architectures field.
> Do you have any better suggestion?

The bug is here:

Unlike most packages (although there are quite a few that do this),
staden-io-lib defines _FILE_OFFSET_BITS in a config header instead of
passing it as a -D argument to the compiler. Since this flag affects the
behavior of standard headers, you *must* include this header before any

In the bgzip.c file above, stdio.h is included before the
io_lib_config.h header. This causes bgzip.c to have a different opinion
of what sizeof(off_t) compared to other files, so all external calls to
bzi_seek invoke undefined behavior.

To fix, move the "#ifdef HAVE_CONFIG_H...#endif" block above all the
other includes in that file.


Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: