libs: Build regression: build fails on 32-bit architectures
Hello.
I’m the Debian maintainer for these libraries. I just uploaded packages for version 0.11.3, and I’m observing that they fail to build on Linux on 32-bit architectures (i386, armel, armhf, …). This used to work.
A full build log showing the issue: https://salsa.debian.org/debian/falcosecurity-libs/-/jobs/4435012
The punchline is this:
$ cc -DHAS_CAPTURE -DHAS_ENGINE_NODRIVER -DHAS_ENGINE_NOOP -DHAS_ENGINE_SAVEFILE -DHAS_ENGINE_SOURCE_PLUGIN -DHAS_ENGINE_TEST_INPUT -DHAS_ENGINE_UDIG -DHAVE_SYS_SYSMACROS_H -DPLATFORM_NAME=\"Linux\" -DSCAP_HOSTNAME_ENV_VAR=\"SCAP_HOSTNAME\" -DSCAP_HOST_ROOT_ENV_VAR_NAME=\"HOST_ROOT\" -DSCAP_KERNEL_MODULE_NAME=\"scap\" -D__STDC_FORMAT_MACROS -Dscap_engine_udig_EXPORTS -I/usr/include/gtest -I/builds/debian/falcosecurity-libs/debian/output/source_dir/obj-i686-linux-gnu/common -I/builds/debian/falcosecurity-libs/debian/output/source_dir/userspace/libscap/../common -I/builds/debian/falcosecurity-libs/debian/output/source_dir/userspace/libscap -I/builds/debian/falcosecurity-libs/debian/output/source_dir/obj-i686-linux-gnu/driver/src -I/builds/debian/falcosecurity-libs/debian/output/source_dir/userspace/libscap/linux -g -O2 -ffile-prefix-map=/builds/debian/falcosecurity-libs/debian/output/source_dir=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -ggdb -fPIC -MD -MT libscap/engine/udig/CMakeFiles/scap_engine_udig.dir/scap_udig.c.o -MF CMakeFiles/scap_engine_udig.dir/scap_udig.c.o.d -o CMakeFiles/scap_engine_udig.dir/scap_udig.c.o -c /builds/debian/falcosecurity-libs/debian/output/source_dir/userspace/libscap/engine/udig/scap_udig.c
In file included from /builds/debian/falcosecurity-libs/debian/output/source_dir/driver/syscall_table64.c:34:
/builds/debian/falcosecurity-libs/debian/output/source_dir/driver/syscall_table.c:30:10: error: '__NR_close' undeclared here (not in a function)
30 | [__NR_close - SYSCALL_TABLE_ID0] = {UF_USED | UF_NEVER_DROP, PPME_SYSCALL_CLOSE_E, PPME_SYSCALL_CLOSE_X, PPM_SC_CLOSE},
| ^~~~~~~~~~
The issue is probably related to this chunk of userspace/libscap/CMakeLists.txt:
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
add_library(driver_event_schema
../../driver/syscall_table64.c
../../driver/fillers_table.c)
target_link_libraries(scap_event_schema driver_event_schema)
set_scap_target_properties(scap_event_schema)
endif()
Note that it unconditionall pulls in syscall_table64.c even on 32-bit arches. Previously this used syscall_table.c, and it worked on the 32-bit arches also. I don’t know if simply making that change will break something, and I haven’t tried it.
Thanks
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 26 (21 by maintainers)
Hi. Sorry to be cantankerous. I know we’re all doing the best with that we have.
For the architectures I looked at, I see build failures; I’m not even trying to run the code yet. So you can replicate the failures I’m looking at by cross-building, which shouldn’t be very effortful to get going. Let me know if you need help doing that, and I should be able to give you detailed notes, when I get around to it.
Thanks for the patch review. I haven’t looked at this for a little while now, and presumably yall made changes upstream since then.