10.10 cant seem to use -fmudflap with gcc 4.4

Bug #803775 reported by Harish Badrinath
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-defaults (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Hello,
Description:when trying to to compile C programs using the GNU C compiler, -fmudflap seems to stop "legal" c programs from turning into binaries.

1) Release :
ravi@psg-xl-buildd:~/harish/bug$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.10
Release: 10.10
Codename: maverick
ravi@psg-xl-buildd:~/harish/bug$ cat /proc/version
Linux version 2.6.35-22-generic-pae (buildd@rothera) (gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu4) ) #33-Ubuntu SMP Sun Sep 19 22:14:14 UTC 2010

2) Version of software running:
ravi@psg-xl-buildd:~/harish/bug$ dpkg -l | grep mudflap
ii libmudflap0 4.5.1-7ubuntu2 GCC mudflap shared support libraries
ii libmudflap0-4.4-dev 4.4.4-14ubuntu5 GCC mudflap support libraries (development files)
ii libmudflap0-4.5-dev 4.5.1-7ubuntu2 GCC mudflap support libraries (development files)
ravi@psg-xl-buildd:~/harish/bug$ gcc -v
Using built-in specs.
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)

3)What should happen:
Successful compilation of legal programs

4)What is happening:
A screen full of linker errors

5)Log
ravi@psg-xl-buildd:~/harish/bug$ cat test.c
#include <stdio.h>
int main()
{
 return 0;
}
ravi@psg-xl-buildd:~/harish/bug$ gcc test.c
ravi@psg-xl-buildd:~/harish/bug$ echo $?
0
ravi@psg-xl-buildd:~/harish/bug$ gcc test.c -fmudflap -lmudflap
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function `__mf_object_tree':
(.text.__mf_object_tree+0x4b): undefined reference to `__real_malloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function `mfsplay_tree_foreach':
(.text.mfsplay_tree_foreach+0x27): undefined reference to `__real_malloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function `mfsplay_tree_foreach':
(.text.mfsplay_tree_foreach+0x34): undefined reference to `__real_malloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function `mfsplay_tree_foreach':
(.text.mfsplay_tree_foreach+0xe9): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function `mfsplay_tree_foreach':
(.text.mfsplay_tree_foreach+0xf1): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function `mfsplay_tree_splay':
(.text.mfsplay_tree_splay+0xb7): undefined reference to `__real_malloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function `mfsplay_tree_splay':
(.text.mfsplay_tree_splay+0xe4): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function `__mf_watch_or_not':
(.text.__mf_watch_or_not+0x74): undefined reference to `__real_malloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function `__mf_watch_or_not':
(.text.__mf_watch_or_not+0xfa): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function `__mf_backtrace':
(.text.__mf_backtrace+0x26): undefined reference to `__real_calloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function `__mf_backtrace':
(.text.__mf_backtrace+0x7c): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function `__mf_violation':
(.text.__mf_violation+0x68f): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function `__mfu_unregister':
(.text.__mfu_unregister+0x1dd): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function `__mfu_unregister':
(.text.__mfu_unregister+0x287): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function `__mfu_unregister':
(.text.__mfu_unregister+0x2a0): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o):(.text.__mfu_unregister+0x2c0): more undefined references to `__real_free' follow
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function `__mfu_register':
(.text.__mfu_register+0x11e): undefined reference to `__real_calloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function `__mfu_register':
(.text.__mfu_register+0x1cb): undefined reference to `__real_malloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function `__mfu_check':
(.text.__mfu_check+0x256): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function `__mfu_check':
(.text.__mfu_check+0x4e3): undefined reference to `__real_malloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-hooks1.o): In function `__mf_wrap_alloca_indirect':
(.text.__mf_wrap_alloca_indirect+0x7e): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-hooks1.o): In function `__mf_wrap_alloca_indirect':
(.text.__mf_wrap_alloca_indirect+0x8b): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-hooks1.o): In function `__mf_wrap_alloca_indirect':
(.text.__mf_wrap_alloca_indirect+0xbd): undefined reference to `__real_malloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-hooks1.o): In function `__mf_wrap_alloca_indirect':
(.text.__mf_wrap_alloca_indirect+0xdf): undefined reference to `__real_malloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-hooks1.o): In function `__mf_wrap_alloca_indirect':
(.text.__mf_wrap_alloca_indirect+0x1d2): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-hooks1.o): In function `__wrap_malloc':
(.text.__wrap_malloc+0x64): undefined reference to `__real_malloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-hooks1.o): In function `__wrap_malloc':
(.text.__wrap_malloc+0xd2): undefined reference to `__real_malloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-hooks1.o): In function `__wrap_munmap':
(.text.__wrap_munmap+0x45): undefined reference to `__real_munmap'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-hooks1.o): In function `__wrap_munmap':
(.text.__wrap_munmap+0xb8): undefined reference to `__real_munmap'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-hooks1.o): In function `__wrap_mmap':
(.text.__wrap_mmap+0x6a): undefined reference to `__real_mmap'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-hooks1.o): In function `__wrap_mmap':
(.text.__wrap_mmap+0xf8): undefined reference to `__real_mmap'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-hooks1.o): In function `__wrap_realloc':
(.text.__wrap_realloc+0x86): undefined reference to `__real_realloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-hooks1.o): In function `__wrap_realloc':
(.text.__wrap_realloc+0x13a): undefined reference to `__real_realloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-hooks1.o): In function `__wrap_calloc':
(.text.__wrap_calloc+0x6e): undefined reference to `__real_malloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-hooks1.o): In function `__wrap_calloc':
(.text.__wrap_calloc+0xfa): undefined reference to `__real_calloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-hooks1.o): In function `__wrap_free':
(.text.__wrap_free+0x9b): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-hooks1.o): In function `__wrap_free':
(.text.__wrap_free+0x122): undefined reference to `__real_free'
collect2: ld returned 1 exit status
ravi@psg-xl-buildd:~/harish/bug$ echo $?
1
ravi@psg-xl-buildd:~/harish/bug$ gcc test.c -fmudflap
/usr/lib/gcc/i686-linux-gnu/4.4.5/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `__wrap_main'
/tmp/cc3HWO6A.o: In function `global constructors keyed to 00099_0_main':
test.c:(.text+0x11): undefined reference to `__mf_init'
collect2: ld returned 1 exit status

Revision history for this message
Harish Badrinath (harishbadrinath) wrote :

*Update* This seems like an ubuntu specific thing

zomg@master:~/trash$ mv dummy.c test.c

zomg@master:~/trash$ cat test.c
#include <stdio.h>
int main()
{
 return 0;
}

zomg@master:~/trash$ gcc test.c
zomg@master:~/trash$ echo $?
0

zomg@master:~/trash$ gcc test.c -fmudflap -lmudflap
zomg@master:~/trash$ echo $?
0

zomg@master:~/trash$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux unstable (sid)
Release: unstable
Codename: sid
zomg@master:~/trash$ cat /proc/version
Linux version 2.6.32-5-686 (Debian 2.6.32-30) (<email address hidden>) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Wed Jan 12 04:01:41 UTC 2011

Changed in gcc-defaults (Ubuntu):
status: New → Confirmed
Revision history for this message
Matthias Klose (doko) wrote :

mudflap is gone upstream

Changed in gcc-defaults (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.