multiple defined symbols when linking with newlib on mingw32
Brian Hawley
bhawley@luminex.com
Wed Mar 19 21:26:00 GMT 2003
When linking with libc of newlib-1.11.0, the following link errors
indicating multiple definitions of symbols occurs.
I suppose there could be a conflict between mingw libraries, and newlib,
but the output from the linker seems to indicate
that the multiple definitions are within the newlib source.
If someone knows why, I'd appreciate the input. Otherwise, I'll poke
through the code some more.
Here's the details:
bnh-engr@SADIE /e/projects/FS/src/current/test
$ make
make -f GNUmakefile program MODULE=test OPTIONS=;
make[1]: Entering directory `/e/projects/FS/src/current/test'
make -f GNUmakefile -C test module OPTIONS=
make[2]: Entering directory `/e/projects/FS/src/current/test/test'
make -f GNUmakefile actual_module
make[3]: Entering directory `/e/projects/FS/src/current/test/test'
gcc -v -DARCH=generic-i386-winxp -DVERSION_STRING='"test 1.0 ARCH:
generic-i3
86-winxp Built: Wed Mar 19 13:18:47 PST 2003 Copyright(C) 2003 Luminex
Softwar
e, Inc. All Rights Reserved."' -I/home/engr/support/generic-i386-winxp/include
-I./ -I/home/engr/tmp/bnh-engr/testwin/1.0/generic-i386-winxp/include/
-I../
-I../generic-i386-winxp -I../../site -I../../site/generic-i386-winxp
-I/home
/engr/support/generic-i386-winxp/i686-pc-mingw32/include -c version.c -o
/home/
engr/tmp/bnh-engr/testwin/1.0/generic-i386-winxp/test/version.o
Reading specs from c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as
--host=
mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls
--enable
-languages=f77,c++,objc,ada --disable-win32-registry --disable-shared
Thread model: win32
gcc version 3.2 (mingw special 20020817-1)
@
csh : bnh-engr@linux2 : /home/engr/support/generic-i386-winxp226 > cat
/home/eng
r/tmp/bnh/newlibbuild.txt
bnh-engr@SADIE /e/projects/FS/src/current/test
$ make
make -f GNUmakefile program MODULE=test OPTIONS=;
make[1]: Entering directory `/e/projects/FS/src/current/test'
make -f GNUmakefile -C test module OPTIONS=
make[2]: Entering directory `/e/projects/FS/src/current/test/test'
make -f GNUmakefile actual_module
make[3]: Entering directory `/e/projects/FS/src/current/test/test'
gcc -v -DARCH=generic-i386-winxp -DVERSION_STRING='"test 1.0 ARCH:
generic-i3
86-winxp Built: Wed Mar 19 13:18:47 PST 2003 Copyright(C) 2003 Luminex
Softwar
e, Inc. All Rights Reserved."' -I/home/engr/support/generic-i386-winxp/include
-I./ -I/home/engr/tmp/bnh-engr/testwin/1.0/generic-i386-winxp/include/
-I../
-I../generic-i386-winxp -I../../site -I../../site/generic-i386-winxp
-I/home
/engr/support/generic-i386-winxp/i686-pc-mingw32/include -c version.c -o
/home/
engr/tmp/bnh-engr/testwin/1.0/generic-i386-winxp/test/version.o
Reading specs from c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as
--host=
mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls
--enable
-languages=f77,c++,objc,ada --disable-win32-registry --disable-shared
Thread model: win32
gcc version 3.2 (mingw special 20020817-1)
c:\MinGW\bin\..\lib\gcc-lib\mingw32\3.2\cc1.exe -lang-c -v
-If:/support/generic
-i386-winxp/include -I./
-If:/tmp/bnh-engr/testwin/1.0/generic-i386-winxp/includ
e/ -I../ -I../generic-i386-winxp -I../../site
-I../../site/generic-i386-winxp -I
f:/support/generic-i386-winxp/i686-pc-mingw32/include -iprefix
c:\MinGW\bin\../l
ib/gcc-lib/mingw32/3.2/ -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=0
-D__GXX_ABI_VERSION=102 -D_WIN32 -D__WIN32 -D__WIN32__ -DWIN32
-D__MINGW32__ -D_
_MSVCRT__ -DWINNT -D_X86_=1 -D_WIN32 -D__WIN32 -D__WIN32__ -D__WIN32__
-D__MINGW
32__ -D__MSVCRT__ -D__WINNT__ -D_X86_=1 -D__WIN32 -D__WINNT -Asystem=winnt
-D__N
O_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386
-D__i38
6__ -D__tune_i586__ -D__tune_pentium__ -D__stdcall=__attribute__((__stdcall__))
-D__cdecl=__attribute__((__cdecl__)) -D__fastcall=__attribute__((__fastcall__))
-D_stdcall=__attribute__((__stdcall__)) -D_cdecl=__attribute__((__cdecl__))
-D_f
astcall=__attribute__((__fastcall__)) -D__declspec(x)=__attribute__((x))
-DARCH=
generic-i386-winxp -DVERSION_STRING="test 1.0 ARCH: generic-i386-winxp Built:
Wed Mar 19 13:18:47 PST 2003 Copyright(C) 2003 Luminex Software, Inc. All
Rights
Reserved." version.c -quiet -dumpbase version.c -version -o
c:\windows\TEMP/ccn
etpdb.s
ignoring nonexistent directory "../generic-i386-winxp"
GNU CPP version 3.2 (mingw special 20020817-1) (cpplib) (80386, BSD syntax)
GNU C version 3.2 (mingw special 20020817-1) (mingw32)
compiled by GNU C version 3.2.
ignoring nonexistent directory "c:/MinGW/mingw32/include"
ignoring nonexistent directory
"/mingw/lib/gcc-lib/mingw32/3.2/../../../../inclu
de"
ignoring nonexistent directory "/mingw/include"
ignoring nonexistent directory "/mingw/lib/gcc-lib/mingw32/3.2/include"
ignoring nonexistent directory
"/mingw/lib/gcc-lib/mingw32/3.2/../../../../mingw
32/include"
ignoring nonexistent directory "/usr/local/mingw32/include"
#include "..." search starts here:
#include <...> search starts here:
f:/support/generic-i386-winxp/include
.
f:/tmp/bnh-engr/testwin/1.0/generic-i386-winxp/include
..
../../site
../../site/generic-i386-winxp
f:/support/generic-i386-winxp/i686-pc-mingw32/include
c:/MinGW/include
c:/MinGW/lib/gcc-lib/mingw32/3.2/include
End of search list.
c:\MinGW\bin\..\lib\gcc-lib\mingw32\3.2\..\..\..\..\mingw32\bin\as.exe -o
f:/tm
p/bnh-engr/testwin/1.0/generic-i386-winxp/test/version.o
c:\windows\TEMP/ccnetpd
b.s
gcc
-v -L/home/engr/support/generic-i386-winxp/lib -L/home/engr/tmp/bnh-engr
/testwin/1.0/generic-i386-winxp/lib
-L/home/engr/support/generic-i386-winxp/i68
6-pc-mingw32/lib
/home/engr/tmp/bnh-engr/testwin/1.0/generic-i386-winxp/test/m
ain.o /home/engr/tmp/bnh-engr/testwin/1.0/generic-i386-winxp/test/version.o
-o /
home/engr/tmp/bnh-engr/testwin/1.0/generic-i386-winxp/test/test \
-lbase -lc \
Reading specs from c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as
--host=
mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls
--enable
-languages=f77,c++,objc,ada --disable-win32-registry --disable-shared
Thread model: win32
gcc version 3.2 (mingw special 20020817-1)
c:\MinGW\bin\..\lib\gcc-lib\mingw32\3.2\..\..\..\..\mingw32\bin\ld.exe
-Bdynami
c -o f:/tmp/bnh-engr/testwin/1.0/generic-i386-winxp/test/test.exe
c:/MinGW/bin/.
./lib/gcc-lib/mingw32/3.2/../../../crt2.o
c:/MinGW/bin/../lib/gcc-lib/mingw32/3.
2/crtbegin.o -Lf:/support/generic-i386-winxp/lib
-Lf:/tmp/bnh-engr/testwin/1.0/g
eneric-i386-winxp/lib -Lf:/support/generic-i386-winxp/i686-pc-mingw32/lib
-Lc:/M
inGW/bin/../lib/gcc-lib/mingw32/3.2 -Lc:/MinGW/bin/../lib/gcc-lib
-Lc:/MinGW/bin
/../lib/gcc-lib/mingw32/3.2/../../../../mingw32/lib
-Lc:/MinGW/bin/../lib/gcc-li
b/mingw32/3.2/../../..
f:/tmp/bnh-engr/testwin/1.0/generic-i386-winxp/test/main.
o f:/tmp/bnh-engr/testwin/1.0/generic-i386-winxp/test/version.o -lbase -lc
-lmin
gw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32
-lshell3
2 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt
c:/MinGW/bin/../lib/gcc-lib/ming
w32/3.2/crtend.o
f:/support/generic-i386-winxp/i686-pc-mingw32/lib/libc.a(freer.o): In
function `
gcleanup':
e:/projects/wincompat-stuff/newlib-1.11.0/newlib/libc/stdlib/mallocr.c:1117:
mul
tiple definition of `gcleanup'
f:/support/generic-i386-winxp/i686-pc-mingw32/lib/libc.a(mallocr.o):e:/projects/
wincompat-stuff/newlib-1.11.0/newlib/libc/stdlib/mallocr.c:1117: first
defined h
ere
f:/support/generic-i386-winxp/i686-pc-mingw32/lib/libc.a(freer.o): In
function `
wsbrk':
e:/projects/wincompat-stuff/newlib-1.11.0/newlib/libc/stdlib/mallocr.c:1157:
mul
tiple definition of `wsbrk'
f:/support/generic-i386-winxp/i686-pc-mingw32/lib/libc.a(mallocr.o):e:/projects/
wincompat-stuff/newlib-1.11.0/newlib/libc/stdlib/mallocr.c:1157: first
defined h
ere
f:/support/generic-i386-winxp/i686-pc-mingw32/lib/libc.a(reallocr.o): In
functio
n `gcleanup':
e:/projects/wincompat-stuff/newlib-1.11.0/newlib/libc/stdlib/mallocr.c:1117:
mul
tiple definition of `gcleanup'
f:/support/generic-i386-winxp/i686-pc-mingw32/lib/libc.a(mallocr.o):e:/projects/
wincompat-stuff/newlib-1.11.0/newlib/libc/stdlib/mallocr.c:1117: first
defined h
ere
f:/support/generic-i386-winxp/i686-pc-mingw32/lib/libc.a(reallocr.o): In
functio
n `wsbrk':
e:/projects/wincompat-stuff/newlib-1.11.0/newlib/libc/stdlib/mallocr.c:1157:
mul
tiple definition of `wsbrk'
f:/support/generic-i386-winxp/i686-pc-mingw32/lib/libc.a(mallocr.o):e:/projects/
wincompat-stuff/newlib-1.11.0/newlib/libc/stdlib/mallocr.c:1157: first
defined h
ere
f:/support/generic-i386-winxp/i686-pc-mingw32/lib/libc.a(callocr.o): In
function
`gcleanup':
e:/projects/wincompat-stuff/newlib-1.11.0/newlib/libc/stdlib/mallocr.c:1117:
mul
tiple definition of `gcleanup'
f:/support/generic-i386-winxp/i686-pc-mingw32/lib/libc.a(mallocr.o):e:/projects/
wincompat-stuff/newlib-1.11.0/newlib/libc/stdlib/mallocr.c:1117: first
defined h
ere
f:/support/generic-i386-winxp/i686-pc-mingw32/lib/libc.a(callocr.o): In
function
`wsbrk':
e:/projects/wincompat-stuff/newlib-1.11.0/newlib/libc/stdlib/mallocr.c:1157:
mul
tiple definition of `wsbrk'
f:/support/generic-i386-winxp/i686-pc-mingw32/lib/libc.a(mallocr.o):e:/projects/
wincompat-stuff/newlib-1.11.0/newlib/libc/stdlib/mallocr.c:1157: first
defined h
ere
make[3]: *** [/home/engr/tmp/bnh-engr/testwin/1.0/generic-i386-winxp/test/test]
More information about the Newlib
mailing list