Re: Bug#876840: fseeko() on reference file: Invalid argument (Was: Bug#876840: staden-io-lib FTBFS on non-i386 32bit: FAIL: java)
James Cowgill <[email protected]>
| Newsgroups | gmane.linux.debian.ports.arm,gmane.linux.debian.ports.mips |
|---|---|
| Message-ID | <[email protected]> |
Hi, 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 ([email protected]) | 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: https://sources.debian.org/src/staden-io-lib/1.14.9-3/io_lib/bgzip.c/#L47 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 others. 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. Thanks, James
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE+Ixt5DaZ6POztUwQx/FnbeotAe8FAlopg9AACgkQx/Fnbeot Ae8gHw/+OgWY/6CH701uzdQNFIdl3IHXYVHqny/4rOqyJa7cbLOT8dsE1ftvueju qRfayquElPn/DVo4HE6dWxqWfUZxfgo4OB99+V0U9M1HT5QONe7SmbFR7Glrtyew oRBOsfMJuIulNjJ4oD1czhMeoRK2Y6hECPa63ZmxzNPoardH52PHzIpsbI7y4Wei zwLF2uBCLY2k0NqS8YEdtiUkikRnp1W8vQ4Fl9e9AjwFC5cZovwaxnX6iq4J8JL8 hdJLVEPxpbnNUK3yyOIZ1pq0uM16QnlOW0SVMUiicRCprr5SqXazdF4EqublxM8C QIaPM0NgsV8RKxab4YCxeb/zLDUCeLjTXoidahavQE2jqGV2Lqm2sxzh9CPNbHUI 7bZVNyhTQpsLRl7liYc+0mjIItW2OQd/Vw2UBJHy0zcVQaHlv18nXC1tQq12i+02 rVYHcBughxUvm7RPk9Jnze3OMyjY20P+rnl7iw+tQR3TKjIhihw14hHEvv6AErlT tz49OwkMXCdUdE38Lic/6FXPGefhREGmzw8jOyqnMDAElrvhwtJyfa75AkBAc8nG nrH/6z7wlO6BNfxfk8kPF7EQJnvN/QA8WD7YDnsCI3VjwzBE1trQm9SrjwUhGuo0 Y3m0c0UAUbqg2dyPIPFlkrGKFlg0CIJ2H4iSbFymIr43EaVL7Iw= =LufN -----END PGP SIGNATURE-----