[Debian-med-packaging] Bug#949966: libgclib-dev: getLine ABI uses off_t and thus depends on _FILE_OFFSET_BITS

Helmut Grohne helmut at subdivi.de
Mon Jan 27 18:58:25 GMT 2020


Package: libgclib-dev
Version: 0.11.3-1
Severity: important
Tags: ftbfs
Control: affects -1 + src:gffread

gffread fails to build from source for 32bit architectures with the
following linker error:

| /usr/bin/ld: gffread.o: in function `GLineReader::getLine(_IO_FILE*)':
| /usr/include/gclib/GBase.h:576: undefined reference to `GLineReader::getLine(_IO_FILE*, long long&)'

The second argument of getLine is actually typed off_t&. libgclib is
built without _FILE_OFFSET_BITS, so off_t becomes long. gffread is built
with _FILE_OFFSET_BITS=64, so off_t becomes long long there. In C++,
these become different overloads and so we get the linker error.

Fundamentally, I think using off_t in an ABI is difficult. If you do so,
you must provide both variants. gclib fails to do so.

As a workaround on the gffread side, unsetting the lfs feature should
make it build:

export DEB_BUILD_MAINT_OPTIONS=future=-lfs

Of course, gffread comes without large file support then. Possibly,
rebuilding libgclib with _FILE_OFFSET_BITS=64 would be a good solution.
Beware that doing so is an ABI break and requires an soname bump though.

Helmut



More information about the Debian-med-packaging mailing list