Bug 247863

Summary: devel/sdl20: build error with HIDAPI - "Need a hid.c for this platform"
Product: Ports & Packages Reporter: edenist-fbz
Component: Individual Port(s)Assignee: Dmitry Marakasov <amdmi3>
Status: Closed Overcome By Events    
Severity: Affects Some People CC: doctorwhoguy
Priority: --- Flags: bugzilla: maintainer-feedback? (amdmi3)
Version: Latest   
Hardware: Any   
OS: Any   

Description edenist-fbz 2020-07-09 03:16:45 UTC
Building with poudriere, version 2.0.10_1 was building fine with the same options. The move to 2.0.12 is now causing the build to fail on SDL_hidapi.c with "Need a hid.c for this platform!"

Full log at: https://bsd.to/AtsB


***

Relevant error and options:

/wrkdirs/usr/ports/devel/sdl20/work/SDL2-2.0.12/src/hidapi/SDL_hidapi.c:101:2: error: Need a hid.c for this platform!
#error Need a hid.c for this platform!
 ^
/wrkdirs/usr/ports/devel/sdl20/work/SDL2-2.0.12/src/hidapi/SDL_hidapi.c:452:9: warning: unused variable 'err' [-Wunused-variable]
    int err;
        ^
/wrkdirs/usr/ports/devel/sdl20/work/SDL2-2.0.12/src/hidapi/SDL_hidapi.c:547:43: warning: unused variable 'last' [-Wunused-variable]
    struct hid_device_info *devs = NULL, *last = NULL, *new_dev;
                                          ^
/wrkdirs/usr/ports/devel/sdl20/work/SDL2-2.0.12/src/hidapi/SDL_hidapi.c:547:57: warning: unused variable 'new_dev' [-Wunused-variable]
    struct hid_device_info *devs = NULL, *last = NULL, *new_dev;
                                                        ^
/wrkdirs/usr/ports/devel/sdl20/work/SDL2-2.0.12/src/hidapi/SDL_hidapi.c:625:17: warning: unused variable 'pDevice' [-Wunused-variable]
    hid_device *pDevice = NULL;
                ^
/wrkdirs/usr/ports/devel/sdl20/work/SDL2-2.0.12/src/hidapi/SDL_hidapi.c:652:17: warning: unused variable 'pDevice' [-Wunused-variable]
    hid_device *pDevice = NULL;
                ^
5 warnings and 1 error generated.
gmake[1]: *** [Makefile:722: build/SDL_hidapi.lo] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/devel/sdl20/work/SDL2-2.0.12'
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/sdl20
=>> Cleaning up wrkdir
===>  Cleaning for sdl2-2.0.12
build of devel/sdl20 | sdl2-2.0.12 ended at Wed Jul  8 22:29:07 AEST 2020
build time: 442834:12:35
!!! build failure encountered !!!


---Begin OPTIONS List---
===> The following configuration options are available for sdl2-2.0.12:
     ALSA=off: Audio output via the ALSA audio architecture
     ASM=on: Use optimized assembly code
     DLOPEN=on: Use dlopen for loading 3rd party libraries
     HIDAPI=on: Use HIDAPI for low level joystick drivers
     JACK=off: Audio output via the JackD sound server
     NAS=off: Audio output via the Network Audio System
     OSS=on: Audio output via the Open Sound System
     PTHREADS=on: Use POSIX threads for multi-threading
     PULSEAUDIO=off: Audio output via the PulseAudio sound server
     SAMPLERATE=off: Audio rate conversion via libsamplerate
     SDL_ATOMIC=on: Enable the SDL Atomic subsystem
     SDL_AUDIO=on: Enable the SDL Audio subsystem
     SDL_CPUINFO=on: Enable the SDL CPUinfo subsystem
     SDL_EVENTS=on: Enable the SDL Events subsystem
     SDL_FILE=on: Enable the SDL File subsystem
     SDL_HAPTIC=on: Enable the SDL Haptic subsystem
     SDL_JOYSTICK=on: Enable the SDL Joystick subsystem
     SDL_LOADSO=on: Enable the SDL Loadso subsystem
     SDL_POWER=on: Enable the SDL Power subsystem
     SDL_RENDER=on: Enable the SDL Render subsystem
     SDL_THREADS=on: Enable the SDL Threads subsystem
     SDL_TIMERS=on: Enable the SDL Timers subsystem
     SDL_VIDEO=on: Enable the SDL Video subsystem
     SNDIO=off: Sndio audio support
     UDEV=on: Use udev for input device detection
     VIDEO_KMSDRM=on: KMSDRM display support
     VIDEO_OPENGL=on: OpenGL rendering support
     VIDEO_OPENGLES2=on: OpenGL ES 2.x rendering support
     VIDEO_WAYLAND=on: Wayland display support
     VIDEO_X11=on: X11 display support
===> Use 'make config' to modify these settings
---End OPTIONS List---
Comment 1 edenist-fbz 2020-07-09 03:28:53 UTC
Confirming that it builds fine with HIDAPI option turned off.

However I do need the HIDAPI option, so it isn't a solution.
Comment 2 Dmitry Marakasov freebsd_committer freebsd_triage 2021-12-29 18:42:59 UTC
2.0.18 builds fine with HIDAPI