Usage of _unused macro conflicts with linux-headers on PowerPC
Closed this issue · 2 comments
matoro commented
I am unsure what specific change (or kernel headers change) caused this, but I am unable to compile the new release on PowerPC (both BE/LE tested 64-bit) due to the following error:
FAILED: src/librc/librc.so.1.p/librc.c.o
powerpc64le-unknown-linux-gnu-gcc -Isrc/librc/librc.so.1.p -Isrc/librc -I../openrc-0.47/src/librc -Isrc/shared -I../openrc-0.47/src/shared -Isrc/libeinfo -I../openrc-0.47/src/libeinfo -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c99 -D_DEFAULT_SOURCE -Wcast-align -Wcast-qual -Wdeclaration-after-statement -Wformat=2 -Winline -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wsequence-point -Wshadow -Wwrite-strings -Werror=implicit-function-declaration -DHAVE_MALLOC_EXTENDED_ATTRIBUTE -DHAVE_CLOSEFROM -DHAVE_CLOSE_RANGE_CLOEXEC -O3 -mcpu=native -mtune=native -O2 -pipe -fPIC -MD -MQ src/librc/librc.so.1.p/librc.c.o -MF src/librc/librc.so.1.p/librc.c.o.d -o src/librc/librc.so.1.p/librc.c.o -c ../openrc-0.47/src/librc/librc.c
In file included from /usr/include/bits/sigcontext.h:30,
from /usr/include/signal.h:301,
from /usr/include/sys/param.h:28,
from ../openrc-0.47/src/librc/librc.c:30:
/usr/include/asm/sigcontext.h:18:32: error: expected identifier or ‘(’ before ‘[’ token
18 | unsigned long _unused[4];
| ^
ninja: build stopped: subcommand failed.
thesamesam commented
I'll handle this later today/tomorrow. It's because we started using the (already-existing) unused macros in different locations, but __foo is always reserved, and it happens to conflict with some padding on ppc64 (but it could be anything else on other systems).
vapier commented
both projects are wrong. we can fix ours at least. go with attr_xxx
instead of _xxx
or something. and drop support for <gcc-3 in the process.