Problem: Making BSD socket application (rtems-ss-20021007)

Joel Sherrill joel.sherrill at OARcorp.com
Wed Oct 30 14:21:14 UTC 2002



Reigu R wrote:
> 
> Hi All,
> 
>  I configured RTEMS in my linux (RedHat 7.2) installation. It was
> successfully build.The target which I opted is i686-pc-linux.
> I created a sample program which uses BSD sockets. While making the
> program, it produced the following error :

The RTEMS "unix port" is built on top of the native UNIX services
and co-exists with them.  Some RTEMS features are not supported
in this environment including POSIX threads and TCP/IP due to header
file and naming conflicts.

There is a PR filed with a patch to use dynamic loading but it has
never been merged.  With this patch, the person was able to use
the TCP/IP stack and it should be possible to enable all RTEMS 
services.  If you want to review it and update it so it can be
merged, it would be most appreciated.  It was against a long ago
version of RTEMS, not submitted until it was old, and the 
portability confidence factor was a bit low.  So we filed it 
away until someone interested could focus on it again.

> # make
> 
> test -d o-optimize || mkdir o-optimize
> 
> gcc --pipe -B/opt/rtems/posix/lib/ -specs bsp_specs -qrtems -g -Wall
> -g -D_BSD_SOURCE -c -o o-optimize/init.o init.c
> 
> In file included from /usr/include/netinet/in.h:23,
> 
> from /usr/include/arpa/inet.h:23,
> 
> from init.c:33:
> 
> /opt/rtems/posix/lib/include/stdint.h:16: warning: redefinition of
> `int8_t'
> 
> /usr/include/sys/types.h:190: warning: `int8_t' previously declared
> here
> 
> /opt/rtems/posix/lib/include/stdint.h:17: warning: redefinition of
> `int16_t'
> 
> /usr/include/sys/types.h:191: warning: `int16_t' previously declared
> here
> 
> /opt/rtems/posix/lib/include/stdint.h:18: warning: redefinition of
> `int32_t'
> 
> /usr/include/sys/types.h:192: warning: `int32_t' previously declared
> here
> 
> /opt/rtems/posix/lib/include/stdint.h:19: conflicting types for
> `int64_t'
> 
> /usr/include/sys/types.h:193: previous declaration of `int64_t'
> 
> make: *** [o-optimize/init.o] Error 1
> 
> 
> 
> The configure command I used is as follows :
> 
> # ../rtems-ss-20021007/configure --target=i686-pc-linux
> --disable-itron --enable-tests --enable-cxx --enable-networking
> --enable-tcpip --enable-posix
> 
> 
> 
> The error was produced only when I included either of the following
> headers :
> 
> 
> 
> #include <netdb.h>
> 
> #include<netinet/in.h>
> 
> #include<arpa/inet.h>
> 
> I think some headers in the RTEMS library is having similar
> declarations which conflicts the one declared in the headers of linux
> library.
> 
> Expecting your comments on the same.
> 
> Thanks in Advance,
> 
> Reigs
> 
> ----------------------------------------------------------------------
> Do you Yahoo!?
> HotJobs - Search new jobs daily now

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985



More information about the users mailing list