[parted-devel] gnulib commit 0aa8ef42465 - free: Fix warning breaks parted
Brian C. Lane
bcl at redhat.com
Tue Jan 26 17:20:54 GMT 2021
I encountered this while trying to prepare a new release of parted 3.4,
after updating gnulib to commits past b07286e464 (free-posix: port to
GNU/Linux) builds exit with this puzzling error:
make[4]: Entering directory '/home/bcl/Red_Hat/projs/parted/libparted/labels'
CC aix.lo
In file included from ../../include/parted/parted.h:44,
from aix.c:25:
pt-common.h:39:1: error: 'PedDiskOps' {aka 'const struct _PedDiskOps'} has no member named 'rpl_free'
39 | free: PT_type##_free, \
| ^~~~
aix.c:217:2: note: in expansion of macro 'PT_op_function_initializers'
217 | PT_op_function_initializers (aix)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
make[4]: *** [Makefile:1600: aix.lo] Error 1
In parted we have some macros in libparted/labels/pt-common.h that
handle mapping the disklabel's functions in a somewhat generic way:
https://git.savannah.gnu.org/cgit/parted.git/tree/libparted/labels/pt-common.h#n39
One of those is "free: PT_type##_free," which appears to be getting
redefined to rpl_free by gnulib.
The change in commit 0aa8ef42 replaces "AC_DEFINE([free], [rpl_free],
..." with a simple "#define free rpl_free" which is bound to cause no
end of trouble for everyone. And when commit b07286e464 enabled it it
started hitting parted builds.
I'm not sure what the right fix for this is, but I'd appreciate it if
someone could figure out a way to do this that doesn't involve
arbitrarily re-defining words that may be used in other contexts.
Thanks,
Brian
parted co-maintainer
--
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart
More information about the parted-devel
mailing list