Multiple definition of '__assert'

Camilo Alejandro Arboleda camilo.arboleda at spymac.com
Mon Sep 12 16:08:29 UTC 2005


Hello,

I worte to the list because of this problem, but there is no answer (yet).

I'm using rtems 4.6.2, with gcc 3.2.3 and newlib 1.1.13. When I try to 
compile even a simple application agaist pc486 BSP I get an error 
message telling there is a previous definition of __assert.  My 
work-around was to copy console.c to my project directory, and compiling 
it as part of my project.

Has anybody the same problem? Any ideas or a cleaner work-around?

The test program is

| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }


and the error is:


/usr/rtems-4.6/i386-rtems/pc486/lib/librtemsbsp.a(console.o): In
function `__assert':
/cygdrive/c/rtems/build-rtems/i386-rtems-4.6.2/i386-rtems/c/pc486/lib/libbsp/i386/pc386/console/../../../../../../../../../../rtems-4.6.2/c/src/lib/libbsp/i386/pc386/console/console.c:151: 

multiple definition of `__assert'
/cygdrive/c/cygwin/usr/rtems/i386-rtems/bin/../lib/gcc-lib/i386-rtems/3.2.3/../../../../i386-rtems/lib/libc.a(assert.o):/cygdrive/c/rtems/build-utils/gcc_3.2.3-i386/i386-rtems/newlib/libc/stdlib/../../../../../../source/gcc-3.2.3/newlib/libc/stdlib/assert.c:56: 

first defined here
/cygdrive/c/cygwin/usr/rtems/i386-rtems/bin/../lib/gcc-lib/i386-rtems/3.2.3/../../../../i386-rtems/bin/ld: 

Warning: size of symbol `__assert' changed from 41 to 133 in
/usr/rtems-4.6/i386-rtems/pc486/lib/librtemsbsp.a(console.o)




More information about the users mailing list