Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

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

open
nobody
critical (31)
5
2010-05-28
2010-05-28
Aldis Berjoza
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

  • Aldis Berjoza
    Aldis Berjoza
    2010-05-28

     
    Attachments
  • Aldis Berjoza
    Aldis Berjoza
    2010-05-28

    As a quick workaround I applied fallowing patch

     
  • Aldis Berjoza
    Aldis Berjoza
    2010-05-28

    ugly workaround

     
  • Aldis Berjoza
    Aldis Berjoza
    2010-05-28

    • summary: FreeGLUT doesn't build on FreeBSD-8 --> freeglut_joystick.c doesn't build on FreeBSD-8