Page MenuHome GnuPG

During make, compile error under Ubuntu 21.10
Closed, ResolvedPublic

Description

Using the same script that I successfully build gpgme 1.16.0 under Ubuntu 20.04, I get this under Ubuntu 21.10:

mv -f .deps/import.Tpo .deps/import.Plo
mv -f .deps/gpgconf.Tpo .deps/gpgconf.Plo
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../conf -I/usr/local/include -I/usr/local/include -g -O2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wno-format-y2k -Wno-missing-field-initializers -Wno-sign-compare -Wno-format-zero-length -Wno-format-truncation -Wno-sizeof-pointer-div -W -Wextra -Wbad-function-cast -Wwrite-strings -Wdeclaration-after-statement -Wformat -Wformat-security -Wpointer-arith -MT error.lo -MD -MP -MF .deps/error.Tpo -c error.c -fPIC -DPIC -o .libs/error.o
posix-io.c: In function '_gpgme_io_spawn':
posix-io.c:577:23: error: void value not ignored as it ought to be

577 |             while ((i = closefrom (fd)) && errno == EINTR)
    |                       ^

mv -f .deps/engine-gpgconf.Tpo .deps/engine-gpgconf.Plo
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../conf -I/usr/local/include -I/usr/local/include -g -O2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wno-format-y2k -Wno-missing-field-initializers -Wno-sign-compare -Wno-format-zero-length -Wno-format-truncation -Wno-sizeof-pointer-div -W -Wextra -Wbad-function-cast -Wwrite-strings -Wdeclaration-after-statement -Wformat -Wformat-security -Wpointer-arith -MT ath.lo -MD -MP -MF .deps/ath.Tpo -c ath.c -fPIC -DPIC -o .libs/ath.o

I suspect this is due to a g++ version bump by Ubuntu, I had some similar problems in my app code with cross-type assignments that used to be warnings becoming errors. This is my build script:

pushd gpgme
./autogen.sh --force
./configure --enable-maintainer-mode
make -j
make check
sudo make install
popd

Event Timeline

MangoCats renamed this task from During make, compile Error under Ubuntu 21.10 to During make, compile error under Ubuntu 21.10.Dec 12 2021, 7:14 PM
MangoCats updated the task description. (Show Details)
gniibe triaged this task as Normal priority.
gniibe added a subscriber: gniibe.

Thank you for your report.

This is due to glibc's adding closefrom API in 2.34.
The API is described in this page:
https://www.gnu.org/software/libc/manual/html_node/Opening-and-Closing-Files.html

And it returns void.

We have a fix in rM4b64774b6d13: core: Support closefrom also for glibc., it will be in the next release.

Thanks. If I'm reading correctly, that fix was pushed in July. Any idea when the next release might come out?