Host-based RTEMS on Solaris
Ralf Corsepius
corsepiu at faw.uni-ulm.de
Tue Oct 29 04:25:16 UTC 2002
Am Die, 2002-10-29 um 03.44 schrieb Tito Costa:
> hello,
>
> I'm trying to build the host-based version of RTEMS on Solaris, i.e. I
> didn't specify any --target or --enablebsp options at configure.
>
> RTEMS assumes to have linux headers available like
> sys/cdefs.h,
A grep through the source code shows that sys/cdefs.h is used only [1]
in code which are known not to be compilable under Solaris.
# find . -type f -exec grep -H 'sys/cdefs.h' {} \;
[1] Except for one place, where sys/cdefs.h is included unconditionally
cpukit/libcsupport/include/sys/ioccom.h
The same file also applies __BEGIN_DECLS => it relies on implicitly
including features.h (probably through sys/cdefs.h.
Details need to be analyzed, but I am inclined to think ioccom.h to be
bugged, indeed.
> features.h,
Including this inside of RTEMS code would qualify as a bug. But, a grep
through RTEMS source code shows that RTEMS doesn't directly #include
<features.h> at all.
> gnu/stubs.h even if they are not POSIX standard;
# find . -type f -exec grep -H 'gnu/stubs.h' {} \;
No trace of using gnu/stubs.h inside of the source-tree.
> Also <rtems>/cpukit/include/rtems/userenv.h and other header files
> contain directives like #ifdef (__linux__) that have to be fixed to make
> them work on Solaris.
They are supposed to be functional under Solaris and indeed once were =>
To be analyzed in depth.
> In the file libmisc/shell/shell.c the lines stdin=fopen(...),
> stdout=fopen(...), stderr=fopen(...) throw "invalid lvalue in
> assignment" errors; by now i just commented them out.
>
> Having fixed this, I got stuck in the "make all install" while ld was
> trying to link hello.exe
>
> Undefined symbol First referenced in file
> console_control o-optimize/init.o
> console_close o-optimize/init.o
> console_read o-optimize/init.o
> console_initialize o-optimize/init.o
> console_open o-optimize/init.o
The console_* function to be used here are supposed to be provided by
the BSP (in this case the posix BSP), i.e. by
c/src/lib/libbsp/unix/posix/console/console.c
> ld: fatal: Symbol referencing errors. No output written to
> o-optimize/hello.exe
> collect2: ld returned 1 exit status
Here it would be interesting to see the compiler/linker invocation.
> can anyone comment on this?
AFAIS, you indeed have found several bugs in RTEMS, but I'd also not be
surprised if your Sun-toolchain is broken.
Anyway, can you show us the actual error log from your breakdown of an
unmodified RTEMS?
I'd also be interested in seeing your cpukit/config.log
Ralf
More information about the users
mailing list