libsdl-org / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
9.44k stars 1.76k forks source link

SDL_evdev.c:634:38: error: ‘SDL_UDEV_DEVICE_TOUCHPAD’ undeclared (first use in this function) #8450

Closed jonesmz closed 10 months ago

jonesmz commented 10 months ago

I'm working on this project locally (not on our github actions CI) https://github.com/TheOpenSpaceProgram/osp-magnum

And running into the error SDL_evdev.c:634:38: error: ‘SDL_UDEV_DEVICE_TOUCHPAD’ undeclared (first use in this function)

I'm using SDL2 release-2.28.4 tag ( cc016b0046d563287f0aa9f09b958b5e70d43696 )

Error output ``` [1/5 1.6/sec] Building C object 3rdparty/SDL2/CMakeFiles/SDL2.dir/Debug/src/core/linux/SDL_evdev.c.o FAILED: 3rdparty/SDL2/CMakeFiles/SDL2.dir/Debug/src/core/linux/SDL_evdev.c.o /usr/bin/ccache /usr/lib/ccache/bin/gcc -DSDL2_EXPORTS -DUSING_GENERATED_CONFIG_H -DCMAKE_INTDIR=\"Debug\" -I/home/jonesmz/build-osp-magnum-Desktop-Debug/3rdparty/SDL2/include -I/home/jonesmz/build-osp-magnum-Desktop-Debug/3rdparty/SDL2/include/SDL2 -I/home/jonesmz/build-osp-magnum-Desktop-Debug/3rdparty/SDL2/include-config-debug/SDL2 -I/home/jonesmz/build-osp-magnum-Desktop-Debug/3rdparty/SDL2/include-config-debug -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -idirafter "/home/jonesmz/osp-magnum/3rdparty/SDL2/src/video/khronos" -DHAVE_LINUX_VERSION_H -Wall -fno-strict-aliasing -Wdeclaration-after-statement -fvisibility=hidden -Wshadow -Wno-unused-local-typedefs -fdiagnostics-color=always -D_REENTRANT -I/usr/include -DSDL_BUILD_MAJOR_VERSION=2 -DSDL_BUILD_MINOR_VERSION=28 -DSDL_BUILD_MICRO_VERSION=4 -g -fPIC -fno-omit-frame-pointer -O0 -gz -Wno-error=declaration-after-statement -MD -MT 3rdparty/SDL2/CMakeFiles/SDL2.dir/Debug/src/core/linux/SDL_evdev.c.o -MF 3rdparty/SDL2/CMakeFiles/SDL2.dir/Debug/src/core/linux/SDL_evdev.c.o.d -o 3rdparty/SDL2/CMakeFiles/SDL2.dir/Debug/src/core/linux/SDL_evdev.c.o -c /home/jonesmz/osp-magnum/3rdparty/SDL2/src/core/linux/SDL_evdev.c /home/jonesmz/osp-magnum/3rdparty/SDL2/src/core/linux/SDL_evdev.c: In function ‘SDL_EVDEV_init_touchscreen’: /home/jonesmz/osp-magnum/3rdparty/SDL2/src/core/linux/SDL_evdev.c:634:38: error: ‘SDL_UDEV_DEVICE_TOUCHPAD’ undeclared (first use in this function) 634 | (udev_class & SDL_UDEV_DEVICE_TOUCHPAD) ? SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE : SDL_TOUCH_DEVICE_DIRECT, | ^~~~~~~~~~~~~~~~~~~~~~~~ /home/jonesmz/osp-magnum/3rdparty/SDL2/src/core/linux/SDL_evdev.c:634:38: note: each undeclared identifier is reported only once for each function it appears in /home/jonesmz/osp-magnum/3rdparty/SDL2/src/core/linux/SDL_evdev.c: In function ‘SDL_EVDEV_device_added’: /home/jonesmz/osp-magnum/3rdparty/SDL2/src/core/linux/SDL_evdev.c:787:26: warning: implicit declaration of function ‘NBITS’; did you mean ‘NFDBITS’? [-Wimplicit-function-declaration] 787 | unsigned long relbit[NBITS(REL_MAX)] = { 0 }; | ^~~~~ | NFDBITS /home/jonesmz/osp-magnum/3rdparty/SDL2/src/core/linux/SDL_evdev.c:787:44: error: variable-sized object may not be initialized except with an empty initializer 787 | unsigned long relbit[NBITS(REL_MAX)] = { 0 }; | ^ /home/jonesmz/osp-magnum/3rdparty/SDL2/src/core/linux/SDL_evdev.c:815:32: warning: implicit declaration of function ‘test_bit’ [-Wimplicit-function-declaration] 815 | item->relative_mouse = test_bit(REL_X, relbit) && test_bit(REL_Y, relbit); | ^~~~~~~~ /home/jonesmz/osp-magnum/3rdparty/SDL2/src/core/linux/SDL_evdev.c:821:23: error: ‘SDL_UDEV_DEVICE_TOUCHSCREEN’ undeclared (first use in this function) 821 | if (udev_class & (SDL_UDEV_DEVICE_TOUCHSCREEN | SDL_UDEV_DEVICE_TOUCHPAD)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/jonesmz/osp-magnum/3rdparty/SDL2/src/core/linux/SDL_evdev.c:821:53: error: ‘SDL_UDEV_DEVICE_TOUCHPAD’ undeclared (first use in this function) 821 | if (udev_class & (SDL_UDEV_DEVICE_TOUCHSCREEN | SDL_UDEV_DEVICE_TOUCHPAD)) { | ^~~~~~~~~~~~~~~~~~~~~~~~ ninja: build stopped: cannot make progress due to previous errors. 20:48:45: The process "/usr/bin/cmake" exited with code 1. Error while building/deploying project OSP-MAGNUM (kit: Desktop) When executing step "Build" 20:48:45: Elapsed time: 00:01. ```
CMake settings ``` if(NOT OSP_USE_SYSTEM_SDL) # This is the most minimal set of features which still make Sdl2Application # work. If you need something from these, remove the setting. The SDL_AUDIO # option (and SDL_DLOPEN) should not be needed either as Magnum doesn't use it, # but if it's disabled it causes linker errors. Needs further investigation. SET(SDL_ATOMIC OFF CACHE BOOL "" FORCE) SET(SDL_CPUINFO OFF CACHE BOOL "" FORCE) SET(SDL_FILESYSTEM OFF CACHE BOOL "" FORCE) SET(SDL_HAPTIC OFF CACHE BOOL "" FORCE) SET(SDL_LOCALE OFF CACHE BOOL "" FORCE) SET(SDL_POWER OFF CACHE BOOL "" FORCE) SET(SDL_RENDER OFF CACHE BOOL "" FORCE) SET(SDL_SENSOR OFF CACHE BOOL "" FORCE) SET(SDL_TIMERS OFF CACHE BOOL "" FORCE) SET(SDL_ALTIVEC OFF CACHE BOOL "" FORCE) # POWERPC exclusive, not supported by osp-magnum SET(SDL_3DNOW OFF CACHE BOOL "" FORCE) # Old 32bit x86 chips only, not supported by osp-magnum. SET(SDL_MMX OFF CACHE BOOL "" FORCE) # Old. Superceeded by SSE1, not supported by osp-magnum. SET(SDL_ASSEMBLY OFF CACHE BOOL "" FORCE) # Presumably not actually needed. Lets try more for portability than speed... SET(SDL_IBUS OFF CACHE BOOL "" FORCE) SET(SDL_TEST OFF CACHE BOOL "" FORCE) SET(SDL_EVENTS OFF CACHE BOOL "" FORCE) SET(SDL_SYSTEM_ICONV OFF CACHE BOOL "" FORCE) SET(SDL_DBUS ON CACHE BOOL "" FORCE) SET(SDL_LIBUDEV ON CACHE BOOL "" FORCE) ## # SDL Audio backend settings ## SET(SDL_AUDIO ON CACHE BOOL "" FORCE) # Enabled audio settings SET(SDL_PULSEAUDIO ON CACHE BOOL "" FORCE) # Most linux systems use pulseaudio SET(SDL_PULSEAUDIO_SHARED OFF CACHE BOOL "" FORCE) # Don't need dynamic lib support for pulse, yet # Disabled audio settings SET(SDL_PIPEWIRE OFF CACHE BOOL "" FORCE) SET(SDL_PIPEWIRE_SHARED OFF CACHE BOOL "" FORCE) SET(SDL_ALSA OFF CACHE BOOL "" FORCE) SET(SDL_ALSA_SHARED OFF CACHE BOOL "" FORCE) SET(SDL_JACK OFF CACHE BOOL "" FORCE) SET(SDL_JACK_SHARED OFF CACHE BOOL "" FORCE) SET(SDL_DISKAUDIO OFF CACHE BOOL "" FORCE) SET(SDL_DISKAUDIO_SHARED OFF CACHE BOOL "" FORCE) SET(SDL_SNDIO OFF CACHE BOOL "" FORCE) SET(SDL_SNDIO_SHARED OFF CACHE BOOL "" FORCE) SET(SDL_DUMMYAUDIO OFF CACHE BOOL "" FORCE) SET(SDL_DUMMYAUDIO_SHARED OFF CACHE BOOL "" FORCE) SET(SDL_ESD OFF CACHE BOOL "" FORCE) SET(SDL_ESD_SHARED OFF CACHE BOOL "" FORCE) SET(SDL_ARTS OFF CACHE BOOL "" FORCE) SET(SDL_ARTS_SHARED OFF CACHE BOOL "" FORCE) SET(SDL_NAS OFF CACHE BOOL "" FORCE) SET(SDL_NAS_SHARED OFF CACHE BOOL "" FORCE) SET(SDL_OSS OFF CACHE BOOL "" FORCE) SET(SDL_OSS_SHARED OFF CACHE BOOL "" FORCE) SET(SDL_WASAPI OFF CACHE BOOL "" FORCE) # Windows Audio Session API : Is this really needed? ## # SDL Video backend settings ## SET(SDL_VIDEO ON CACHE BOOL "" FORCE) SET(SDL_VIVANTE OFF CACHE BOOL "" FORCE) SET(SDL_OFFSCREEN OFF CACHE BOOL "" FORCE) # Enabled video settings SET(SDL_OPENGL ON CACHE BOOL "" FORCE) # Disabled video settings SET(SDL_DUMMYVIDEO OFF CACHE BOOL "" FORCE) SET(SDL_VULKAN OFF CACHE BOOL "" FORCE) # Vulkan is cool and all, but one project at a time. SET(SDL_OPENGLES OFF CACHE BOOL "" FORCE) SET(SDL_DIRECTFB OFF CACHE BOOL "" FORCE) SET(SDL_DIRECTX OFF CACHE BOOL "" FORCE) # DirectX is windows specific. Lets stick with multiplatform. SET(SDL_RENDER_D3D OFF CACHE BOOL "" FORCE) # Ancient DirectX? if(NOT APPLE) SET(SDL_COCOA OFF CACHE BOOL "" FORCE) # Cocoa is mac specific. Lets stick with multiplatform. SET(SDL_METAL OFF CACHE BOOL "" FORCE) # Metal is mac specific. Lets stick with multiplatform. SET(SDL_RENDER_METAL OFF CACHE BOOL "" FORCE) # Metal is mac specific. Lets stick with multiplatform. endif() SET(SDL_RPI OFF CACHE BOOL "" FORCE) # Raspberry PI is not multiplatform. It supports OpenGL. SET(SDL_WAYLAND OFF CACHE BOOL "" FORCE) SET(SDL_WAYLAND_QT_TOUCH OFF CACHE BOOL "" FORCE) SET(SDL_KMSDRM OFF CACHE BOOL "" FORCE) SET(SDL_FILE ON CACHE BOOL "" FORCE) # Needed for Mac OSX SET(SDL_LOADSO ON CACHE BOOL "" FORCE) SET(SDL_HIDAPI OFF CACHE BOOL "" FORCE) SET(SDL_HIDAPI_JOYSTICK OFF CACHE BOOL "" FORCE) SET(SDL_JOYSTICK OFF CACHE BOOL "" FORCE) SET(SDL_VIRTUAL_JOYSTICK OFF CACHE BOOL "" FORCE) SET(LIBSAMPLERATE ON CACHE BOOL "" FORCE) SET(LIBSAMPLERATE_SHARED ON CACHE BOOL "" FORCE) SET(SDL_EVENTS ON CACHE BOOL "" FORCE) SET(SDL_THREADS ON CACHE BOOL "" FORCE) # This assumes you want to have SDL as a static library. If not, set SDL_STATIC # to OFF instead. SET(SDL_DLOPEN ON CACHE BOOL "" FORCE) SET(SDL_SHARED ON CACHE BOOL "" FORCE) SET(SDL_STATIC OFF CACHE BOOL "" FORCE) SET(SDL2_DISABLE_SDL2MAIN ON CACHE BOOL "" FORCE) SET(SDL2_DISABLE_INSTALL ON CACHE BOOL "" FORCE) SET(SDL2_DISABLE_UNINSTALL ON CACHE BOOL "" FORCE) # Copied from https://github.com/libsdl-org/SDL/commit/7774de0fe364fa997d58f2faa2199054d37bedf6 # # CMAKE_PREFIX_PATH and CMAKE_INSTALL_FULL_BINDIR can be a non-absolute path # when a master-project does e.g. `set(CMAKE_INSTALL_PREFIX "libs/SDL2" CACHE PATH "prefix" FORCE)`. if(NOT IS_ABSOLUTE "${CMAKE_INSTALL_PREFIX}") set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX}") endif() if(NOT IS_ABSOLUTE "${CMAKE_INSTALL_FULL_BINDIR}") set(CMAKE_INSTALL_FULL_BINDIR "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_FULL_BINDIR}") endif() ADD_SUBDIRECTORY(SDL2 EXCLUDE_FROM_ALL) # Work around macos-13 erroring on -Werror,-Wdeclaration-after-statement check_c_compiler_flag(-Wno-error=declaration-after-statement HAVE_GCC_WNO_ERROR_DECLARATION_AFTER_STATEMENT) if(HAVE_GCC_WNO_ERROR_DECLARATION_AFTER_STATEMENT) target_compile_options(sdl-build-options INTERFACE "-Wno-error=declaration-after-statement") endif() endif() # NOT OSP_USE_SYSTEM_SDL ```
OS info ``` Portage 3.0.51 (python 3.11.5-final-0, default/linux/amd64/17.1, gcc-13, glibc-2.37-r7, 6.1.31-gentoo x86_64) ================================================================= System uname: Linux-6.1.31-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E3-1240_V2_@_3.40GHz-with-glibc2.37 KiB Mem: 32841160 total, 1204304 free KiB Swap: 134217720 total, 132390392 free Timestamp of repository gentoo: Tue, 31 Oct 2023 01:01:58 +0000 Head commit of repository gentoo: 5594932526d2f8fce257289c3c0f37ea8aaeee6a Head commit of repository jonesmz-public-overlay: 72d2df2a45c6e616265ca2b47fc80c42d8a4c30d Head commit of repository lto-overlay: a46a5749ee6e70bcf2317f9d6e24037779b643a8 Head commit of repository mv: d9ffe9b7ccf80451bfe7a3187ecbb625af724fd6 Head commit of repository wsdd: 9f67b561aef062d6952d64a4cf224419c227b2db Head commit of repository steam-overlay: e6ea1449bcfc7c9157fc23be050ae15534992f22 sh bash 5.1_p16-r6 ld GNU ld (Gentoo 2.40 p5) 2.40.0 ccache version 4.8.2 [disabled] app-misc/pax-utils: 1.3.5::gentoo app-shells/bash: 5.1_p16-r6::gentoo dev-lang/perl: 5.38.0-r1::gentoo dev-lang/python: 3.11.5::gentoo dev-lang/rust: 1.71.1::gentoo dev-util/ccache: 4.8.2::gentoo dev-util/cmake: 3.26.5-r2::gentoo dev-util/meson: 1.2.1-r1::gentoo sys-apps/baselayout: 2.14::gentoo sys-apps/sandbox: 2.38::gentoo sys-apps/systemd: 253.11::gentoo sys-devel/autoconf: 2.13-r7::gentoo, 2.71-r6::gentoo sys-devel/automake: 1.16.5-r1::gentoo sys-devel/binutils: 2.40-r5::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/clang: 16.0.6::gentoo sys-devel/gcc: 13.2.1_p20230826::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/libtool: 2.4.7-r1::gentoo sys-devel/lld: 16.0.6::gentoo sys-devel/llvm: 16.0.6::gentoo sys-devel/make: 4.4.1-r1::gentoo sys-kernel/linux-headers: 6.1::gentoo (virtual/os-headers) sys-libs/glibc: 2.37-r7::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: git sync-uri: git://anongit.gentoo.org/repo/sync/gentoo.git priority: -1000 volatile: False jonesmz-public-overlay location: /var/db/repos/jonesmz-public-overlay sync-type: git sync-uri: https://github.com/jonesmz/gentoo-overlay.git masters: gentoo volatile: False lto-overlay location: /var/db/repos/lto-overlay sync-type: git sync-uri: https://github.com/InBetweenNames/gentooLTO.git masters: gentoo mv volatile: False mv location: /var/db/repos/mv sync-type: git sync-uri: https://anongit.gentoo.org/git/user/mv.git masters: gentoo volatile: False wsdd location: /var/db/repos/wsdd-gentoo sync-type: git sync-uri: https://github.com/christgau/wsdd-gentoo masters: gentoo volatile: False steam-overlay location: /var/db/repos/steam-overlay sync-type: git sync-uri: https://github.com/anyc/steam-overlay.git masters: gentoo priority: 50 volatile: False Installed sets: @archive, @creative, @desktop-applications, @lxqt, @pc-base-system, @portage ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=auto -fuse-linker-plugin -march=core2 -mtune=generic -mpopcnt" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=auto -fuse-linker-plugin -march=core2 -mtune=generic -mpopcnt -O2 -pipe" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS=" --jobs --keep-going --newrepo --newuse --changed-use --changed-deps --changed-slot --deep --tree --unordered-display --backtrack=3000 --complete-graph --with-bdeps=y --rebuild-if-new-rev --rebuild-if-new-ver --rebuild-if-unbuilt --rebuilt-binaries --binpkg-respect-use=y --binpkg-changed-deps=y --usepkg=y --buildpkg-exclude='virtual/*' --buildpkg-exclude='sys-kernel/*' --buildpkg-exclude='*/*-bin' --buildpkg-exclude='acct-user/*' --buildpkg-exclude='acct-group/*' --buildpkg-exclude='app-alternatives/*' --buildpkg-exclude='dev-perl/*' --usepkg-exclude='virtual/*' --usepkg-exclude='sys-kernel/*' --usepkg-exclude='*/*-bin' --usepkg-exclude='acct-user/*' --usepkg-exclude='acct-group/*' --usepkg-exclude='app-alternatives/*' --usepkg-exclude='dev-perl/*'" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live clean-logs compress-build-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles installsources ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms split-elog split-log splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" INSTALL_MASK="/etc/init.d/* /etc/cron.*/* /usr/share/doc/*/Changelog* /usr/share/doc/*/*/Changelog* /usr/share/doc/*/AUTHORS* /usr/share/doc/*/*/AUTHORS*" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LEX="flex" LINGUAS="en en_US" MAKEOPTS="-j10" PKGDIR="/var/cache/binpkgs" PORTAGE_COMPRESS="zstd" PORTAGE_COMPRESS_FLAGS="-15" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="X a52 aac acl acpi alsa amd64 branding bzip2 cairo cdda cdr cet cli crypt dbus dri dts dvd dvdr encode exif flac fortran gdbm gif gnome-keyring gpm gstreamer gtk gui hardened iconv icu ipv6 jpeg lcms libnotify libtirpc lzma mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf pie png policykit ppds pulseaudio qt5 readline sdl seccomp sound spell ssl ssp startup-notification svg systemd test-rust tiff truetype udev udisks unicode upower usb vaapi vorbis vulkan wxwidgets x264 xattr xcb xft xml xtpax xv xvid zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 mmxext sse sse3 lm cmov cx8 fpu fxsr mmx syscall sse2 cx16 lahf_lm popcnt ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="coreboot efi-64 emu qemu pc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AArch64 AMDGPU BPF WebAssembly X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" QEMU_SOFTMMU_TARGETS="aarch64 x86_64" QEMU_USER_TARGETS="aarch64 x86_64" RUBY_TARGETS="ruby31" VIDEO_CARDS="vesa modesetting radeon radeonsi amdgpu" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS ```
slouken commented 10 months ago

