Hi Christian,
linux_stub_lib is no (L4)Linux application library - it's the in-kernel equivalent to a Linux kernel module (That's why it's called "library" ;-). The real code is in "pkg/con/example/linux_stub", which builds a Linux kernel module for the DROPS console system.
Sorry, I've mistakenly add the "_lib". It seems that I may need to add this library to both an app and a kernel module.
AFAIK doing IPC under L4Linux <= 2.4 is as easy as including <l4/sys/ipc.h> and calling the IPC bindings. You need no library for that purpose. The Makefile mode is "mode=l4linux".
This is what I am trying... I wrote a simple Linux app (MODE=l4linux) that compiles with the existing library source files directly (no lib). My library starts some l4threads which does some IPC and receives dataspaces which is attached to the apps VM. As you know the compile fails. So, to debug I have commented out all source code in the library source files and started to selectively uncomment sections and functions. Every time I uncomment a section I compile and run it. The compiles succeeds until I added the section that attaches the received dataspace to the app's VM with l4rm_attach().
I get the following compile error:
==> Linking msgsrv ../../../../../lib/x86_586/l4v2/libdm_generic.a(map.o)(.text+0x1a0): In function `l4dm_map': /root/DROPS/l4/pkg/dm_generic/lib/clientlib/src/map.c:251: undefined reference to `l4rm_lookup' ../../../../../lib/x86_586/l4v2/libl4env.a(environment.o)(.text+0x17f): In function `l4env_get_default_dsm': /root/DROPS/l4/pkg/l4env/lib/src/environment.c:251: undefined reference to `names_waitfor_name' ../../../../../lib/x86_586/l4v2/libl4env.a(startup.o)(.text+0x6): In function `__startup_main': /root/DROPS/l4/pkg/l4env/lib/src/startup.c:59: undefined reference to `crt0_construction' ../../../../../lib/x86_586/l4v2/libl4env.a(startup.o)(.text+0x32): In function `__setup_fixed': /root/DROPS/l4/pkg/l4env/lib/src/startup.c:74: undefined reference to `_prog_img_start' ../../../../../lib/x86_586/l4v2/libl4env.a(startup.o)(.text +0x39):/root/DROPS/l4/pkg/l4env/lib/src/startup.c:75: undefined reference to `_prog_img_end' ../../../../../lib/x86_586/l4v2/libl4env.a(startup.o)(.text +0x78):/root/DROPS/l4/pkg/l4env/lib/src/startup.c:80: undefined reference to `crt0_tramppage' ../../../../../lib/x86_586/l4v2/libl4env.a(startup.o)(.text+0x191): In function `__main': /root/DROPS/l4/pkg/l4env/lib/src/startup.c:136: undefined reference to `crt0_multiboot_info' ../../../../../lib/x86_586/l4v2/libl4env.a(startup.o)(.text +0x1a5):/root/DROPS/l4/pkg/l4env/lib/src/startup.c:136: undefined reference to `crt0_multiboot_flag' ../../../../../lib/x86_586/l4v2/libl4env.a(startup.o)(.text +0x1b7):/root/DROPS/l4/pkg/l4env/lib/src/startup.c:139: undefined reference to `crt0_multiboot_info' ../../../../../lib/x86_586/l4v2/libl4env.a(startup.o)(.text+0x27d): In function `__main': /root/DROPS/l4/pkg/l4env/lib/src/OBJ-x86_586-l4v2/../../../../../include/l4/l4rm/l4rm.h:1037: undefined reference to `l4rm_do_area_setup' ../../../../../lib/x86_586/l4v2/libl4env.a(startup.o)(.text+0x2af): In function `__main': /root/DROPS/l4/pkg/l4env/lib/src/OBJ-x86_586-l4v2/../../../../../include/x86/l4v2/l4/sys/syscalls-l42-gcc3-nopic.h:39: undefined reference to `crt0_stack_high' ../../../../../lib/x86_586/l4v2/libl4env.a(startup.o)(.text +0x2b4):/root/DROPS/l4/pkg/l4env/lib/src/OBJ-x86_586-l4v2/../../../../../include/x86/l4v2/l4/sys/syscalls-l42-gcc3-nopic.h:39: undefined reference to `crt0_stack_low' collect2: ld returned 1 exit status make[1]: *** [msgsrv] Error 1
The MODE setting in the Makefile includes the libraries: dm_generic, dm_mem, names, l4util, loaderif, l4env, l4env_err, slab, l4sys. I added libraries: thread_linux, semaphore, loglinux, l4rm
I am aware of the problem which Adam mentioned that the L4Linux server may overmap the attached memory but at the moment I can not even map the dataspace due to this compile error.
Any suggestions to solve this compile problem.
Thanks again for all your time! Leon