Menu

#130 freeglut_joystick.c doesn't build on FreeBSD-8

None
closed-fixed
nobody
critical (31)
5
2022-08-30
2010-05-28
No

Hello I'm trying to port FreeGLUT 2.6 to FreeBSD-8
FreeGLUT fails to build on FreeBSD 8
This is because FreeBSD-8 has new USB stack.
Same applies to FreeGLUT 2.4 which is in ports tree

oystick.c
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/local/include -g -O2 -Wall -pedantic -llibusb -MT libglut_la-freeglut_joystick.lo -MD -MP -MF .deps/libglut_la-freeglut_joystick.Tpo -c freeglut_joystick.c -fPIC -DPIC -o .libs/libglut_la-freeglut_joystick.o
In file included from /usr/local/include/X11/extensions/xf86vmode.h:37,
from freeglut_internal.h:113,
from freeglut_joystick.c:35:
/usr/local/include/X11/Xmd.h:134: warning: ISO C90 does not support 'long long'
freeglut_joystick.c: In function 'fghJoystickWalkUSBdev':
freeglut_joystick.c:204: error: storage size of 'di' isn't known
freeglut_joystick.c:210: error: 'USB_DEVICEINFO' undeclared (first use in this function)
freeglut_joystick.c:210: error: (Each undeclared identifier is reported only once
freeglut_joystick.c:210: error: for each function it appears in.)
freeglut_joystick.c:212: error: 'USB_MAX_DEVNAMES' undeclared (first use in this function)
freeglut_joystick.c:204: warning: unused variable 'di'
freeglut_joystick.c: In function 'fghJoystickFindUSBdev':
freeglut_joystick.c:233: warning: unused variable 'protection_warned'
freeglut_joystick.c: In function 'fghJoystickInitializeHID':
freeglut_joystick.c:280: error: 'USB_GET_REPORT_ID' undeclared (first use in this function)
*** Error code 1

Stop in /files/download/freeglut-2.6.0/src.
*** Error code 1

Stop in /files/download/freeglut-2.6.0.
*** Error code 1

Stop in /files/download/freeglut-2.6.0.

Discussion

  • Anonymous

    Anonymous - 2010-05-28
     
  • Anonymous

    Anonymous - 2010-05-28

    As a quick workaround I applied fallowing patch

     
  • Anonymous

    Anonymous - 2010-05-28

    ugly workaround

     
  • Anonymous

    Anonymous - 2010-05-28
    • summary: FreeGLUT doesn't build on FreeBSD-8 --> freeglut_joystick.c doesn't build on FreeBSD-8
     
  • John Tsiombikas

    John Tsiombikas - 2022-08-30
    • status: open --> closed-fixed
    • Group: -->
     
  • John Tsiombikas

    John Tsiombikas - 2022-08-30

    I changed the joystick code by following more or less what the freebsd ports patches do. Now freeglut builds properly on current(-ish) freebsd, but the joystick functionality doesn't seem to work.

    I opened a new issue about this on github, feel free to follow along there: https://github.com/FreeGLUTProject/freeglut/issues/118

     

    Last edit: John Tsiombikas 2022-08-30

Log in to post a comment.