Interesting, that's defined in SDL_evdev_capabilities.h, which is included in SDL_evdev.c.

Do you not have HAVE_LINUX_INPUT_H defined?

jonesmz commented 10 months ago

Do you not have HAVE_LINUX_INPUT_H defined?

that one's set to the default value, not explicitly set to true or false by my parent cmake build.

madebr commented 10 months ago

Fixed in #8459. Can you please verify?

jonesmz commented 10 months ago

Does not appear to completely solve the compilation errors.

Updated local build to the commit from the referenced PR:

jonesmz@ymir ~/osp-magnum/3rdparty/SDL2 $ git log -n 1
commit 221d6ea8a8ca7141248aa8e16bf2200df7439688 (HEAD -> release-2.28.x, origin/release-2.28.x)
Author: Ozkan Sezer <sezeroz@gmail.com>
Date:   Thu Nov 2 23:33:20 2023 +0300

    configure: move HAVE_LINUX_INPUT_H to CheckInputEvents()

    c.f.: https://github.com/libsdl-org/SDL/pull/8459.
    Ref. issue https://github.com/libsdl-org/SDL/issues/8450
    (cherry picked from commit e226008d83c39b621e61529ced0acf07493d5c01)

Get these build errors:

[1/5 2.8/sec] Building C object 3rdparty/SDL2/CMakeFiles/SDL2.dir/Debug/src/core/linux/SDL_evdev.c.o
FAILED: 3rdparty/SDL2/CMakeFiles/SDL2.dir/Debug/src/core/linux/SDL_evdev.c.o 
/usr/bin/ccache /usr/lib/ccache/bin/gcc -DSDL2_EXPORTS -DUSING_GENERATED_CONFIG_H -DCMAKE_INTDIR=\"Debug\" -I/home/jonesmz/build-osp-magnum-Desktop-Debug/3rdparty/SDL2/include -I/home/jonesmz/build-osp-magnum-Desktop-Debug/3rdparty/SDL2/include/SDL2 -I/home/jonesmz/build-osp-magnum-Desktop-Debug/3rdparty/SDL2/include-config-debug/SDL2 -I/home/jonesmz/build-osp-magnum-Desktop-Debug/3rdparty/SDL2/include-config-debug -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -idirafter "/home/jonesmz/osp-magnum/3rdparty/SDL2/src/video/khronos" -DHAVE_LINUX_VERSION_H  -Wall -fno-strict-aliasing -Wdeclaration-after-statement -fvisibility=hidden -Wshadow -Wno-unused-local-typedefs -fdiagnostics-color=always -D_REENTRANT -I/usr/include  -DSDL_BUILD_MAJOR_VERSION=2 -DSDL_BUILD_MINOR_VERSION=28 -DSDL_BUILD_MICRO_VERSION=5 -g -fPIC -fno-omit-frame-pointer -O0 -gz -Wno-error=declaration-after-statement -MD -MT 3rdparty/SDL2/CMakeFiles/SDL2.dir/Debug/src/core/linux/SDL_evdev.c.o -MF 3rdparty/SDL2/CMakeFiles/SDL2.dir/Debug/src/core/linux/SDL_evdev.c.o.d -o 3rdparty/SDL2/CMakeFiles/SDL2.dir/Debug/src/core/linux/SDL_evdev.c.o -c /home/jonesmz/osp-magnum/3rdparty/SDL2/src/core/linux/SDL_evdev.c
/home/jonesmz/osp-magnum/3rdparty/SDL2/src/core/linux/SDL_evdev.c: In function ‘SDL_EVDEV_init_touchscreen’:
/home/jonesmz/osp-magnum/3rdparty/SDL2/src/core/linux/SDL_evdev.c:634:38: error: ‘SDL_UDEV_DEVICE_TOUCHPAD’ undeclared (first use in this function)
  634 |                        (udev_class & SDL_UDEV_DEVICE_TOUCHPAD) ? SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE : SDL_TOUCH_DEVICE_DIRECT,
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~
/home/jonesmz/osp-magnum/3rdparty/SDL2/src/core/linux/SDL_evdev.c:634:38: note: each undeclared identifier is reported only once for each function it appears in
/home/jonesmz/osp-magnum/3rdparty/SDL2/src/core/linux/SDL_evdev.c: In function ‘SDL_EVDEV_device_added’:
/home/jonesmz/osp-magnum/3rdparty/SDL2/src/core/linux/SDL_evdev.c:787:26: warning: implicit declaration of function ‘NBITS’; did you mean ‘NFDBITS’? [-Wimplicit-function-declaration]
  787 |     unsigned long relbit[NBITS(REL_MAX)] = { 0 };
      |                          ^~~~~
      |                          NFDBITS
