Hello,
for my project I'm using sources, which heavily make use of code like this: fprintf (stderr, "...."); Even if compiling works fine, the executions of the program failes with the following error message, when the program reaches the respective code:
Program| OSKit support: using 4096KB at 0x00100000 as heap Program| Program| Exiting with rc=-2147467262
No error occurs on printf("..") - commands.
I am using the "l4env_freebsd" mode, but even in "l4env" mode an (another) error occurs.
I'm starting fiasco-ux with the command: ./fiasco-ux -m 256 -l names -l name_server -l dm_phys -l log -l simple_ts -l Program
Thanks for any help, Arthur
Hi Arthur,
for my project I'm using sources, which heavily make use of code like this: fprintf (stderr, "...."); Even if compiling works fine, the executions of the program failes with the following error message, when the program reaches the respective code:
Program| OSKit support: using 4096KB at 0x00100000 as heap Program| Program| Exiting with rc=-2147467262
No error occurs on printf("..") - commands.
I am using the "l4env_freebsd" mode, but even in "l4env" mode an (another) error occurs.
I'm not sure about the errors you describe, but we are currently in the process of dumping oskit in favor of uclibc or dietlibc. For each of those we have several build modes which support fprintf().
You might want to look into l4/pkg/l4vfs/examples/l4vfs_test which uses the l4env_base MODE. Note that you must switch to dietlibc or uclibc in l4 type 'make config'.
I'm starting fiasco-ux with the command: ./fiasco-ux -m 256 -l names -l name_server -l dm_phys -l log -l simple_ts -l Program
A quick note: I don't see that you need the name_server in this setup. It is used for l4vfs programs.
Martin
Hi Arthur,
for my project I'm using sources, which heavily make use of code like this: fprintf (stderr, "...."); Even if compiling works fine, the executions of the program failes with the following error message, when the program reaches the respective code:
Program| OSKit support: using 4096KB at 0x00100000 as heap Program| Program| Exiting with rc=-2147467262
No error occurs on printf("..") - commands.
I am using the "l4env_freebsd" mode, but even in "l4env" mode an (another) error occurs.
I'm not sure about the errors you describe, but we are currently in the process of dumping oskit in favor of uclibc or dietlibc. For each of those we have several build modes which support fprintf().
Maybe, it's because I am using a older drops version (I'll update it right now), but when I'm compiling it in l4env - mode, I get following error messages: ../../../lib/libxvidcore.a(xvid.o): In function `sigill_check': xvid.c:(.text+0x30): undefined reference to `signal' xvid.c:(.text+0x68): undefined reference to `signal' collect2: ld returned 1 exit status make[1]: *** [Program] Fehler 1 (I use the xvid-library, which is using the signal - function). If I use the l4env_base - mode, another additional error occurs: xvid.c:(.text+0x4e): undefined reference to `_setjmp' Seems, that these system functions are not implemented yet.
Is there any problem using the l4env_freebsd - mode? I also can turn the signal-function of.
You might want to look into l4/pkg/l4vfs/examples/l4vfs_test which uses the l4env_base MODE. Note that you must switch to dietlibc or uclibc in l4 type 'make config'.
But still I can't use the fprintf-function. If I compile a simple test-program like #include <stdio.h> int main (int argc, char **argv) { fprintf(stderr, "Error\n"); return 0; }
in l4env-mode, I get the error message testprg | L4RM: [PF] read at 0x00000000, eip 0180e0ae, src 9.02 testprg | [9.0] l4rm/lib/src/pagefault.c:78:__unknown_pf(): testprg | unhandled page fault
in l4env-mode, I get the error message simplets| Configured for 64 tasks. testprg | l4vfs_get_name_server_threadid(): 'name_server' not known at RMGR! simplets| l4_ts_exit_component(): Exit 9.02
starting with -l name_server: simplets| Configured for 64 tasks. simplets| l4_ts_exit_component(): Cannot exit A.02 (reserved or terminating)
Is there any library, that I can include or any program I have to start, to get this simple program started?
Arthur
I'm starting fiasco-ux with the command: ./fiasco-ux -m 256 -l names -l name_server -l dm_phys -l log -l simple_ts -l Program
A quick note: I don't see that you need the name_server in this setup. It is used for l4vfs programs.
Martin
Hi Arthur,
[...]
Maybe, it's because I am using a older drops version (I'll update it right now),
Always a good idea ...
but when I'm compiling it in l4env - mode, I get following error messages: ../../../lib/libxvidcore.a(xvid.o): In function `sigill_check': xvid.c:(.text+0x30): undefined reference to `signal' xvid.c:(.text+0x68): undefined reference to `signal' collect2: ld returned 1 exit status make[1]: *** [Program] Fehler 1 (I use the xvid-library, which is using the signal - function). If I use the l4env_base - mode, another additional error occurs: xvid.c:(.text+0x4e): undefined reference to `_setjmp' Seems, that these system functions are not implemented yet.
Is there any problem using the l4env_freebsd - mode?
Someone else jump in here ...
I also can turn the signal-function of.
You might want to look into l4/pkg/l4vfs/examples/l4vfs_test which uses the l4env_base MODE. Note that you must switch to dietlibc or uclibc in l4 type 'make config'.
But still I can't use the fprintf-function. If I compile a simple test-program like #include <stdio.h> int main (int argc, char **argv) { fprintf(stderr, "Error\n"); return 0; }
in l4env-mode, I get the error message testprg | L4RM: [PF] read at 0x00000000, eip 0180e0ae, src 9.02 testprg | [9.0] l4rm/lib/src/pagefault.c:78:__unknown_pf(): testprg | unhandled page fault
in l4env-mode, I get the error message simplets| Configured for 64 tasks. testprg | l4vfs_get_name_server_threadid(): 'name_server' not known at RMGR! simplets| l4_ts_exit_component(): Exit 9.02
starting with -l name_server: simplets| Configured for 64 tasks. simplets| l4_ts_exit_component(): Cannot exit A.02 (reserved or terminating)
Is there any library, that I can include or any program I have to start, to get this simple program started?
For such a simple program I'd advise you to use the 'sigma0' mode which directly puts out writes to stdout and stderr to (text-)screen and serial, if configured. The 'l4env' mode works similarly but uses logserver functions for output.
More complex programms should use the l4env_base mode which uses more sophisticated output backends. But here you need someone implementing the output channels, for example l4vfs_log.
Using fiasco-ux I start this up as follows:
--------------------------->8---------------------------
#! /bin/bash
. ${0%/*}/generic.inc
fiasco \ -G $UXRES \ -l names \ -l log \ -l dm_phys \ -l simple_ts \ -l name_server \ -l l4vfs_log \ -l "fstab -c /server -c /server/log -v10 -b/ -m/server/log" \ -l "l4vfstest --stdout /server/log/l4vfstest \ --stderr /server/log/l4vfstest" \ -n9 "$@"
--------------------------->8---------------------------
Explanation: - name_server is the l4vfs name server to resolve names like "/server/log/l4vfstest" - l4vfs_log wrappes write calls to logserver functions, while keeping a clientspecific log prefix - fstab initially populates the name space and mounts l4vfs_log to "/server/log/" - l4vfstest is your example program compiled with MODE = l4env_base, the client lib catches the special parameters --stdout and --stderr and connects them the file "/server/log/l4vfstest", which works as your "output terminal". This is a "poor man's" inheritance of open filedescriptors ;-)
We also have terminal servers for l4con and DOpE, these could even provide input using "--stdin". Have a look into l4vfs/term_server for this.
Note: The MODE variables in Makefiles define a set of libs etc. to use, if you want to know what is going on, call make with "make VERBOSE=" or have a look into l4/mk/modes.inc.
Regards, Martin
Hi,
Maybe, it's because I am using a older drops version (I'll update it right now), but when I'm compiling it in l4env - mode, I get following error messages: ../../../lib/libxvidcore.a(xvid.o): In function `sigill_check': xvid.c:(.text+0x30): undefined reference to `signal' xvid.c:(.text+0x68): undefined reference to `signal' collect2: ld returned 1 exit status make[1]: *** [Program] Fehler 1 (I use the xvid-library, which is using the signal - function).
Sginalling is supported by the l4/pkg/signal package. Build the package and use the following two steps to enable POSIX signals:
- link your applications with libc_be_l4sig and libsignal - start the signal_server along with your application
Bjoern
l4-hackers@os.inf.tu-dresden.de