Bug 103558 - devel/sdl12 fails to compile on 5.5
Summary: devel/sdl12 fails to compile on 5.5
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Shaun Amott
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-24 13:00 UTC by Stefan Walter
Modified: 2006-11-21 16:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Walter 2006-09-24 13:00:33 UTC
The current version of devel/sdl12 does not compile on a 5.5 system over here.
The same version compiles fine on my 6.1-STABLE system.

/bin/sh ./libtool --mode=compile cc -O -pipe   -I/usr/local/include -I./include -D_GNU_SOURCE=1 -I/usr/local/include  -I/usr/X11R6/include -DXTHREADS -DHAVE_LIBUSBHID_H -DUSBHID_UCR_DATA -D_REENTRANT -c ./src/joystick/bsd/SDL_sysjoystick.c  -o build/SDL_sysjoystick.lo
 cc -O -pipe -I/usr/local/include -I./include -D_GNU_SOURCE=1 -I/usr/local/include -I/usr/X11R6/include -DXTHREADS -DHAVE_LIBUSBHID_H -DUSBHID_UCR_DATA -D_REENTRANT -c ./src/joystick/bsd/SDL_sysjoystick.c  -fPIC -DPIC -o build/.libs/SDL_sysjoystick.o
./src/joystick/bsd/SDL_sysjoystick.c: In function `SDL_SYS_JoystickOpen':
./src/joystick/bsd/SDL_sysjoystick.c:310: error: too many arguments to function `hid_start_parse'
./src/joystick/bsd/SDL_sysjoystick.c: In function `SDL_SYS_JoystickUpdate':
./src/joystick/bsd/SDL_sysjoystick.c:449: error: too many arguments to function `hid_start_parse'
*** Error code 1

Stop in /usr/obj-ports/usr/ports/devel/sdl12/work/SDL-1.2.11.
*** Error code 1

Stop in /usr/ports/devel/sdl12.

How-To-Repeat: Type 'make' in devel/sdl12.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-09-24 13:00:41 UTC
Responsible Changed
From-To: freebsd-ports-bugs->shaun

Over to maintainer
Comment 2 Riccardo Torrini 2006-09-28 11:52:56 UTC
Same problem on HEAD of early august and yesterday build,
solved myself but not able to create a patch file because
same file (bsd/SDL_sysjoystick.c) is already patched  8-(

Hope this help and speed up fix...


Quick & Dirty:

Start port build, wait for error, edit bsd/SDL_sysjoystick.c,
make line 310 the same as 312 and line 449 the same as line
451, continue build, install.


More ethical way:

diff -u3 SDL_sysjoystick.c.bad SDL_sysjoystick.c
--- SDL_sysjoystick.c.bad       Thu Sep 28 12:35:57 2006
+++ SDL_sysjoystick.c   Thu Sep 28 12:42:29 2006
@@ -307,7 +307,7 @@
        }
 
 #if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_version >= 500111)
-       hdata = hid_start_parse(hw->repdesc, 1 << hid_input, rep->rid);
+       hdata = hid_start_parse(hw->repdesc, 1 << hid_input);
 #else
        hdata = hid_start_parse(hw->repdesc, 1 << hid_input);
 #endif
@@ -446,7 +446,7 @@
                return;
        }
 #if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_version >= 500111)
-       hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input, rep->rid);
+       hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input);
 #else
        hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input);
 #endif


Clean way (imho):
Remove lines 309,310,311,313 and lines 448,449,450,452 (if/else/endif)


-- 
Riccardo.
Comment 3 Stefan Walter 2006-10-01 18:14:41 UTC
Riccardo Torrini, 28.09.06, 12:52h CEST:

> Same problem on HEAD of early august and yesterday build,
> solved myself but not able to create a patch file because
> same file (bsd/SDL_sysjoystick.c) is already patched  8-(
> 
> Hope this help and speed up fix...


Thanks, the proposed changes do indeed make it work on 5.5 as well. I hope
we can get this or an equivalent change in the tree before the ports
freeze.

Regards,
Stefan
Comment 4 Shaun Amott freebsd_committer freebsd_triage 2006-10-02 01:53:30 UTC
State Changed
From-To: open->analyzed

I am looking into this, but so far I have been unable to reproduce this 
problem on either -CURRENT or 5.5.
Comment 5 Palle Girgensohn freebsd_committer freebsd_triage 2006-10-02 16:39:43 UTC
I think the problem is bad old header files in your system.

I had this problem on one machine:

$ ls -l /usr/include/dev/usb/hid.h /usr/include/libusbhid.h 
/usr/include/libusb.h /usr/include/usbhid.h
-r--r--r--  1 root  wheel  3441  2 Feb  2006 /usr/include/dev/usb/hid.h
-r--r--r--  1 root  wheel  3457 25 Apr  2001 /usr/include/libusb.h
-r--r--r--  1 root  wheel  3500 28 Jan  2005 /usr/include/libusbhid.h
-r--r--r--  1 root  wheel  3526 25 Feb  2005 /usr/include/usbhid.h

but not on another
$ ls -l /usr/include/dev/usb/hid.h /usr/include/libusbhid.h 
/usr/include/libusb.h /usr/include/usbhid.h
ls: /usr/include/libusb.h: No such file or directory
ls: /usr/include/libusbhid.h: No such file or directory
-r--r--r--  1 root  wheel  3441 Nov  2  2005 /usr/include/dev/usb/hid.h
-r--r--r--  1 root  wheel  3526 Nov  2  2005 /usr/include/usbhid.h


So, removing /usr/include/libusb.h and  /usr/include/libusbhid.h fixes the 
problem.

Regards,
Palle
Comment 6 Stefan Walter 2006-10-02 17:37:55 UTC
Hi,

Palle Girgensohn, 02.10.06, 17:39h CEST:

> I think the problem is bad old header files in your system.

It seems you're right. I found some more old stuff lying around, so I
removed /usr/include completely and did another "make installworld". The
SDL port compiles fine now.

I guess this PR can be closed, then...

Thank you,
Stefan
Comment 7 Palle Girgensohn freebsd_committer freebsd_triage 2006-10-03 08:18:45 UTC
State Changed
From-To: analyzed->closed

Identified problem as old header files hanging around.
Comment 8 dfilter service freebsd_committer freebsd_triage 2006-11-21 16:48:28 UTC
shaun       2006-11-21 16:47:00 UTC

  FreeBSD ports repository

  Modified files:
    devel/sdl12          Makefile 
  Log:
  - Add an SVGALIB OPTION. [1]
  - Explicitly disable check for libusbhid.h where appropriate, as some
    systems still have this header hanging around. [2]
  
  PR:             ports/104366 [1], ports/103558 (related) [2]
  Submitted by:   Alex Kozlov <spam@rm-rf.kiev.ua> [1],
                  Stefan Walter <sw@gegenunendlich.de> + others [2]
  
  Revision  Changes    Path
  1.104     +6 -1      ports/devel/sdl12/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"