Closed Bug 284439 Opened 21 years ago Closed 16 years ago

undefined reference to `__wrap_free'

Categories

(Core :: XPCOM, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: mmokrejs, Unassigned)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050221 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050221 I use current cvs tree, linux i686: MOZ_DEBUG_FLAGS="-O0 -ggdb" CFLAGS="-O0 -ggdb" CXXFLAGS="-O0 -ggdb" ./configure --enable-debug --disable-optimize --with-gssapi=/usr/heimdal --enable-jprof --enable-debug-modules=all --enable-debugger-info-modules --enable-application=suite --disable-necko-disk-cache --enable-wrap-malloc --enable-detect-webshell-leaks --enable-svg --enable-svg-renderer-libart --enable-image-decoders=all --disable-composer --enable-pango --with-qtdir=/usr/qt/3 --with-ft-prefix=/usr gmake[5]: Entering directory `/scratch/mozilla/xpcom/typelib/xpt/tools' Creating .deps gmake[6]: Entering directory `/scratch/mozilla/xpcom/typelib/xpt/tools' xpt_dump.c gcc -o xpt_dump.o -c -DOSTYPE=\"Linux2.4\" -DOSARCH=\"Linux\" -I../../../../dist/include/xpcom -I../../../../dist/include -I/scratch/mozilla/dist/include/nspr -fPIC -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -Wno-long-long -pedantic -O0 -ggdb -pthread -pipe -DDEBUG -D_DEBUG -DDEBUG_root -DTRACING -g -fno-inline -include ../../../../mozilla-config.h -DMOZILLA_CLIENT -Wp,-MD,.deps/xpt_dump.pp xpt_dump.c xpt_dump.c: In function `XPT_DumpInterfaceDirectoryEntry': xpt_dump.c:404: warning: void format, XPTInterfaceDescriptor arg (arg 5) gcc -Wl,--wrap -Wl,malloc -Wl,--wrap -Wl,free -Wl,--wrap -Wl,realloc -Wl,--wrap -Wl,__builtin_new -Wl,--wrap -Wl,__builtin_vec_new -Wl,--wrap -Wl,__builtin_delete -Wl,--wrap -Wl,__builtin_vec_delete -Wl,--wrap -Wl,PR_Free -Wl,--wrap -Wl,PR_Malloc -Wl,--wrap -Wl,PR_Calloc -Wl,--wrap -Wl,PR_Realloc -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -Wno-long-long -pedantic -O0 -ggdb -pthread -pipe -DDEBUG -D_DEBUG -DDEBUG_root -DTRACING -g -fno-inline -o xpt_dump xpt_dump.o -L../../../../dist/bin -L../../../../dist/lib ../../../../dist/lib/libxpt.a -lpangoft2-1.0 -ldl -lm ../../../../dist/lib/libxpt.a(xpt_arena.o)(.text+0x1c0): In function `XPT_DestroyArena': /scratch/mozilla/xpcom/typelib/xpt/src/xpt_arena.c:177: undefined reference to `__wrap_free' ../../../../dist/lib/libxpt.a(xpt_arena.o)(.text+0x1d3):/scratch/mozilla/xpcom/typelib/xpt/src/xpt_arena.c:180: undefined reference to `__wrap_free' collect2: ld returned 1 exit status gmake[6]: *** [xpt_dump] Error 1 gmake[6]: Leaving directory `/scratch/mozilla/xpcom/typelib/xpt/tools' Reproducible: Always
What compiler? (precise version number, for instance the Fedora Core gcc3.4 has some significant linking changes that could affect this).
# gcc -v Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/specs Configured with: /var/tmp/portage/gcc-3.3.5-r1/work/gcc-3.3.5/configure --enable-version-specific-runtime-libs --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3.5 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5/info --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/include/g++-v3 --host=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --enable-shared --enable-threads=posix --disable-multilib --disable-libgcj --enable-languages=c,c++,f77 Thread model: posix gcc version 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)
And actually I can confirm with 3.4.3 on same Gentoo linux box: c++ -o typeinfo.o -c -I../../dist/include/system_wrappers -include ../../config/gcc_hidden.h -DNO_SIGNALS -DNO_EXECUTE_PERMISSION -DALL_INTERIOR_POINTERS -DLARGE_CONFIG -DREDIRECT_MALLOC=GC_MALLOC -DTHREADS -DGENERIC_THREADS -D_REENTRANT -DGC_DEBUG -DFIND_LEAK -DOPERATOR_NEW_ARRAY -DSAVE_CALL_CHAIN -DUSE_PROC -DOSTYPE=\"Linux2.4\" -DOSARCH=\"Linux\" -I../../dist/include/boehm -I../../dist/include -I/scratch/mozilla/dist/include/nspr -fPIC -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -pedantic -O0 -ggdb -fshort-wchar -pthread -pipe -DDEBUG -D_DEBUG -DDEBUG_root -DTRACING -g -fno-inline -DMOZILLA_CLIENT -include ../../mozilla-config.h -Wp,-MD,.deps/typeinfo.pp typeinfo.cpp typeinfo.cpp:113: error: extra `;' typeinfo.cpp: In function `const char* getTypeName(void*)': typeinfo.cpp:185: error: cannot use typeid with -fno-rtti gmake[3]: *** [typeinfo.o] Error 1 gmake[3]: Leaving directory `/scratch/mozilla/gc/boehm' # gcc -v Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/specs Configured with: /var/tmp/portage/gcc-3.4.3.20050110/work/gcc-3.4.3/configure --enable-version-specific-runtime-libs --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4.3-20050110 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.3-20050110 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.3-20050110/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.3-20050110/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/include/g++-v3 --host=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --enable-shared --enable-threads=posix --disable-multilib --disable-libgcj --enable-languages=c,c++,f77 Thread model: posix gcc version 3.4.3-20050110 (Gentoo Linux 3.4.3.20050110, ssp-3.4.3.20050110-0, pie-8.7.7) Switching between different compiler version is easy, for example I switch rather back to 3.3.5: # gcc-config -l [1] i686-pc-linux-gnu-3.3.5 [2] i686-pc-linux-gnu-3.3.5-hardened [3] i686-pc-linux-gnu-3.3.5-hardenednopie [4] i686-pc-linux-gnu-3.3.5-hardenednossp [5] i686-pc-linux-gnu-3.4.3-20050110 * [6] i686-pc-linux-gnu-3.4.3-20050110-hardened [7] i686-pc-linux-gnu-3.4.3-20050110-hardenednopie [8] i686-pc-linux-gnu-3.4.3-20050110-hardenednossp # gcc-config 1 * Switching to i686-pc-linux-gnu-3.3.5 compiler ... [ ok ] * If you intend to use the gcc from the new profile in an already * running shell, please remember to do: * # source /etc/profile #
Those appear to be two entirely different errors...
Please ignore comment #3. It's filed as a separate bugreport (bug #284430). The problem described here shows only when no boehm is configured (otherwise I hit the boehm bug first). I reran configure omitting boehm stuff using gcc 3.4.3 as mentioned above and the message is exactly same: gmake[6]: Entering directory `/scratch/mozilla/xpcom/typelib/xpt/tools' xpt_dump.c gcc -o xpt_dump.o -c -I../../../../dist/include/system_wrappers -include ../../../../config/gcc_hidden.h -DOSTYPE=\"Linux2.4\" -DOSARCH=\"Linux\" -I../../../../dist/include/xpcom -I../../../../dist/include -I/scratch/mozilla/dist/include/nspr -fPIC -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -Wno-long-long -pedantic -O0 -ggdb -pthread -pipe -DDEBUG -D_DEBUG -DDEBUG_root -DTRACING -g -fno-inline -include ../../../../mozilla-config.h -DMOZILLA_CLIENT -Wp,-MD,.deps/xpt_dump.pp xpt_dump.c xpt_dump.c: In function `XPT_DumpInterfaceDirectoryEntry': xpt_dump.c:404: warning: void format, XPTInterfaceDescriptor arg (arg 5) gcc -Wl,--wrap -Wl,malloc -Wl,--wrap -Wl,free -Wl,--wrap -Wl,realloc -Wl,--wrap -Wl,__builtin_new -Wl,--wrap -Wl,__builtin_vec_new -Wl,--wrap -Wl,__builtin_delete -Wl,--wrap -Wl,__builtin_vec_delete -Wl,--wrap -Wl,PR_Free -Wl,--wrap -Wl,PR_Malloc -Wl,--wrap -Wl,PR_Calloc -Wl,--wrap -Wl,PR_Realloc -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -Wno-long-long -pedantic -O0 -ggdb -pthread -pipe -DDEBUG -D_DEBUG -DDEBUG_root -DTRACING -g -fno-inline -o xpt_dump xpt_dump.o -L../../../../dist/bin -L../../../../dist/lib ../../../../dist/lib/libxpt.a -lpangoft2-1.0 -ldl -lm ../../../../dist/lib/libxpt.a(xpt_arena.o)(.text+0x1ba): In function `XPT_DestroyArena': /scratch/mozilla/xpcom/typelib/xpt/src/xpt_arena.c:177: undefined reference to `__wrap_free' ../../../../dist/lib/libxpt.a(xpt_arena.o)(.text+0x1cd):/scratch/mozilla/xpcom/typelib/xpt/src/xpt_arena.c:180: undefined reference to `__wrap_free' collect2: ld returned 1 exit status gmake[6]: *** [xpt_dump] Error 1 gmake[6]: Leaving directory `/scratch/mozilla/xpcom/typelib/xpt/tools'
I just meet the same thing. It seems that the key is '--enable-wrap-malloc', if no this, the error also will not happen.
mass reassigning to nobody.
Assignee: dougt → nobody
QA Contact: xpcom
mozilla boehm testing structure has been removed/never worked right
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.