plugin example problem under linux

Marc Szymanski <[email protected]> Tue, 7 Dec 2004 11:06:52 +0100
Newsgroups gmane.comp.breve
Message-ID <[email protected]>
Dear all,

I would like to write a plugin for breve. But as I compiled the plugin example 
and tried to start it I got the following error messages.

error loading plugin c++Sample_plugin.o: /home/szymansk/workspace/extern/
breve/breve_2.0/plugins/samples/c++Sample_plugin.o: ELF file's phentsize not 
the expected size
Unknown Function Error: Internal function "cppSampleMakeTestClass" not found 
at line 27 of file "c++SampleDemo.tz"

What did I do wrong?

I thought may be I need to link the object-file with the original breve 
libraries so I tried to compile the breve source version. But I got stuck. 

First I had to add
#include <errno.h> 
to the util/text.c 
because I got a compiler error that "errno" was unknown

than I had to add some ";" in the steve/steveparse.y in line 889 and line 892

888 | log_expression ISA WORD_VALUE {
889   $$ = NULL;
890	}
891 | log_expression ISA type {
892   $$ = NULL;
893	}
894 ;

because I got some syntax errors.

after that I had to change steveData-> to frontend-> in lines 110 and 164 of 
the bin/steve_cli.c, because steveData was not declared.

After all that changes I was able to compile everything, but than I got the 
following messages while linking

gcc -g -Wall -Winline -DHAVE_CONFIG_H  -I../include/breve  -c breve.c
gcc -o breve -g -Wall -Winline -DHAVE_CONFIG_H breve.o -L../lib  -rdynamic 
-Xlinker -E -lbrsteve -lbrkernel -lbrsimulation -lbrutil -lbrneural -lbrgraph 
-Xlinker -Bstatic -lode -lreadline -lhistory -lncurses -lOSMesa -lpng -ljpeg 
-lpthread -lexpat -lz  -lstdc++ -Xlinker -Bdynamic -L/usr/X11R6/lib -lglut 
-lGL -lGLU -lXmu -lXt -lSM -lICE -lX11 -lXi -lXext
../lib/libbrsimulation.a(link.o)(.text+0xf77): In function 
`slLinkApplyJointControls':
/home/szymansk/workspace/extern/breve/breve_source/simulation/link.c:405: 
undefined reference to `dJointAddHingeTorque'
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../libpthread.a(pthread.o)
(.text+0x10f): In function `pthread_initialize':
/usr/src/packages/BUILD/glibc-2.3.2/linuxthreads/pthread.c:506: undefined 
reference to `_res'
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../libpthread.a(pthread.o)
(.text+0xa19): In function `__pthread_reset_main_thread':
/usr/src/packages/BUILD/glibc-2.3.2/linuxthreads/pthread.c:1072: undefined 
reference to `_res'
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../libpthread.a(pthread.o)
(.text+0xa1e):/usr/src/packages/BUILD/glibc-2.3.2/linuxthreads/
pthread.c:1070: undefined reference to `_errno'
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../libpthread.a(pthread.o)
(.text+0xa29):/usr/src/packages/BUILD/glibc-2.3.2/linuxthreads/
pthread.c:1071: undefined reference to `_h_errno'
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../libpthread.a(pthread.o)
(.data+0x1b8): In function `pthread_initialize':
/usr/src/packages/BUILD/glibc-2.3.2/linuxthreads/pthread.c:530: undefined 
reference to `_errno'
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../libpthread.a(pthread.o)
(.data+0x1c0):/usr/src/packages/BUILD/glibc-2.3.2/linuxthreads/pthread.c:530: 
undefined reference to `_h_errno'
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../libpthread.a(pthread.o)
(.data+0x1c8): In function `pthread_initialize':
/usr/src/packages/BUILD/glibc-2.3.2/linuxthreads/../linuxthreads/sysdeps/unix/
sysv/linux/smp.h:33: undefined reference to `_res'
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../libpthread.a(ptw-write.o)
(.text+0x25): In function `__libc_write':
__libc_write: undefined reference to `__syscall_error'
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../libpthread.a(ptw-write.o)
(.text+0x55):__libc_write: undefined reference to `__syscall_error'
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../libpthread.a(ptw-read.o)
(.text+0x25): In function `__libc_read':
__libc_read: undefined reference to `__syscall_error'
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../libpthread.a(ptw-read.o)
(.text+0x55):__libc_read: undefined reference to `__syscall_error'
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../libpthread.a(ptw-close.o)
(.text+0x1f): In function `__libc_close':
__libc_close: undefined reference to `__syscall_error'
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../libpthread.a(ptw-close.o)
(.text+0x4a):__libc_close: more undefined references to `__syscall_error' 
follow
collect2: ld returned 1 exit status
make[1]: *** [breve] Fehler 1
make[1]: Das Target »install« wurde wegen Fehlern nicht aktualisiert.
make[1]: Leaving directory `/home/szymansk/workspace/extern/breve/
breve_source/bin'
make: *** [all] Fehler 2

Does anyone know what to do? What compiler do you use? As you can see I am 
using gcc 3.2.3. 

Thanks in advance,

	Marc.

-- 
--------------------------------------------------------------------------
Dipl.-Inform. Marc Szymanski
Institute for Process Control and Robotics(IPR), Universität Karlsruhe(TH)
Kaiserstr. 12, D-76128 Karlsruhe, Germany
Phone: +49 721 608 6694, Fax: +49 721 608 7141
WWW http://wwwipr.ira.uka.de/~szymansk


_______________________________________________
breve mailing list
[email protected]
http://lists.spiderland.org/mailman/listinfo/breve