Sorry about not having a good error handling. And not having a nice document. You are always welcome to write one. I could try any easy solution. Hope things go well. --daishi
At Mon, 2 Jun 2008 23:05:18 -0700, Tom Poliquin wrote: > > Dashi, > > I messed up. > > I dumbly used the 'svm-predict' example without > creating a model file! > So it looks like that is what caused the segfault. > > I used your other example (svm-train), which > was well behaved but gave me the error shown > below. > > I'll try to get some time in the next day or two > to create a real dataset and play with it a bit. > > Looks like it's installed Ok .. > > Thanks for the help and I'll update you > with my results. > > Tom > > -------- > Error using svm-train example: > -------- > CHICKEN > (c)2008 The Chicken Team > (c)2000-2007 Felix L. Winkelmann > Version 3.1.0 - linux-unix-gnu-x86 [ manyargs dload ptables applyhook ] > SVN rev. 10106 compiled 2008-05-20 on giliath (Linux) > > ; loading svm.scm ... > ; loading /home/cowboyneal/lib/chicken/3/libsvm.so ... > ; loading /home/cowboyneal/lib/chicken/3/libsvm_core.so ... > Error: libsvm: invalid data length > > Call history: > > <syntax> (define model (svm-train (new-svm-problem > labels > data) (new-svm-parameter))) > <syntax> (##core#set! model (svm-train > (new-svm-problem > l > abels data) (new-svm-parameter))) > <syntax> (svm-train (new-svm-problem labels data) > (new-sv > m-parameter)) > <syntax> (new-svm-problem labels data) > <syntax> (new-svm-parameter) > <eval> (svm-train (new-svm-problem labels data) > (new-svm-parame > ter)) > <eval> (new-svm-problem labels data) > libsvm.scm: 122 error <-- > -------- > > > Dashi, > > > > Thanks for the reply .. and sorry for my delay > > (startup deadline) .. > > > > > Tom Poliquin wrote: > > > > I'm trying to install the libsvm egg and not > > > > having much success. > > > > > > I've updated the egg (v1.1), which hopefully works fine. > > > Please give it a try. > > > > I tried it out and still having difficulties (albeit different ones :-) ) > > > > Here's the output of chicken-setup .. > > > > ------------------ > > [EMAIL PROTECTED] chicken]$ chicken-setup libsvm > > > > The extension libsvm does not exist. > > Do you want to download it ? (yes/no/abort) [yes] yes > > downloading libsvm.egg from (www.call-with-current-continuation.org eggs/3 > > 80) gzip -d -c /tmp/chicken-setup-3-cowboyneal/downloads/libsvm.egg | tar > > xf - /home/cowboyneal/bin/csc -feature compiling-extension -s -O2 > > libsvm_core.scm l > > ibsvm_core_wrap.c -lsvm -I/usr/include/libsvm-2.0/libsvm > > /home/cowboyneal/bin/csc -feature compiling-extension -s -O2 libsvm.scm > > Warning: extension `libsvm_core' is currently not installed > > rm -fr /home/cowboyneal/lib/chicken/3/libsvm.so > > cp -r libsvm.so /home/cowboyneal/lib/chicken/3/libsvm.so > > chmod a+r /home/cowboyneal/lib/chicken/3/libsvm.so > > rm -fr /home/cowboyneal/lib/chicken/3/libsvm_core.so > > cp -r libsvm_core.so /home/cowboyneal/lib/chicken/3/libsvm_core.so > > chmod a+r /home/cowboyneal/lib/chicken/3/libsvm_core.so > > ------------------ > > > > I ran it and got an undefined symbol .. __cxa_pure_virtual > > > > ------------------ > > [EMAIL PROTECTED] ~]$ csi svm.scm > > > > CHICKEN > > (c)2008 The Chicken Team > > (c)2000-2007 Felix L. Winkelmann > > Version 3.1.0 - linux-unix-gnu-x86 [ manyargs dload ptables applyhook > > ] SVN rev. 10106 compiled 2008-05-20 on giliath (Linux) > > > > ; loading svm.scm ... > > ; loading /home/cowboyneal/lib/chicken/3/libsvm.so ... > > ; loading /home/cowboyneal/lib/chicken/3/libsvm_core.so ... > > Error: (load) unable to load compiled module > > "/home/cowboyneal/lib/chicken/3/libsvm_core.so" > > "/home/cowboyneal/lib/libsvm.so.1: undefined symbol: __cxa_pure_virtual" > > ------------------ > > > > I dug around the Internet a bit and found it might be related > > to libsupc++ so I edited the libsvm egg build to add it, see below. > > (again I'm not an expert at this stuff). > > > > I reran the setup (by untarring the egg and running chicken-setup) > > and got .. > > > > ------------------ > > [EMAIL PROTECTED] libsvm]$ chicken-setup > > /home/cowboyneal/bin/csc -feature compiling-extension -s -O2 > > libsvm_core.scm libsvm_core_wrap.c -lsvm -lsupc++ > > -I/usr/include/libsvm-2.0/libsvm /home/cowboyneal/bin/csc -feature > > compiling-extension -s -O2 libsvm.scm rm -fr > > /home/cowboyneal/lib/chicken/3/libsvm.so > > cp -r libsvm.so /home/cowboyneal/lib/chicken/3/libsvm.so > > chmod a+r /home/cowboyneal/lib/chicken/3/libsvm.so > > rm -fr /home/cowboyneal/lib/chicken/3/libsvm_core.so > > cp -r libsvm_core.so /home/cowboyneal/lib/chicken/3/libsvm_core.so > > chmod a+r /home/cowboyneal/lib/chicken/3/libsvm_core.so > > chmod a+r /home/cowboyneal/lib/chicken/3/libsvm.setup-info > > ------------------ > > > > All seemed well until I ran the test code .. > > which ended with a SegFault. > > > > ------------------ > > [EMAIL PROTECTED] ~]$ csi svm.scm > > CHICKEN > > (c)2008 The Chicken Team > > (c)2000-2007 Felix L. Winkelmann > > Version 3.1.0 - linux-unix-gnu-x86 [ manyargs dload ptables applyhook > > ] SVN rev. 10106 compiled 2008-05-20 on giliath (Linux) > > ; loading svm.scm ... > > ; loading /home/cowboyneal/lib/chicken/3/libsvm.so ... > > ; loading /home/cowboyneal/lib/chicken/3/libsvm_core.so ... > > Segmentation fault > > ------------------ > > > > Looks like it's dying when loading the actual libsvm.so.1 .. > > Did I mess up in building it? > > > > > > g++ -fPIC -Wall -O3 -c svm.cpp > > > > ld -shared -soname libsvm.so.1 -o libsvm.so.1.0 -lc svm.o > > > > I then moved the .so into my ~/lib directory with appropriate > > > > symbolic links .. > > > > libsvm.so.1.0 > > > > libsvm.so.1 -> libsvm.so.1.0 > > > > libsvm.so -> libsvm.so.1.0 > > > > and ran ldconfig > > > > Any thoughts appreciated .. > > > > Tom > > > > On Wednesday 28 May 2008 04:39, Daishi Kato wrote: > > > Hi, > > > > > > I've updated the egg (v1.1), which hopefully works fine. > > > Please give it a try. > > > > > > I've been testing against debian libsvm package. > > > --daishi > > > > > > At Tue, 27 May 2008 12:50:13 -0700, > > > > > > Tom Poliquin wrote: > > > > I'm trying to install the libsvm egg and not > > > > having much success. > > > > > > > > The libsvm egg requires the libsvm library. > > > > > > > > I downloaded the only libsvm library I could find from > > > > http://www.csie.ntu.edu.tw/~cjlin/libsvm/ > > > > (libsvm-2.86) which after installation only generates an svm.o. > > > > I tried some older versions hoping to find one generating an 'so' > > > > file but was unsuccessful. > > > > > > > > Undaunted, (and not an shared library expert) I did this .. > > > > g++ -fPIC -Wall -O3 -c svm.cpp > > > > ld -shared -soname libsvm.so.1 -o libsvm.so.1.0 -lc svm.o > > > > > > > > I then moved the .so into my ~/lib directory with appropriate > > > > symbolic links .. > > > > libsvm.so.1.0 > > > > libsvm.so.1 -> libsvm.so.1.0 > > > > libsvm.so -> libsvm.so.1.0 > > > > and ran ldconfig > > > > > > > > I then ran the egg install (I'm using > > > > Chicken 3.1.0) and got .. > > > > > > > > The extension libsvm does not exist. > > > > Do you want to download it ? (yes/no/abort) [yes] yes > > > > downloading libsvm.egg from (www.call-with-current-continuation.org > > > > eggs/ 3 80) . > > > > gzip -d -c /tmp/chicken-setup-3-cowboyneal/downloads/libsvm.egg | tar > > > > xf - /home/cowboyneal/bin/csc -feature compiling-extension -s -O2 > > > > libsvm.scm Warning: extension `libsvm_core' is currently not installed > > > > /home/cowboyneal/bin/csc > > > > -feature compiling-extension -s -O2 libsvm_core.scm l > > > > ibsvm_core_wrap.c -lsvm -I/usr/include/libsvm-2.0/libsvm > > > > Error: unbound variable: documentation > > > > > > > > Looks like I also need a libsvm_core.so .. I'm guessing I haven't > > > > downloaded the right libsvm .. ? > > > > > > > > Any thoughts greatly appreciated, > > > > > > > > Tom > > > > > > > > > > > > > > > > _______________________________________________ > > > > Chicken-users mailing list > > > > Chicken-users@nongnu.org > > > > http://lists.nongnu.org/mailman/listinfo/chicken-users > > > > > > > > ****************************** > > > > XREA.COM -Free Web Hosting- > > > > http://www.xrea.com/ > > > > ****************************** _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users