Using the OSKit POSIX Thread Library
Tiago Jorge
tjpj at lasige.di.fc.ul.pt
Sat Feb 19 17:39:24 CET 2005
Continuing the goal to port my aplication to an L4 server, i'm trying to
use the OSKit lib to POSIX threads.
I'm using c++ and building in l4env_freebsd mode. First of all, the
static link to the lib wasn't in the modes.inc file. I've included it
there. I've tried to build my test project, that simply starts a thread.
The test files compiles but it doesn't do the static link. The error is
the following:
PWD=/home/tiago/l4/pkg/meumundo/server/src/OBJ-x86_586-l4v2 make -C
OBJ-x86_586-l4v2 -f Makefile
make[1]: Entrando no diretório
`/home/tiago/l4/pkg/meumundo/server/src/OBJ-x86_586-l4v2'
... Compiling main.o
LD_PRELOAD=/home/tiago/l4/tool/gendep/libgendep.so GENDEP_TARGET=main.o
GENDEP_BINARY=cpp0 g++-2.95 -c -DRAM_BASE=0x0
-DSYSTEM_x86_586_l4v2 -DARCH_x86 -DCPUTYPE_586 -DL4API_l4v2
-I../../../idl/OBJ-x86-l4v2 -I../../../../../include/x86/l4v2
-I/home/tiago/drops/include/x86/l4v2 -I../../../../../include/l4v2
-I/home/tiago/drops/include/l4v2 -I../../../../../include/x86
-I/home/tiago/drops/include/x86 -I../../../../../include
-I/home/tiago/drops/include -nostdinc -DOSKIT
-I../../../../../../oskit10/freebsd/libc/include
-I../../../../../../oskit10/freebsd/3.x/src/include
-I../../../../../../oskit10/freebsd/3.x/src/sys
-I../../../../../../oskit10 -I../../../../../include/c++/2.95
-I../../../../../include/c++/2.95/drops
-I/home/tiago/drops/include/oskit10
-I/home/tiago/drops/include/oskit10/oskit/freebsd
-I/home/tiago/drops/include/c++/2.95
-I/home/tiago/drops/include/c++/2.95/drops
-I/usr/lib/gcc-lib/i386-linux/2.95.4/include -nostdinc
-I../../../../../include/c++-3 -I../../../../../include/drops
-gstabs+ -g -O2 -fno-strict-aliasing -march=i586 -Wall
/home/tiago/l4/pkg/meumundo/server/src/main.cc -o main.o
==> Linking meumundo
LD_PRELOAD=/home/tiago/l4/tool/gendep/libgendep.so
GENDEP_TARGET=meumundo GENDEP_BINARY=ld gcc-2.95 -o meumundo
../../../../../lib/x86_586/crt0.o main.o -Ttext=0x01000000
-L../../../../../lib/x86_586/l4v2 -L/home/tiago/drops/lib/x86_586/l4v2
-L../../../../../lib/x86_586 -L/home/tiago/drops/lib/x86_586
-L../../../../../lib -L/home/tiago/drops/lib
-L../../../../../../oskit10/lib -L../../../../../lib/c++/2.95
-L/home/tiago/drops/lib/oskit10 -L/home/tiago/drops/lib/c++/2.95
-T../../../../../lib/x86_586/main_stat.ld -lstdc++
/usr/lib/gcc-lib/i386-linux/2.95.4/libgcc.a -static
-loskit10_support_l4env_freebsd.o -ll4env -ll4rm -ldm_generic -ldm_mem
-lthread -lsemaphore -lnames -ll4util -lrmgr -ll4env -lomega0
-llogserver -ll4env_err -ll4rm -ldm_generic -ldm_mem -lthread -lslab
-ll4sys -nostdlib -Wl,--nostdlib -loskit_freebsd_c -loskit_freebsd_net
-loskit_startup -loskit_clientos -loskit_bootp -loskit_linux_fs
-loskit_fsnamespace -loskit_diskpart -loskit_linux_dev
-loskit10_support_l4env_freebsd_dev -loskit_kern -loskit_lmm
-loskit_threads -loskit_amm -loskit_freebsd_c -loskit_com
/usr/lib/gcc-lib/i386-linux/2.95.4/libgcc.a -loskit_freebsd_c
-Ttext=0x01000000 -Wl,-gc-sections
main.o(.text+0x29b): In function `main':
/home/tiago/l4/pkg/meumundo/server/src/main.cc:44: undefined reference
to `pthread_create(void **, pthread_attr const *, void *(*)(void *),
void *)'
collect2: ld returned 1 exit status
make[1]: ** [meumundo] Erro 1
make[1]: Saindo do diretório
`/home/tiago/l4/pkg/meumundo/server/src/OBJ-x86_586-l4v2'
make: ** [OBJ-x86_586-l4v2] Erro 2
I presume one of two cases:
- My code is wrong somehow, but i've tried to build the oskit example os
the philosophers dinner and didn't worked as well
- There is no support for POSIX threads in your version of OSKit :(
thanks in advance
Tiago Jorge
More information about the l4-hackers
mailing list