I was playing with compilation and debianization of one of projects I use. On Jessie everything worked, on Sid (using git-pbuilder), I got compilation errors.
Some of the problems I fixed, but there is still one which blocks me.
Let’s start from the beginning:
loop.c:197:27: error: 'struct __gconv_step_data' has no member named '__trans' for (trans = step_data->__trans; trans != NULL; trans = trans->__next)
loop.c is one of skeleton files from glibc (second is skeleton.c). They are used for creating custom gconv modules. Looks like my local copy became absolete and I should update it with more recent from upstream. No problem. I copied from original source these two files and re-run compilation.
loop.c:64:27: fatal error: libc-internal.h: No such file or directory compilation terminated.
Whoah! Looks like I still have have some problem with dependencies. After some research I’ve found:
- in Jessie there is glibc-2.19 available
- in Sid (and Stretch), glibc has been updated to 2.23.
The glibc’s file: iconv/loop.c has been updated with #include, in commit 5fe8e359.
Debian package is missing header? Unbelievable for me. I checked for sure original source first. Everything is on its place.
I’ve opened irssi and connected to #debian-glibc channel to ask if anybody can help me with this. There was suggestion that this file is for internal use only, but to be sure I should ask upstream. Additionaly I was assured, that no file is being removed when debianizing.
Internal usage, huh? I checked glibc iconv manual again. Nothing about using iconv/skeleton.c and iconv/loop.c, instead there is explanation about implementing conversion functions. So maybe it’s true..
I connected to #glibc channel and asked people there. I explained that I’m trying to compile custom gconv module, and that manual as I understand, describes writing functions by hand, and that loop.c and skeleton.c files are described as:
This file provides a frame for the reader loop in all conversion modules. The actual code must (of course) be provided in the actual module source code but certain actions can be written down generically, with some customization options which are these (...)
This file can be included to provide definitions of several things many modules have in common. It can be customized using the following macros (...)
So in theory these files could be used for writing custom module.
Unfortunately I received only one answer, “to do which is easier for me”. Ok… Still it doesn’t answered me, if libc-internal.h file should be used only by glibc-developers (so skeleton files, too), or if there is a bug in Debian package, which for some reason does not add every header file.
I wrote question on mailing list (first in my life, Hurray!): https://sourceware.org/ml/libc-help/2016-07/msg00000.html to clarify my doubts.