Subject: | warnings during build and test fails |
I just installed L-I-W and noticed some warnings while it was building:
Checking if your kit is complete...
Looks good
Writing Makefile for Linux::Input::Wiimote
cp Wiimote.pm blib/lib/Linux/Input/Wiimote.pm
/usr/bin/perl /usr/lib/perl5/5.8.6/ExtUtils/xsubpp -typemap
/usr/lib/perl5/5.8.6/ExtUtils/typemap Wiimote.xs > Wiimote.xsc && mv
Wiimote.xsc Wiimote.c
Please specify prototyping behavior for Wiimote.xs (see perlxs manual)
cc -c -I./src -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBUGGING -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -fmessage-length=0 -Wall -g -Wall -pipe
-DVERSION=\"0.03\" -DXS_VERSION=\"0.03\" -fPIC
"-I/usr/lib/perl5/5.8.6/x86_64-linux-thread-multi/CORE" -D_ENABLE_TILT
-D_ENABLE_FORCE Wiimote.c
Wiimote.xs:20:20: warning: multi-character character constant
Wiimote.xs: In function `XS_Linux__Input__Wiimote_c_wiimote_discover':
Wiimote.xs:20: warning: assignment makes pointer from integer without a cast
Wiimote.xs:26: warning: assignment makes pointer from integer without a cast
Running Mkbootstrap for Linux::Input::Wiimote ()
chmod 644 Wiimote.bs
rm -f blib/arch/auto/Linux/Input/Wiimote/Wiimote.so
LD_RUN_PATH="/usr/local/lib64:/usr/lib64" cc -shared -L/usr/local/lib64
Wiimote.o -o blib/arch/auto/Linux/Input/Wiimote/Wiimote.so -lcwiimote
-lbluetooth
chmod 755 blib/arch/auto/Linux/Input/Wiimote/Wiimote.so
cp Wiimote.bs blib/arch/auto/Linux/Input/Wiimote/Wiimote.bs
chmod 644 blib/arch/auto/Linux/Input/Wiimote/Wiimote.bs
Manifying blib/man3/Linux::Input::Wiimote.3pm
/usr/bin/make -- OK
I don't know if they matter but the test fails. Note that I'm on a
64-bit AMD machine. The libwiimote tests do work. When I run the test
after adding my wiimote address, it runs and I see
my-prompt$ ./test.pl
test.pl - libcwiimote perl module test application
A - hold to Enable accelerometer
1 - hold to Enable rumble
Home - Exit
Press buttons 1 and 2 on the wiimote now to connect.
When I press those buttons the program exits immediately and I see:
Connect 0
-------------------------------
my-prompt$
Presumably the undocumented method wiimote_is_open() is returning false.
I added a call to warn in the loop and it didn't print anything. I'll
see if I can find out more but I'm not very familiar with XS.
My perl is:
# perl -V
Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
Platform:
osname=linux, osvers=2.6.9, archname=x86_64-linux-thread-multi
uname='linux aguirre 2.6.9 #1 smp mon dec 12 18:32:25 utc 2005
x86_64 x86_64 x86_64 gnulinux '
config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr
-Dinstallusrbinperl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm
-Duseshrplib=true -Doptimize=-O2 -fmessage-length=0 -Wall -g -Wall -pipe'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=define uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBUGGING -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
optimize='-O2 -fmessage-length=0 -Wall -g -Wall -pipe',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
-fno-strict-aliasing -pipe'
ccversion='', gccversion='3.3.5 20050117 (prerelease) (SUSE Linux)',
gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib64'
libpth=/lib64 /usr/lib64 /usr/local/lib64
libs=-lm -ldl -lcrypt -lpthread
perllibs=-lm -ldl -lcrypt -lpthread
libc=/lib64//lib64/libc.so.6, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.3.4'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-rpath,/usr/lib/perl5/5.8.6/x86_64-linux-thread-multi/CORE'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib64'
Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS
USE_64_BIT_INT USE_64_BIT_ALL USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
Locally applied patches:
SPRINTF0 - fixes for sprintf formatting issues - CVE-2005-3962
Built under linux
Compiled at Dec 17 2005 03:26:32
%ENV:
PERL5LIB="/home/dhoworth/progs/modules"
PERLDOC_PAGER="vi"
@INC:
/home/dhoworth/progs/modules
/usr/lib/perl5/5.8.6/x86_64-linux-thread-multi
/usr/lib/perl5/5.8.6
/usr/lib/perl5/site_perl/5.8.6/x86_64-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.6
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.6/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.6
/usr/lib/perl5/vendor_perl
.