parallel-rdp vulkan/semaphore.h shadows the system <semaphore.h>
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- c
- Domain
- build-system
Research direction
Start by reading the parallel-rdp Vulkan include path configuration and the bundled header named in the report, mupen64plus-video-paraLLEl/parallel-rdp/vulkan/semaphore.h; check where C files receive that include path. Rename the header with a project-specific prefix and update its references. Done when system <semaphore.h> resolves correctly in the reported Raspberry Pi EGL build and the BSD eventcount case.
Written by the indexing model from the issue text.
Description
Since 09cdc84d ("parallel-rdp: counted semaphores in C"), semaphore.hpp became mupen64plus-video-paraLLEl/parallel-rdp/vulkan/semaphore.h. With HAVE_PARALLEL=1, -I.../parallel-rdp/vulkan is passed to every C file, so #include <semaphore.h> picks up this file instead of the system header.
This breaks the build on Raspberry Pi with the Broadcom userland EGL (platform=armv-neon, Lakka RPiZero2-GPiCase), where EGL/egl.h pulls in vcos_platform.h, which includes <semaphore.h>:
In file included from <sysroot>/usr/include/interface/vcos/vcos.h:118,
from <sysroot>/usr/include/interface/vmcs_host/vc_dispmanx.h:33,
from <sysroot>/usr/include/EGL/eglplatform.h:110,
from <sysroot>/usr/include/EGL/egl.h:36,
from libretro/glsm/glsm.c:56:
<sysroot>/usr/include/interface/vcos/pthreads/vcos_platform.h:96:9: error: unknown type name 'sem_t'
96 | typedef sem_t VCOS_SEMAPHORE_T;
| ^~~~~
The bundled libretro-common/rthreads/retro_eventcount.c should hit the same issue on BSD, where it includes <semaphore.h>.
Could the header get a prefixed name, e.g. granite_semaphore.h (matching its GRANITE_SEMAPHORE_H guard)?
Still present on 8e3bcf00.
Thanks
Asai, Shigeaki
- Dominant language
- C
- Stars
- 414
- Forks
- 155
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 4
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from libretro/parallel-n64
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
libretro/parallel-n64#855 · 8 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
libretro/parallel-n64#857 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 54/100
libretro/parallel-n64#856 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
libretro/parallel-n64#854 · 3 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
libretro/parallel-n64#853 ·
All issues in libretro/parallel-n64
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Mbed-TLS/TF-PSA-Crypto#984 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
enhancement help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
area: test kind: bug preview-effort: small priority: low
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day