multiple definition of __getreent

Chris Johns chrisj at rtems.org
Sat Jun 20 23:13:23 UTC 2015


On 20/06/2015 2:34 am, Sujay Raj wrote:
> Hi ,
> 
> I am working on porting the monkey http server to rtems.
> 
> I am working on the bsp: xilinx_zynq_a9_qemu , target: arm-rtems4.11.
> 
> There are two libraries that I am supposed to link to create my final
> executable, one is libbsd.a and the other is libc.
> 
> libbsd.a links alright, but whenever I try to link libc to create the
> final executable , I get an error:
> 
> /home/raaj/development/rtems/4.11/bsps/arm-rtems4.11/xilinx_zynq_a9_qemu/lib/librtemscpu.a(default-configuration.o):
> In function `__getreent':
> 
> /home/raaj/development/rtems/xilinx_zynq_a9_qemu/arm-rtems4.11/c/xilinx_zynq_a9_qemu/cpukit/libmisc/../../cpukit/../../../xilinx_zynq_a9_qemu/lib/include/rtems/confdefs.h:2420:
> multiple definition of `__getreent'
> 
> /home/raaj/development/rtems/4.11/tools/lib/gcc/arm-rtems4.11/4.9.2/../../../../arm-rtems4.11/lib/thumb/armv7-a/neon/hard/libc.a(lib_a-getreent.o):
> 
> /home/raaj/development/rtems/rtems-source-builder/rtems/build/arm-rtems4.11-gcc-4.9.2-newlib-2.2.0.20150423-x86_64-linux-gnu-1/build/arm-rtems4.11/thumb/armv7-a/neon/hard/newlib/libc/reent/../../../../../../../../../gcc-4.9.2/newlib/libc/reent/getreent.c:13:
> first defined here
> 
> 
> 
> The CFLAGS I am using to compile are :
> 
> -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -mtune=cortex-a9 -O0
> -g -qrtems -B/home/raaj/development/rtems/4.11/bsps/arm-rtems4.11/lib
> -B/home/raaj/development/rtems/4.11/bsps/arm-rtems4.11/xilinx_zynq_a9_qemu/lib/
> --specs bsp_specs
> 
> 
> 
> note: I require libc for three function , initgroups, timegm, and sendfile.
> 
> note: I am working on a cmake build system
> 
> If the information given here is insufficient, kindly ask.
> 

Can you please post the full command line you are using to link with ?

Thanks
Chris



More information about the devel mailing list