multiple definitions of assert

Daron Chabot daron.chabot at gmail.com
Wed Jun 17 01:06:33 UTC 2009


Sorry, my mistake. This problem was fixed with the newlib-1.17.0 patch
from 2009-03-11. Everything builds properly now.

-- dc

On Tue, Jun 16, 2009 at 4:37 PM, Daron Chabot<daron.chabot at gmail.com> wrote:
> I've tripped over this bug building Till's GeSys app:
>
> ########################## begin log
> ###############################################
> powerpc-rtems4.10-g++
> -B/home/dchabot/opt/rtems/powerpc-rtems4.10/mvme3100/lib/ -specs
> bsp_specs -qrtems   -g -Wall  -g    -mcpu=powerpc -msoft-float
> -D__ppc_generic -DUSE_POSIX  -DUSE_RTC_DRIVER
> "-DEARLY_CMDLINE_GET(arg)=do { *(arg) = BSP_commandline_string; }
> while (0)" -DWINS_LINE_DISC -DUSE_TECLA -DNFS_SUPPORT     -I. -Invram
> -DHAVE_CEXP -I../cexp     -Wl,-Map,o-optimize/linkmap
> -Wl,--trace-symbol,__end  -mcpu=powerpc -msoft-float -D__ppc_generic
> -o o-optimize/rtems.exe  o-optimize/init.o
> o-optimize/rtems_netconfig.o o-optimize/config.o o-optimize/addpath.o
> o-optimize/ctrlx.o o-optimize/term.o o-optimize/missing.o
> o-optimize/pairxtract.o   o-optimize/allsyms.o   -lcexp -lbfd
> -lspencer_regexp -lopcodes -liberty -ltecla_r  -lnfs -lm -lrtems++
> /home/dchabot/opt/rtems-head/bin/../lib/gcc/powerpc-rtems4.10/4.3.3/../../../../powerpc-rtems4.10/lib/nof/libc.a(lib_a-assert.o):
> In function `__assert_func':
> /home/dchabot/RTEMS/tools-rtems-head/build/powerpc-rtems4.10/nof/newlib/libc/stdlib/../../../../../../gcc-4.3.3/newlib/libc/stdlib/assert.c:57:
> multiple definition of `__assert_func'
> /home/dchabot/opt/rtems/powerpc-rtems4.10/mvme3100/lib/librtemscpu.a(libcsupport_a-__assert.o):/home/dchabot/RTEMS/build-rtems-head/powerpc-rtems4.10/c/mvme3100/cpukit/libcsupport/../../../../../../rtems-head/c/src/../../cpukit/libcsupport/src/__assert.c:32:
> first defined here
> ############################# end log
> ###################################################
>
> I'm using binutils-2.19.1, gcc-4.3.3, and newlib-1.17.0 with the
> latest patches for all.
>
> RTEMS itself is from the cvs HEAD (last week).
>
> Till pointed me at this thread:
>    http://www.rtems.org/ml/rtems-users/2009/march/msg00042.html
>
> It seems one multiple definition has slipped through...
>
> I've attached a patch to cpukit/libcsupport/__assert.c to allow my app
> to compile, but I'm not sure whether the fix properly belongs in RTEMS
> or in newlib ?
>
> Thanks.
>
>
> -- dc
>



More information about the users mailing list