Bug#888566: vim FTBFS on alpha: vim segfaults in the build

James McCoy vega.james at gmail.com
Sat Jan 27 19:37:22 UTC 2018


On Sat, Jan 27, 2018 at 05:50:16PM +1300, Michael Cree wrote:
> [snip useful details]
> 
> Four of those bytes difference are due to the field b_ino in the
> struct (of type ino_t).  And indeed examining the build log [1]
> one sees option.c is compiled with -DFILE_OFFSET_BITS=64 but
> misc1.c is NOT compiled with that option, hence the difference
> in offsets to fields in the buf_T struct.

It looks like you came to the same conclusion as we did in #827319.  Vim
uses autoconf's AC_SYS_LARGEFILE to determine whether _FILE_OFFSET_BITS
needs to be set (and decides it doesn't), however the Perl bindings
always force _FILE_OFFSET_BITS=64[0].

This discrepancy seems to be at least part of the problem.

> I am not sure why only some modules are compiled with
> -DFILE_OFFSET_BITS=64. Whatever the reason, it leads to a broken
> vim on Alpha.

When Vim gained support to dynamically link against Perl on Linux, it
changed the build to only use $(PERL_CFLAGS) for files which use
directly use Perl's APIs.  Since $(PERL_CFLAGS) is what's exporting
_FILE_OFFSET_BITS=64, only those files are compiled with that set.

So, we come back to the same question as before, I think.  Why doesn't
autoconf think _FILE_OFFSET_BITS=64 is needed (presumably this is
because it determines the relevant structures are _already_ 64-bit)?

Cheers,
-- 
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7  2D23 DFE6 91AE 331B A3DB



More information about the pkg-vim-maintainers mailing list