Hello... As i said in earlier emails, i'm building a L4 server that needs network support. For that purpose, i'm trying to use the libraries from the FLIPS package, using as guideline the mini_http server. i've build my own package and costumized the Makefile to suit my needs. I've changed the mode to l4env_freebsd because i'm using C++ + STL, and i need the headers and the libstdc++.a. I've changed also the needed extra libraries as in the mini_http example. So the Makefile looks like this:
######################################
PKGDIR ?= ../.. L4DIR ?= $(PKGDIR)/../..
TARGET = $(PKGNAME) # the default relocation address. This may be superseded by a STATIC file. DEFAULT_RELOC = 0x01d00000
# list your .c files here SRC_CC = FailureDetector.cc
#Mode MODE = l4env_freebsd
#systems SYSTEMS = x86-l4v2
# if your server implements the server side of an idl defined in an idl-file # of your package, list the idl file name(s) here (no path needed) #SERVERIDL =
CXX_FLAGS = -nostdinc++ \ -I$(L4DIR)/include/g++-3 \ -I$(L4DIR)/include/drops
# list additional library paths and libraries here LIBS = -lstdc++ $(GCCLIB) -ldiet_be_socket_io -ll4vfs_net_io -ldiet_be_select -ll4vfs_select -ll4vfs_select_listener-server
include $(L4DIR)/mk/prog.mk
#####################################
the result when i build my program is the following error:
... Compiling FailureDetector.o LD_PRELOAD=/home/tiago/l4/tool/gendep/libgendep.so GENDEP_TARGET=FailureDetector.o GENDEP_BINARY=cc1plus g++ -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++/3.3 -I../../../../../include/c++/3.3/drops -I/home/tiago/drops/include/oskit10 -I/home/tiago/drops/include/oskit10/oskit/freebsd -I/home/tiago/drops/include/c++/3.3 -I/home/tiago/drops/include/c++/3.3/drops -I/usr/lib/gcc-lib/i486-linux/3.3.4/include -gstabs+ -g -O2 -fno-strict-aliasing -march=i586 -Wall /home/tiago/l4/pkg/failuredetector/server/src/FailureDetector.cc -o FailureDetector.o ==> Linking failuredetector LD_PRELOAD=/home/tiago/l4/tool/gendep/libgendep.so GENDEP_TARGET=failuredetector GENDEP_BINARY=ld gcc -o failuredetector ../../../../../lib/x86_586/crt0.o FailureDetector.o -Ttext=0x01d00000 -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++/3.3 -L/home/tiago/drops/lib/oskit10 -L/home/tiago/drops/lib/c++/3.3 -T../../../../../lib/x86_586/main_stat.ld -lstdc++ /usr/lib/gcc-lib/i486-linux/3.3.4/libgcc.a -ldiet_be_socket_io -ll4vfs_net_io -ldiet_be_select -ll4vfs_select -ll4vfs_select_listener-server -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_amm -loskit_freebsd_c -loskit_com /usr/lib/gcc-lib/i486-linux/3.3.4/libgcc.a /usr/lib/gcc-lib/i486-linux/3.3.4/libgcc_eh.a -loskit_freebsd_c -Ttext=0x01d00000 -Wl,-gc-sections ../../../../../lib/x86_586/l4v2/libdiet_be_socket_io.a(socket.o)(.text.get_socket_server_thread+0x8b): In function `setsockopt': /home/tiago/l4/pkg/l4vfs/lib/libc_backends/socket_io/socket.c:687: undefined reference to `l4vfs_init_connection' ../../../../../lib/x86_586/l4v2/libdiet_be_socket_io.a(socket.o)(.text.socket+0xc):/home/tiago/l4/pkg/l4vfs/lib/libc_backends/socket_io/socket.c:673: undefined reference to `ft_get_next_free_entry' ../../../../../lib/x86_586/l4v2/libdiet_be_socket_io.a(socket.o)(.text.socket+0xa3):/home/tiago/l4/pkg/l4vfs/lib/libc_backends/socket_io/socket.c:679: undefined reference to `ft_fill_entry' ../../../../../lib/x86_586/l4v2/libdiet_be_socket_io.a(socket.o)(.text.bind+0x20):/home/tiago/l4/pkg/l4vfs/lib/libc_backends/socket_io/socket.c:684: undefined reference to `ft_is_open' ../../../../../lib/x86_586/l4v2/libdiet_be_socket_io.a(socket.o)(.text.bind+0x33):/home/tiago/l4/pkg/l4vfs/lib/libc_backends/socket_io/socket.c:690: undefined reference to `ft_get_entry' ../../../../../lib/x86_586/l4v2/libdiet_be_socket_io.a(socket.o)(.text.recvfrom+0x3a):/home/tiago/l4/pkg/l4vfs/lib/libc_backends/socket_io/socket.c:690: undefined reference to `ft_is_open' ../../../../../lib/x86_586/l4v2/libdiet_be_socket_io.a(socket.o)(.text.recvfrom+0x4d):/home/tiago/l4/pkg/l4vfs/lib/libc_backends/socket_io/socket.c:692: undefined reference to `ft_get_entry' ../../../../../lib/x86_586/l4v2/libdiet_be_socket_io.a(socket.o)(.text.sendto+0x30):/home/tiago/l4/pkg/l4vfs/lib/libc_backends/socket_io/socket.c:690: undefined reference to `ft_is_open' ../../../../../lib/x86_586/l4v2/libdiet_be_socket_io.a(socket.o)(.text.sendto+0x43):/home/tiago/l4/pkg/l4vfs/lib/libc_backends/socket_io/socket.c:692: undefined reference to `ft_get_entry' ../../../../../lib/x86_586/l4v2/libdiet_be_socket_io.a(socket.o)(.text.setsockopt+0x24):/home/tiago/l4/pkg/l4vfs/lib/libc_backends/socket_io/socket.c:684: undefined reference to `ft_is_open' ../../../../../lib/x86_586/l4v2/libdiet_be_socket_io.a(socket.o)(.text.setsockopt+0x37):/home/tiago/l4/pkg/l4vfs/lib/libc_backends/socket_io/socket.c:690: undefined reference to `ft_get_entry' ../../../../../lib/x86_586/l4v2/libl4env.a(startup.o)(.text+0x19): In function `__startup_main': /home/tiago/l4/pkg/l4env/lib/src/startup.c:62: undefined reference to `main' ../../../../../../oskit10/lib/liboskit_kern.a(base_console_init.o)(.text+0x31c): In function `base_console_init': /home/tiago/oskit10/kern/../kern/x86/pc/base_console_init.c:220: undefined reference to `main' collect2: ld returned 1 exit status make[1]: ** [failuredetector] Erro 1 make[1]: Saindo do diretório `/home/tiago/l4/pkg/failuredetector/server/src/OBJ-x86_586-l4v2' make: ** [OBJ-x86_586-l4v2] Erro 2
But when i build the mini_http example it gives no errors and links some extra libraries that i don't see them defined in any file...
My questions are:
what am i doing wrong :) ? what extra libraries should i link and how?
by the way... following my last email, to how to add extra NIC drivers to FLIPS, it is as simple as said and worked. Just add your drivers the referenced Makefile line and extra modules needed by the driver, in my case crc32 and mii.
thanks in advance
Tiago Jorge