Bug 247905

Summary: devel/sdl20: Fails to build with HIDAPI=ON: SDL_hidapi.c:101:2: error: Need a hid.c for this platform!
Product: Ports & Packages Reporter: Ivan Rozhuk <rozhuk.im>
Component: Individual Port(s)Assignee: Dmitry Marakasov <amdmi3>
Status: Closed Overcome By Events    
Severity: Affects Some People CC: rozhuk.im, scf, sdalu, vvd
Priority: --- Keywords: needs-patch, needs-qa
Version: LatestFlags: bugzilla: maintainer-feedback? (amdmi3)
koobs: merge-quarterly?
Hardware: Any   
OS: Any   

Description Ivan Rozhuk 2020-07-11 05:48:37 UTC
With HIDAPI option

...
g -isystem /usr/local/include -fno-strict-aliasing -std=c99  -fdebug-prefix-map=/tmp/ports/usr/ports/devel/sdl20/work/SDL2-2.0.12=. -DLIBICONV_PLUG -isystem /usr/local/include -DUSING_GENERATED_CONFIG_H -Iinclude -I/tmp/ports/usr/ports/devel/sdl20/work/SDL2-2.0.12/include -idirafter /tmp/ports/usr/ports/devel/sdl20/work/SDL2-2.0.12/src/video/khronos  -mmmx -msse -msse2 -Wall -fno-strict-aliasing -fvisibility=hidden -Wdeclaration-after-statement -Werror=declaration-after-statement  -I/usr/local/include -I/usr/local/include -I/usr/local/include/libdrm  -I/usr/local/include  -DHAVE_USBHID_H -DUSBHID_NEW -I/tmp/ports/usr/ports/devel/sdl20/work/SDL2-2.0.12/src/hidapi/hidapi  -D_REENTRANT -D_THREAD_SAFE -MMD -MT build/SDL_hidapi.lo -c /tmp/ports/usr/ports/devel/sdl20/work/SDL2-2.0.12/src/hidapi/SDL_hidapi.c -o build/SDL_hidapi.lo
libtool: compile:  cc -O2 -pipe -O3 -pipe -funroll-loops -DSTRIP_FBSDID -D_FORTIFY_SOURCE=2 -mretpoline -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -std=c99 -fdebug-prefix-map=/tmp/ports/usr/ports/devel/sdl20/work/SDL2-2.0.12=. -DLIBICONV_PLUG -isystem /usr/local/include -DUSING_GENERATED_CONFIG_H -Iinclude -I/tmp/ports/usr/ports/devel/sdl20/work/SDL2-2.0.12/include -idirafter /tmp/ports/usr/ports/devel/sdl20/work/SDL2-2.0.12/src/video/khronos -mmmx -msse -msse2 -Wall -fno-strict-aliasing -fvisibility=hidden -Wdeclaration-after-statement -Werror=declaration-after-statement -I/usr/local/include -I/usr/local/include -I/usr/local/include/libdrm -I/usr/local/include -DHAVE_USBHID_H -DUSBHID_NEW -I/tmp/ports/usr/ports/devel/sdl20/work/SDL2-2.0.12/src/hidapi/hidapi -D_REENTRANT -D_THREAD_SAFE -MMD -MT build/SDL_hidapi.lo -c /tmp/ports/usr/ports/devel/sdl20/work/SDL2-2.0.12/src/hidapi/SDL_hidapi.c  -fPIC -DPIC -o build/.libs/SDL_hidapi.o
/tmp/ports/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!
 ^
/tmp/ports/usr/ports/devel/sdl20/work/SDL2-2.0.12/src/hidapi/SDL_hidapi.c:305:5: error: type name requires a specifier or qualifier
    F(hid_write);
    ^
/tmp/ports/usr/ports/devel/sdl20/work/SDL2-2.0.12/src/hidapi/SDL_hidapi.c:304:14: note: expanded from macro 'F'
#define F(x) typeof(x) *x
             ^
/tmp/ports/usr/ports/devel/sdl20/work/SDL2-2.0.12/src/hidapi/SDL_hidapi.c:305:7: error: a parameter list without types is only allowed in a function definition
    F(hid_write);
      ^
....
Comment 1 Dmitry Marakasov freebsd_committer freebsd_triage 2021-12-29 18:42:47 UTC
2.0.18 builds fine with HIDAPI