Please: Help!!!

Gauthier charles.gauthier at
Wed Jan 26 02:12:55 UTC 2000

OK. Nobody else is stepping in, so I will give you my $0.02.

I have no experience with the sparc targets, so take what I say with a
grain of salt.

Serrae at wrote:
> Hello folks,
> I have been trying to get RTEMS-4.0.0 going with the above setup on a
> SPARC+Solaris2.6 with all the GNUpackages.  The following
> compilation `bit_rtems sparc' fails with this output:
> /export/home/u1/eserra/projects/rtems/egcs-1.1.2-binutils-2.9.1-newlib-1.8.2/spa
> rc-rtems/sparc-rtems/lib/libc.a(makebuf.o): In function `__smakebuf':
> /export/home/u1/eserra/projects/rtems/tools/build-sparc-tools/sparc-rtems/newlib
> /libc/stdio/../../../../../src/newlib/libc/stdio/makebuf.c(.text+0x128):
> undefin
> ed reference to `_isatty'
> collect2: ld returned 1 exit status
> make[4]: *** [o-erc32/hello.exe] Error 1
> make[3]: *** [all] Error 1
> make[2]: *** [all] Error 1
> make[1]: *** [all] Error 1
> make[1]: Leaving directory
> `/export/home/u1/eserra/projects/rtems/tools/build-sp
> arc-rtems/c'
> make: *** [all] Error 1
> eserra at sun250

Well, I would say that you do not have a _isatty function anywhere in
the libraries that are submitted to ld. That is what the message is about.

Are the appropriate libraries specified in the link command?

Where should isatty come from? I think that you cannot use newlib 1.8.2
with rtems 4.0.0. I cannot verify this now because I am not at the
appropriate machine, but I think that isatty is part of the latest rtems
snapshots, but not in rtems 4.0, and that it was removed from newlib
1.8.2 for the rtems target. You should verify this. Look for it in
librtemsall.a (sparc-rtems-nm librtemsall.a | grep isatty). You probably
will find that it is not part of RTEMS. Do the same for the libc.a
library from newlib.

You will want to use either 1.8.0 or 1.8.1 with rtems 4.0.0. Wait for
the next public release of rtems to switch to newlib 1.8.2.

Or look at the configuration for newlib, and put isatty back in.

Anybody else with some opinion?

> Any help is greatly appretiated; also when I try this compilation
> `sparc-rtems-gcc -o hello hello.c' gives me the following warning:
> /export/home/u1/eserra/projects/rtems/egcs-1.1.2-binutils-2.9.1-newlib-1.8.2/spa
> rc-rtems/sparc-rtems/bin/ld: warning: cannot find entry symbol start;
> defaulting
>  to 00010074
> where hello.c is:
> #include <stdio.h>
> int main() {
> printf("hello, world!\n");
> return 0;
> }
> Thanks.

This is not supposed to work, so don't worry.

Your compiler is a cross compiler. This cross compiler is built before
the runtime environment (RTEMS). But when building RTEMS, the configure
script needs to successfully link an executable image for the target to
verify that the cross compiler is working (in some sense, it is a stupid
test). This test invokes the cross compiler with a similar command line
to the one you issued above. To pass the test, gcc was built to link in
a crt0.o file. This crt0.o file should normally contain all the startup
code for the c library (the start function). For rtems, crt0.o contains
nothing of interest. It's only purpose is to pass the configuration test
for the working cross compiler. What you got was a warning, not an
error. It is ok. It also means that the image you built will not work.

Look at the makefile in the sample application to find out how to do a
proper link. Essentially, you must turn off the defaults and use the
provided link scripts.

> PS After I do `sparc-rtems-gcc -c hello.c' a hello.o is generated but
> hello.c is EMPTY!  What is that all about?!  Please, shed some LIGHT!!!

The hello.c file should not be empty.

> Sincerely,
> Efren
> ~~~~~~~~~~~~~~~~~~~~~~~~~
> Efren Serra
> Software Engineer
> Systems Solutions Group
> Transaction Systems Architects, Inc.
> 218 South 108th Avenue
> Omaha, NE 68154
> Phone: 402-697-2267
> FAX: 402-333-9725
> ~~~~~~~~~~~~~~~~~~~~~~~~~

Charles-Antoine Gauthier
Institute for Information Technology  Institut de technologie de l'information
National Research Council of Canada   Conseil national de recherches du Canada

More information about the users mailing list