/home/jonesmz/osp-magnum/3rdparty/SDL2/src/core/linux/SDL_evdev.c:787:44: error: variable-sized object may not be initialized except with an empty initializer
  787 |     unsigned long relbit[NBITS(REL_MAX)] = { 0 };
      |                                            ^
/home/jonesmz/osp-magnum/3rdparty/SDL2/src/core/linux/SDL_evdev.c:815:32: warning: implicit declaration of function ‘test_bit’ [-Wimplicit-function-declaration]
  815 |         item->relative_mouse = test_bit(REL_X, relbit) && test_bit(REL_Y, relbit);
      |                                ^~~~~~~~
/home/jonesmz/osp-magnum/3rdparty/SDL2/src/core/linux/SDL_evdev.c:821:23: error: ‘SDL_UDEV_DEVICE_TOUCHSCREEN’ undeclared (first use in this function)
  821 |     if (udev_class & (SDL_UDEV_DEVICE_TOUCHSCREEN | SDL_UDEV_DEVICE_TOUCHPAD)) {
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jonesmz/osp-magnum/3rdparty/SDL2/src/core/linux/SDL_evdev.c:821:53: error: ‘SDL_UDEV_DEVICE_TOUCHPAD’ undeclared (first use in this function)
  821 |     if (udev_class & (SDL_UDEV_DEVICE_TOUCHSCREEN | SDL_UDEV_DEVICE_TOUCHPAD)) {
      |                                                     ^~~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: cannot make progress due to previous errors.
17:04:40: The process "/usr/bin/cmake" exited with code 1.
Error while building/deploying project OSP-MAGNUM (kit: Desktop)
When executing step "Build"
17:04:40: Elapsed time: 00:00.
madebr commented 10 months ago

Can you post your CMakeCache.txt?

madebr commented 10 months ago

Also, make sure to purge the cmake cache before testing a newer git version.

jonesmz commented 10 months ago

Also, make sure to purge the cmake cache before testing a newer git version.

This was the problem.

Sorry for the noise. I now have an error-free build.

madebr commented 10 months ago

Great to hear. It would have been interesting to know what made your build fail though.