Can't build Retroarch with clang-toolchain with --enable-wayland
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 14.1k
- Forks
- 2.2k
- Avg merge
- 7h 35m
- Merged PRs (30d)
- 51
Description
Can't build Retroarch with clang-toolchain with --enable-wayland
configurate with libcxx (i have libcxx as default c++ lib for clang on gentoo):
CC=clang CXX=clang++ COMMON_FLAGS="-flto -march=znver2 -mtune=znver2 -O3 -pipe" CFLAGS="${COMMON_FLAGS}" CXXFLAGS="${COMMON_FLAGS}" FCFLAGS="${COMMON_FLAGS}" FFLAGS="${COMMON_FLAGS}" MAKEOPTS="-j12" LDFLAGS="${LDFLAGS} -Wl,--as-needed" ./configure --disable-nvda --disable-winrawinput --disable-blissbox --disable-rgui --disable-materialui --disable-xmb --disable-runahead --disable-sdl --disable-sdl2 --disable-libusb --enable-dbus --enable-udev --enable-ffmpeg --disable-ssa --disable-networkgamepad --disable-netplaydiscovery --enable-opengl_core --disable-x11 --disable-kms --enable-wayland --disable-builtinzlib --disable-alsa --disable-tinyalsa --enable-pulse --disable-builtinflac --disable-cheevos --disable-rbmp --disable-cdrom
make with libcxx:
CC input/common/wayland_common.c
CC input/drivers/wayland_input.c
CC gfx/common/wayland_common.c
CC gfx/common/wayland/viewporter.c
CC gfx/common/wayland/xdg-shell.c
gfx/drivers_context/wayland_ctx.c:397:38: error: incompatible integer to pointer conversion passing
'EGLNativeWindowType' (aka 'unsigned long') to parameter of type 'void *' [-Wint-conversion]
397 | if (!egl_create_suCC gfx/common/wayland/idle-inhibit-unstable-v1.c
rface(&wl->egl, (EGLNativeWindowType)wl->win))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
gfx/drivers_context/../common/../../input/common/../../gfx/common/egl_common.h:117:52: note: passing
argument to parameter 'native_window' here
117 | bool egl_create_surface(egl_ctx_data_t *egl, void *native_window);
| ^
1 error generated.
configure with libstdc++ :
CC=clang CXX=clang++ COMMON_FLAGS="-flto -march=znver2 -mtune=znver2 -O3 -pipe" CFLAGS="${COMMON_FLAGS}" CXXFLAGS="${COMMON_FLAGS} -stdlib=libstdc++" FCFLAGS="${COMMON_FLAGS}" FFLAGS="${COMMON_FLAGS}" MAKEOPTS="-j12" LDFLAGS="${LDFLAGS} -Wl,--as-needed" ./configure --disable-nvda --disable-winrawinput --disable-blissbox --disable-rgui --disable-materialui --disable-xmb --disable-runahead --disable-sdl --disable-sdl2 --disable-libusb --enable-dbus --enable-udev --enable-ffmpeg --disable-ssa --disable-networkgamepad --disable-netplaydiscovery --enable-opengl_core --disable-x11 --disable-kms --enable-wayland --disable-builtinzlib --disable-alsa --disable-tinyalsa --enable-pulse --disable-builtinflac --disable-cheevos --disable-rbmp --disable-cdrom
make with libstdc++ :
gfx/drivers_context/wayland_ctx.c:397:38: error: incompatible integer to pointer conversion passing
'EGLNativeWindowType' (aka 'unsigned long') to parameter of type 'void *' [-Wint-conversion]
397 | if (!egl_create_surface(&wl->egl, (EGLNativeWindowType)wl->win))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
gfx/drivers_context/../common/../../input/common/../../gfx/common/egl_common.h:117:52: note: passing
argument to parameter 'native_window' here
117 | bool egl_create_surface(egl_ctx_data_t *egl, void *native_window);
| ^
1 error generated.
configure with gcc:
COMMON_FLAGS="-flto -march=znver2 -mtune=znver2 -O3 -pipe" CFLAGS="${COMMON_FLAGS}" CXXFLAGS="${COMMON_FLAGS}" FCFLAGS="${COMMON_FLAGS}" FFLAGS="${COMMON_FLAGS}" MAKEOPTS="-j12" LDFLAGS="${LDFLAGS} -Wl,--as-needed" ./configure --disable-nvda --disable-winrawinput --disable-blissbox --disable-rgui --disable-materialui --disable-xmb --disable-runahead --disable-sdl --disable-sdl2 --disable-libusb --enable-dbus --enable-udev --enable-ffmpeg --disable-ssa --disable-networkgamepad --disable-netplaydiscovery --enable-opengl_core --disable-x11 --disable-kms --enable-wayland --disable-builtinzlib --disable-alsa --disable-tinyalsa --enable-pulse --disable-builtinflac --disable-cheevos --disable-rbmp --disable-cdrom
and successful make
OS: Gentoo
verbose information about os:
ld GNU ld (Gentoo 2.40 p5) 2.40.0
app-misc/pax-utils: 1.3.7::gentoo
app-shells/bash: 5.2_p21::gentoo
dev-lang/perl: 5.38.0-r1::gentoo
dev-lang/python: 3.11.6::gentoo
dev-lang/rust: 1.73.0::gentoo
dev-util/cmake: 3.27.7::gentoo
dev-util/meson: 1.2.3::gentoo
sys-apps/baselayout: 2.14-r1::gentoo
sys-apps/openrc: 0.52.1::gentoo
sys-apps/sandbox: 2.38::gentoo
sys-devel/autoconf: 2.71-r7::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: 17.0.4::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: 17.0.4::gentoo
sys-devel/llvm: 17.0.4::gentoo
sys-devel/make: 4.4.1-r1::gentoo
sys-kernel/linux-headers: 6.6::gentoo (virtual/os-headers)
sys-libs/glibc: 2.38-r7::gentoo
Version of retroarch: last commit from git
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure using gfx/drivers_context/wayland_ctx.c:397 with the reported Clang and Wayland configuration, then inspect gfx/common/egl_common.h:117 and the surrounding EGL setup. Confirm that the project builds successfully with the affected compiler configuration without introducing regressions in the Wayland path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- build-system, desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100