View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009831 | ardour | bugs | public | 2024-10-22 04:53 | 2024-11-06 15:02 |
Reporter | eschwartz | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | GNU | OS | Linux | OS Version | (any) |
Product Version | 8.10 | ||||
Summary | 0009831: Build is misconfigured with GCC 14 | ||||
Description | have_sys_ioprio = conf.check_cc( msg="Checking for 'ioprio_set' syscall support", features = 'c', mandatory = False, execute = False, fragment = "#include <sys/syscall.h>\nint main () { syscall(SYS_ioprio_set, 1, 0, 8192); return 0; }") This check assumes that the syscall() function doesn't need to be defined at all, and includes sys/syscall.h to get the value of SYS_ioprio_set. In c99, this became invalid C code: a function *must* be prototyped in order to compile it. GCC 14 starts erroring out by default, enforcing this ancient rule. Modern clang does the same as well. https://wiki.gentoo.org/wiki/Modern_C_porting#How_do_I_reproduce_these_bugs.3F Reported downstream at https://bugs.gentoo.org/939584 | ||||
Steps To Reproduce | Install gcc 14 Compile ardour Check the log file. See: ``` ---------------------------------------------------- Checking for 'ioprio_set' syscall support ==> #include <sys/syscall.h> int main () { syscall(SYS_ioprio_set, 1, 0, 8192); return 0; } <== [1/1] Compiling build/.conf_check_c12644d0cba308799be2157cb7c1feb3/test.c ['x86_64-pc-linux-gnu-gcc', '-I/var/tmp/portage/media-sound/ardour-8.10/work/Ardour-8.10.0', '-pipe', '-march=native', '-fstack-protector-all', '-O2', '-fdiagnostics-color=always', '-frecord-gcc-switches', '-Werror=odr', '-Werror=lto-type-mismatch', '-Werror=strict-aliasing', '-Wformat', '-Werror=format-security', '-Werror=implicit-function-declaration', '-Werror=implicit-int', '-Werror=int-conversion', '-Werror=incompatible-pointer-types', '-lboost_system', '-DHAVE_RF64_RIFF', '-DCOMPILER_INT128_SUPPORT', '-DWAF_BUILD', '-DNDEBUG', '-fshow-column', '-pipe', '-DARCH_X86', '-mmmx', '-msse', '-mfpmath=sse', '-DUSE_XMMINTRIN', '-DBUILD_SSE_OPTIMIZATIONS', '-DLXVST_64BIT', '-Wall', '-Wpointer-arith', '-Wcast-qual', '-Wcast-align', '-Wno-unused-parameter', '-DBOOST_SYSTEM_NO_DEPRECATED', '-DBOOST_BIND_GLOBAL_PLACEHOLDERS', '-D_ISOC9X_SOURCE', '-D_LARGEFILE64_SOURCE', '-D_FILE_OFFSET_BITS=64', '-DPROGRAM_NAME="Ardour"', '-DPROGRAM_VERSION="8"', '-Wstrict-prototypes', '-Wmissing-prototypes', '-I/var/tmp/portage/media-sound/ardour-8.10/work/Ardour-8.10.0/build/.conf_check_c12644d0cba308799be2157cb7c1feb3/testbuild', '-DINTERNAL_SHARED_LIBS=1', '-DHAVE_SUIL=1', '-DHAVE_ALSA=1', '-DHAVE_PULSEAUDIO=1', '-DHAVE_GLIB=1', '-DHAVE_GTHREAD=1', '-DHAVE_GLIBMM=1', '-DHAVE_SNDFILE=1', '-DHAVE_GIOMM=1', '-DHAVE_CURL=1', '-DHAVE_ARCHIVE=1', '-DHAVE_LO=1', '-DHAVE_TAGLIB=1', '-DHAVE_VAMPSDK=1', '-DHAVE_VAMPHOSTSDK=1', '-DHAVE_RUBBERBAND=1', '-DHAVE_USB=1', '-DHAVE_RUBBERBAND_3_0_0=1', '-DEXPORT_VISIBILITY_HIDDEN=0', '-DENABLE_NLS=1', '-DLXVST_SUPPORT=1', '-DVST3_SUPPORT=1', '-DUSE_FUTEX_SEMAPHORE=1', '-DFPU_AVX512F_SUPPORT=1', '-DFPU_AVX_FMA_SUPPORT=1', '-DCONFIG_ARCH="x86_64"', '-DHAVE_TOOLS_SANITY_CHECK=1', '-DHAVE_FFTW3F=1', '-DHAVE_UDEV=1', '-DHAVE_HIDAPI=1', '-DHAVE_AUBIO=1', '-DHAVE_AUBIO4=1', '-DHAVE_XML=1', '-DHAVE_SIGCPP=1', '-DHAVE_EXECINFO=1', '-DHAVE_POSIX_MEMALIGN=1', '-DHAVE_GETMNTENT=1', '-DHAVE_LOCALTIME_R=1', '-DHAVE_CONTROL_PROTOCOL=1', '-DHAVE_MIDI_SURFACE=1', '-DHAVE_WEBSOCKETS=1', '-DHAVE_PANGOMM=1', '-DHAVE_CAIROMM=1', '-DHAVE_LRDF=1', '-DHAVE_SAMPLERATE=1', '-DHAVE_LV2=1', '-DHAVE_LV2_1_10_0=1', '-DHAVE_LV2_1_17_2=1', '-DHAVE_LV2_1_18_6=1', '-DHAVE_SERD=1', '-DHAVE_SORD=1', '-DHAVE_SRATOM=1', '-DHAVE_LILV=1', '-DLV2_SUPPORT=1', '-DUSE_TLSF=1', '-DLV2_EXTENDED=1', '-DHAVE_OGG=1', '-DHAVE_FLAC=1', '-DHAVE_FFTW35F=1', '-DUSE_RUBBERBAND=1', '-DCURRENT_SESSION_FILE_VERSION=7003', '-DHAVE_SYS_VFS_H=1', '-DHAVE_SYS_STATVFS_H=1', '-DHAVE_UNISTD=1', '../test.c', '-c', '-o/var/tmp/portage/media-sound/ardour-8.10/work/Ardour-8.10.0/build/.conf_check_c12644d0cba308799be2157cb7c1feb3/testbuild/test.c.1.o'] err: ../test.c:2:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes] 2 | int main () { syscall(SYS_ioprio_set, 1, 0, 8192); return 0; } | ^~~~ ../test.c: In function ‘main’: ../test.c:2:15: error: implicit declaration of function ‘syscall’ [-Werror=implicit-function-declaration] 2 | int main () { syscall(SYS_ioprio_set, 1, 0, 8192); return 0; } | ^~~~~~~ cc1: some warnings being treated as errors from /var/tmp/portage/media-sound/ardour-8.10/work/Ardour-8.10.0/libs/ardour: Test does not build: Traceback (most recent call last): File "/var/tmp/portage/media-sound/ardour-8.10/work/Ardour-8.10.0/.waf3-2.0.26-44bc421a5f6bb452d70d83cbd5abc3fa/waflib/Configure.py", line 335, in run_build bld.compile() File "/var/tmp/portage/media-sound/ardour-8.10/work/Ardour-8.10.0/.waf3-2.0.26-44bc421a5f6bb452d70d83cbd5abc3fa/waflib/Build.py", line 176, in compile raise Errors.BuildError(self.producer.error) waflib.Errors.BuildError: Build failed -> task in 'testprog' failed with exit status 1 (run with -v to display more information) no from /var/tmp/portage/media-sound/ardour-8.10/work/Ardour-8.10.0/libs/ardour: The configuration failed ``` | ||||
Tags | No tags attached. | ||||
|
Thanks for the heads up! Since I do not have access to a system with gcc-14, could you test if adding "#include <unistd.h>\n" before "#include <sys/syscall.h>" helps? |
|
> from /var/tmp/portage/media-sound/ardour-8.10/work/Ardour-8.10.0/libs/ardour: The configuration failed This is odd, since "ioprio_set" is not mandatory. Ardour compiles fine without it. |
|
Above I linked to https://wiki.gentoo.org/wiki/Modern_C_porting#How_do_I_reproduce_these_bugs.3F This section includes instructions on how to reproduce the issue with any version of GCC by setting a -Werror flag. And to be clear, ardour did compile fine for me. That "the configuration failed" is an internal waf diagnostic -- it is saying that the configure check for ioprio_set failed and the build carried on without ioprio_set support. |
|
Fixed, see bug 9845 for details. https://github.com/Ardour/ardour/commit/ba4d9709c6e442ee57329fd592d48fc98ea0b937 |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-10-22 04:53 | eschwartz | New Issue | |
2024-10-22 21:56 | x42 | Note Added: 0029067 | |
2024-10-22 22:13 | x42 | Note Added: 0029068 | |
2024-10-22 22:24 | eschwartz | Note Added: 0029069 | |
2024-11-06 15:02 | eschwartz | Status | new => closed |
2024-11-06 15:02 | eschwartz | Resolution | open => fixed |
2024-11-06 15:02 | eschwartz | Note Added: 0029113 |