0.6 is an old release, you should use 0.7-svn direct from SVN. And I
should make a proper 0.7 release :)
.hc
On Dec 21, 2010, at 9:09 AM, Willy WOLFF wrote:
Hi. I want to use my joystick with pd, so i use hid. But have some difficult to use it :/
This is the installation of hid under gentoo :
Emerging (1 of 1) puredata-externals/hid-0.6 from pd-overlay
- Adjusting permissions for FEATURES=distcc: '/dev/shm/
portage/.distcc'
- Adjusting permissions for FEATURES=distcc:
'/dev/shm/portage/.distcc/lock'
- Adjusting permissions for FEATURES=distcc:
'/dev/shm/portage/.distcc/state'
hid-0.6.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...
[ ok ]
Package: puredata-externals/hid-0.6
Repository: pd-overlay
Maintainer: willy_wolff@users.sourceforge.net
USE: debug elibc_glibc examples kernel_linux userland_GNU x86
Unpacking source... Unpacking hid-0.6.tar.bz2 to
/dev/shm/portage/puredata-externals/hid-0.6/work
Source unpacked in /dev/shm/portage/puredata-externals/hid-0.6/work Preparing source in
/dev/shm/portage/puredata-externals/hid-0.6/work/hid-0.6 ...
Applying hid-0.6-Makefile.patch ...
[ ok ]
Applying hid-0.6-debug.patch ...
[ ok ]
Source prepared. Configuring source in
/dev/shm/portage/puredata-externals/hid-0.6/work/hid-0.6 ...
Source configured. Compiling source in
/dev/shm/portage/puredata-externals/hid-0.6/work/hid-0.6 ... make -j1 clean rm -f *.pd_* *.o *~ input_arrays.? doc/ev*-list.pd make -j1 'OUR_CFLAGS=-O2 -march=athlon-xp -pipe' test -f input_arrays.h || ./make-arrays-from-input.h.pl cc -O2 -march=athlon-xp -pipe -fPIC -I./ -I/usr/include -I./HID
Utilities\ Source -c *.c hid_linux.c: In function ‘hid_open_device’: hid_linux.c:391: warning: format ‘%d’ expects type ‘int’, but
argument 3 has type ‘t_int’ In file included from /usr/include/string.h:640, from hid_linux.c:9: In function ‘strcpy’, inlined from ‘hid_get_events’ at hid_linux.c:357: /usr/include/bits/string3.h:107: warning: call to
__builtin___strcpy_chk will always overflow destination buffer ld -export_dynamic -shared -o hid.pd_linux *.o -lc -lm ld: warning: cannot find entry symbol xport_dynamic; defaulting to 0000000000003e20 strip --strip-unneeded hid.pd_linux rm hid.oSource compiled. Test phase [not enabled]: puredata-externals/hid-0.6
Install hid-0.6 into
/dev/shm/portage/puredata-externals/hid-0.6/image/ category puredata-externals
Completed installing hid-0.6 into
/dev/shm/portage/puredata-externals/hid-0.6/image/
QA Notice: Pre-stripped files found:
/usr/lib/pd/extra/hid/hid.pd_linux
QA Notice: Package has poor programming practices which may compile
fine but exhibit random runtime failures.
/usr/include/bits/string3.h:107: warning: call to
__builtin___strcpy_chk will always overflow destination buffer
- Please do not file a Gentoo bug and instead report the above QA
- issues directly to the upstream developers of this software.
- Homepage: http://at.or.at/hans/pd/hid.html
Installing (1 of 1) puredata-externals/hid-0.6 Auto-cleaning packages...
No outdated packages were found on your system.
- GNU info directory index is up-to-date.
Content of patch i must applied :
localhost willy # cat /var/lib/layman/pd-overlay/puredata-externals/hid/files/hid-0.6- Makefile.patch
--- Makefile.orig 2007-01-30 20:31:31.633172665 +0100 +++ Makefile 2007-01-30 21:42:38.223035750 +0100 @@ -33,7 +33,7 @@ ## standard #PDEXECUTABLE = /usr/local/bin/pd # standard dev layout location -PDEXECUTABLE = ../../../pd/bin/pd +PDEXECUTABLE = /usr/bin/pd
# generic optimization @@ -49,9 +49,9 @@ # faster G4 7450 optimization on Mac OS X ( -fast gives errors, use - O3 instead) #OPT_FLAGS = -O3 -mcpu=7450 -faltivec -ffast-math -fPIC
-CFLAGS = $(OPT_FLAGS) -Wall -W -Wno-shadow -Wstrict-prototypes -Wno- unused +CFLAGS = $(OUR_CFLAGS) -fPIC
-INCLUDE = -I./ -I../../../pd/src -I./HID\ Utilities\ Source +INCLUDE = -I./ -I/usr/include -I./HID\ Utilities\ Source
.c.o: $(CC) $(CFLAGS) $(INCLUDE) -c *.c
localhost willy # cat /var/lib/layman/pd-overlay/puredata-externals/hid/files/hid-0.6- debug.patch --- hid.c.orig 2006-12-25 19:35:57.371574869 +0100 +++ hid.c 2006-12-25 19:36:33.121998592 +0100 @@ -29,8 +29,8 @@
- LOCAL DEFINES
*/
-#define DEBUG(x) -//#define DEBUG(x) x +//#define DEBUG(x) +#define DEBUG(x) x
/ *------------------------------------------------------------------------------
- FUNCTION PROTOTYPES
So, i start pd, use hid help, and open the good device of my joystick. When i push button of joystick, pd segfault :/
This is the log in the shell :
localhost willy # pd priority 6 scheduling enabled. priority 8 scheduling enabled. *** buffer overflow detected ***: pd terminated ======= Backtrace: ========= /lib/libc.so.6(__fortify_fail+0x50)[0xb7695700] /lib/libc.so.6(+0xe175a)[0xb769375a] /lib/libc.so.6(__strcpy_chk+0x44)[0xb7692a64] /usr/lib/pd/extra/hid/hid.pd_linux(hid_get_events+0x67)[0xb7857f27] /usr/lib/pd/extra/hid/hid.pd_linux(hid_read+0x22)[0xb7858a32] pd(m_mainloop+0xa1e)[0x80bb64e] ======= Memory map: ======== 08048000-0812c000 r-xp 00000000 08:05 125020 /usr/bin/pd 0812c000-0812d000 r--p 000e3000 08:05 125020 /usr/bin/pd 0812d000-0812e000 rw-p 000e4000 08:05 125020 /usr/bin/pd 0812e000-0827d000 rw-p 00000000 00:00 0 [heap] b747a000-b749c000 r-xp 00000000 08:05 9398 /usr/lib/pd/extra/zexy/zexy.pd_linux b749c000-b749d000 r--p 00021000 08:05 9398 /usr/lib/pd/extra/zexy/zexy.pd_linux b749d000-b749e000 rw-p 00022000 08:05 9398 /usr/lib/pd/extra/zexy/zexy.pd_linux b749e000-b74a0000 rw-p 00000000 00:00 0 b74a0000-b74bc000 r-xp 00000000 08:05 129967 /usr/lib/gcc/i686-pc-linux-gnu/4.4.4/libgcc_s.so.1 b74bc000-b74bd000 r--p 0001b000 08:05 129967 /usr/lib/gcc/i686-pc-linux-gnu/4.4.4/libgcc_s.so.1 b74bd000-b74be000 rw-p 0001c000 08:05 129967 /usr/lib/gcc/i686-pc-linux-gnu/4.4.4/libgcc_s.so.1 b74be000-b75a6000 r-xp 00000000 08:05 129976 /usr/lib/gcc/i686-pc-linux-gnu/4.4.4/libstdc++.so.6.0.13 b75a6000-b75aa000 r--p 000e8000 08:05 129976 /usr/lib/gcc/i686-pc-linux-gnu/4.4.4/libstdc++.so.6.0.13 b75aa000-b75ab000 rw-p 000ec000 08:05 129976 /usr/lib/gcc/i686-pc-linux-gnu/4.4.4/libstdc++.so.6.0.13 b75ab000-b75b2000 rw-p 00000000 00:00 0 b75b2000-b76f1000 r-xp 00000000 08:02 49260 /lib/libc-2.11.2.so b76f1000-b76f3000 r--p 0013f000 08:02 49260 /lib/libc-2.11.2.so b76f3000-b76f4000 rw-p 00141000 08:02 49260 /lib/libc-2.11.2.so b76f4000-b76f7000 rw-p 00000000 00:00 0 b76f7000-b770c000 r-xp 00000000 08:02 49041 /lib/ libpthread-2.11.2.so b770c000-b770d000 r--p 00014000 08:02 49041 /lib/ libpthread-2.11.2.so b770d000-b770e000 rw-p 00015000 08:02 49041 /lib/ libpthread-2.11.2.so b770e000-b7711000 rw-p 00000000 00:00 0 b7711000-b7735000 r-xp 00000000 08:02 49164 /lib/libm-2.11.2.so b7735000-b7736000 r--p 00023000 08:02 49164 /lib/libm-2.11.2.so b7736000-b7737000 rw-p 00024000 08:02 49164 /lib/libm-2.11.2.so b7737000-b7739000 r-xp 00000000 08:02 49166 /lib/libdl-2.11.2.so b7739000-b773a000 r--p 00001000 08:02 49166 /lib/libdl-2.11.2.so b773a000-b773b000 rw-p 00002000 08:02 49166 /lib/libdl-2.11.2.so b773b000-b777d000 r-xp 00000000 08:05 399041 /usr/lib/libjack.so. 0.1.0 b777d000-b777e000 r--p 00041000 08:05 399041 /usr/lib/libjack.so. 0.1.0 b777e000-b777f000 rw-p 00042000 08:05 399041 /usr/lib/libjack.so. 0.1.0 b777f000-b7786000 r-xp 00000000 08:02 49228 /lib/librt-2.11.2.so b7786000-b7787000 r--p 00006000 08:02 49228 /lib/librt-2.11.2.so b7787000-b7788000 rw-p 00007000 08:02 49228 /lib/librt-2.11.2.so b7788000-b783b000 r-xp 00000000 08:05 397495 /usr/lib/ libasound.so.2.0.0 b783b000-b783c000 ---p 000b3000 08:05 397495 /usr/lib/ libasound.so.2.0.0 b783c000-b783f000 r--p 000b3000 08:05 397495 /usr/lib/ libasound.so.2.0.0 b783f000-b7840000 rw-p 000b6000 08:05 397495 /usr/lib/ libasound.so.2.0.0 b7851000-b785c000 r-xp 00000000 08:05 33767 /usr/lib/pd/extra/hid/hid.pd_linux b785c000-b785d000 r--p 0000a000 08:05 33767 /usr/lib/pd/extra/hid/hid.pd_linux b785d000-b785f000 rw-p 0000b000 08:05 33767 /usr/lib/pd/extra/hid/hid.pd_linux b785f000-b7860000 rw-p 00000000 00:00 0 b7860000-b7861000 r-xp 00000000 00:00 0 [vdso] b7861000-b787d000 r-xp 00000000 08:02 49252 /lib/ld-2.11.2.so b787d000-b787e000 r--p 0001b000 08:02 49252 /lib/ld-2.11.2.so b787e000-b787f000 rw-p 0001c000 08:02 49252 /lib/ld-2.11.2.so bfd8c000-bfdae000 rw-p 00000000 00:00 0 [stack] Pd: signal 6 pd_gui: pd process exited localhost willy #
So, what can we do for debugging hid?
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure out
how to use my telephone." --Bjarne Stroustrup (creator of C++)