Multiple definition of __assert
Camilo Alejandro Arboleda
camilo.arboleda at spymac.com
Thu Aug 25 22:51:00 UTC 2005
Hello,
I'm trying to build commoncpp in RTEMS, but when configure tries to test
if gcc can create executables I get an error. It says that __assert has
a multiple definition.
My main project compiles without a problem, and I just copied the
CFLAGS, CXXFLAGS and LDFLAGS from it.
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)
I read something about assert in the cvs log, but I'm not sure what the
workaround is.
(Something that pluzzes me is that it compiled without problem the first
time I tried, but after a "make distclean" i was unable to recompile it)
More information about the users
mailing list