|
From: Shlomi F. <sh...@sh...> - 2011-12-13 15:52:36
|
Hi all,
When I'm trying to build valgrind using this script that tries to emulate the
rpm build environment, valgrind finishes with these errors:
[SCRIPT]
disable_local_lib
export LANG="C"
unset LANGUAGE
unset LC_ALL
unset DISPLAY
autoreconf
CFLAGS="${CFLAGS:--O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4}" ; export CFLAGS ;
CXXFLAGS="${CXXFLAGS:--O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4}" ; export CXXFLAGS ;
FFLAGS="${FFLAGS:--O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4}" ; export FFLAGS ;
LDFLAGS="$LDFLAGS -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags"; export LDFLAGS ;
CONFIGURE_TOP="${CONFIGURE_TOP:-.}";
/usr/lib/rpm/mageia/force-as-needed-for-shared-lib-in-libtool ;
/usr/lib/rpm/mageia/drop-ld-no-undefined-for-shared-lib-modules-in-libtool ;
/usr/lib/rpm/mageia/fix-libtool-ltmain-from-overlinking ;
/usr/lib/rpm/mageia/fix-libtool-from-moving-options-after-libs $CONFIGURE_TOP ;
/usr/lib/rpm/mageia/fix-dlsearch-path-in-libtool-for-multilib $CONFIGURE_TOP lib64 ;
[ -f $CONFIGURE_TOP/configure.in -o -f $CONFIGURE_TOP/configure.ac ] &&
CONFIGURE_XPATH="--x-includes=/usr/include --x-libraries=/usr/lib64"
$CONFIGURE_TOP/configure --build=x86_64-mageia-linux-gnu \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
--datadir=/usr/share \
--includedir=/usr/include \
--libdir=/usr/lib64 \
--libexecdir=/usr/lib64 \
--localstatedir=/var \
--sharedstatedir=/usr/com \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
$CONFIGURE_XPATH
[/SCRIPT]
[ERROR]
make[3]: Entering directory `/home/shlomif/Download/unpack/prog/valgrind/valgrind-3.7.0/coregrind'
rm -f libcoregrind-x86-linux.a
/usr/bin/ar cru libcoregrind-x86-linux.a libcoregrind_x86_linux_a-m_commandline.o libcoregrind_x86_linux_a-m_clientstate.o libcoregrind_x86_linux_a-m_cpuid.o libcoregrind_x86_linux_a-m_debugger.o libcoregrind_x86_linux_a-m_debuglog.o libcoregrind_x86_linux_a-m_errormgr.o libcoregrind_x86_linux_a-m_execontext.o libcoregrind_x86_linux_a-m_hashtable.o libcoregrind_x86_linux_a-m_libcbase.o libcoregrind_x86_linux_a-m_libcassert.o libcoregrind_x86_linux_a-m_libcfile.o libcoregrind_x86_linux_a-m_libcprint.o libcoregrind_x86_linux_a-m_libcproc.o libcoregrind_x86_linux_a-m_libcsetjmp.o libcoregrind_x86_linux_a-m_libcsignal.o libcoregrind_x86_linux_a-m_machine.o libcoregrind_x86_linux_a-m_main.o libcoregrind_x86_linux_a-m_mallocfree.o libcoregrind_x86_linux_a-m_options.o libcoregrind_x86_linux_a-m_oset.o libcoregrind_x86_linux_a-m_redir.o libcoregrind_x86_linux_a-m_seqmatch.o libcoregrind_x86_linux_a-m_signals.o libcoregrind_x86_linux_a-m_sparsewa.o libcoregrind_x86_linux_a-m_stacks.o
libcoregrind_x86_linux_a-m_stacktrace.o libcoregrind_x86_linux_a-m_syscall.o libcoregrind_x86_linux_a-m_threadstate.o libcoregrind_x86_linux_a-m_tooliface.o libcoregrind_x86_linux_a-m_trampoline.o libcoregrind_x86_linux_a-m_translate.o libcoregrind_x86_linux_a-m_transtab.o libcoregrind_x86_linux_a-m_vki.o libcoregrind_x86_linux_a-m_vkiscnums.o libcoregrind_x86_linux_a-m_wordfm.o libcoregrind_x86_linux_a-m_xarray.o libcoregrind_x86_linux_a-m_aspacehl.o libcoregrind_x86_linux_a-aspacemgr-common.o libcoregrind_x86_linux_a-aspacemgr-linux.o libcoregrind_x86_linux_a-coredump-elf.o libcoregrind_x86_linux_a-coredump-macho.o libcoregrind_x86_linux_a-misc.o libcoregrind_x86_linux_a-d3basics.o libcoregrind_x86_linux_a-debuginfo.o libcoregrind_x86_linux_a-readdwarf.o libcoregrind_x86_linux_a-readdwarf3.o libcoregrind_x86_linux_a-readelf.o libcoregrind_x86_linux_a-readmacho.o libcoregrind_x86_linux_a-readpdb.o libcoregrind_x86_linux_a-readstabs.o libcoregrind_x86_linux_a-storage.o libco
regrind_x86_linux_a-tytypes.o libcoregrind_x86_linux_a-cp-demangle.o libcoregrind_x86_linux_a-cplus-dem.o libcoregrind_x86_linux_a-demangle.o libcoregrind_x86_linux_a-dyn-string.o libcoregrind_x86_linux_a-safe-ctype.o libcoregrind_x86_linux_a-dispatch-x86-linux.o libcoregrind_x86_linux_a-dispatch-amd64-linux.o libcoregrind_x86_linux_a-dispatch-ppc32-linux.o libcoregrind_x86_linux_a-dispatch-ppc64-linux.o libcoregrind_x86_linux_a-dispatch-arm-linux.o libcoregrind_x86_linux_a-dispatch-s390x-linux.o libcoregrind_x86_linux_a-dispatch-x86-darwin.o libcoregrind_x86_linux_a-dispatch-amd64-darwin.o libcoregrind_x86_linux_a-m_gdbserver.o libcoregrind_x86_linux_a-inferiors.o libcoregrind_x86_linux_a-m_gdbserver.o libcoregrind_x86_linux_a-regcache.o libcoregrind_x86_linux_a-remote-utils.o libcoregrind_x86_linux_a-server.o libcoregrind_x86_linux_a-signals.o libcoregrind_x86_linux_a-target.o libcoregrind_x86_linux_a-utils.o libcoregrind_x86_linux_a-valgrind-low.o libcoregrind_x86_linux_a
-valgrind-low-x86.o libcoregrind_x86_linux_a-valgrind-low-amd64.o libcoregrind_x86_linux_a-valgrind-low-arm.o libcoregrind_x86_linux_a-valgrind-low-ppc32.o libcoregrind_x86_linux_a-valgrind-low-ppc64.o libcoregrind_x86_linux_a-valgrind-low-s390x.o libcoregrind_x86_linux_a-version.o libcoregrind_x86_linux_a-initimg-linux.o libcoregrind_x86_linux_a-initimg-darwin.o libcoregrind_x86_linux_a-initimg-pathscan.o libcoregrind_x86_linux_a-mach_basics.o libcoregrind_x86_linux_a-mach_msg.o libcoregrind_x86_linux_a-mach_traps-x86-darwin.o libcoregrind_x86_linux_a-mach_traps-amd64-darwin.o libcoregrind_x86_linux_a-replacemalloc_core.o libcoregrind_x86_linux_a-scheduler.o libcoregrind_x86_linux_a-sema.o libcoregrind_x86_linux_a-sigframe-x86-linux.o libcoregrind_x86_linux_a-sigframe-amd64-linux.o libcoregrind_x86_linux_a-sigframe-ppc32-linux.o libcoregrind_x86_linux_a-sigframe-ppc64-linux.o libcoregrind_x86_linux_a-sigframe-arm-linux.o libcoregrind_x86_linux_a-sigframe-s390x-linux.o libco
regrind_x86_linux_a-sigframe-x86-darwin.o libcoregrind_x86_linux_a-sigframe-amd64-darwin.o libcoregrind_x86_linux_a-syscall-x86-linux.o libcoregrind_x86_linux_a-syscall-amd64-linux.o libcoregrind_x86_linux_a-syscall-ppc32-linux.o libcoregrind_x86_linux_a-syscall-ppc64-linux.o libcoregrind_x86_linux_a-syscall-arm-linux.o libcoregrind_x86_linux_a-syscall-s390x-linux.o libcoregrind_x86_linux_a-syscall-x86-darwin.o libcoregrind_x86_linux_a-syscall-amd64-darwin.o libcoregrind_x86_linux_a-syswrap-main.o libcoregrind_x86_linux_a-syswrap-generic.o libcoregrind_x86_linux_a-syswrap-linux.o libcoregrind_x86_linux_a-syswrap-linux-variants.o libcoregrind_x86_linux_a-syswrap-darwin.o libcoregrind_x86_linux_a-syswrap-x86-linux.o libcoregrind_x86_linux_a-syswrap-amd64-linux.o libcoregrind_x86_linux_a-syswrap-ppc32-linux.o libcoregrind_x86_linux_a-syswrap-ppc64-linux.o libcoregrind_x86_linux_a-syswrap-arm-linux.o libcoregrind_x86_linux_a-syswrap-s390x-linux.o libcoregrind_x86_linux_a-syswrap
-x86-darwin.o libcoregrind_x86_linux_a-syswrap-amd64-darwin.o libcoregrind_x86_linux_a-elf.o libcoregrind_x86_linux_a-macho.o libcoregrind_x86_linux_a-main.o libcoregrind_x86_linux_a-script.o
ranlib libcoregrind-x86-linux.a
gcc -m64 -fomit-frame-pointer -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -Wno-long-long -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -Wno-pointer-sign -fno-stack-protector -m64 -fomit-frame-pointer -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags -o vgdb vgdb-vgdb.o -lpthread
gcc -m64 -fomit-frame-pointer -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -fpic -O -g -fno-omit-frame-pointer -fno-strict-aliasing -fno-builtin -Wno-long-long -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -Wno-pointer-sign -fno-stack-protector -nodefaultlibs -shared -Wl,-z,interpose,-z,initfirst -m64 -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags -o vgpreload_core-amd64-linux.so vgpreload_core_amd64_linux_so-vg_preloaded.o
vgpreload_core_amd64_linux_so-vg_preloaded.o: In function `_vgnU_freeres':
/home/shlomif/Download/unpack/prog/valgrind/valgrind-3.7.0/coregrind/vg_preloaded.c:61: undefined reference to `__libc_freeres'
collect2: ld returned 1 exit status
make[3]: *** [vgpreload_core-amd64-linux.so] Error 1
make[3]: Leaving directory `/home/shlomif/Download/unpack/prog/valgrind/valgrind-3.7.0/coregrind'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/shlomif/Download/unpack/prog/valgrind/valgrind-3.7.0/coregrind'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/shlomif/Download/unpack/prog/valgrind/valgrind-3.7.0'
make: *** [all] Error 2
[/ERROR]
Strangely enough, it builds fine when I do rpmbuild -ba on the .spec file
(while not applying any downstream patches.), but then one of the test scripts
does not finish after many minutes while consuming 100% CPU. But first I want
to see why it succeeds in one place and not in the other. I tried to emulate
the .rpm environment.
I'm on Mageia Linux Cauldron on x86-64.
Any help would be appreciated.
Regards,
Shlomi Fish
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Interview with Ben Collins-Sussman - http://shlom.in/sussman
Jewish Atheists are the only true Atheists. They beat the hell out of Goy
Atheists.
Please reply to list if it's a mailing list post - http://shlom.in/reply .
|
|
From: Shlomi F. <sh...@sh...> - 2011-12-22 19:52:05
|
Hi all, replying to myself, here are a few other things I discovered: 1. The mca-bits (sp?) script still hangs the "make regtest" inside the rpm process even after I set the CFLAGS and CXXFLAGS to "-O2 -g". 2. Outside the rpm build process with the default ./configure selected CFLAGS and CXXFLAGS, then valgrind builds and completes the tests successfully. Can anyone shed any light on these problems? Regards, Shlomi Fish On Tue, 13 Dec 2011 16:53:08 +0200 Shlomi Fish <sh...@sh...> wrote: > Hi all, > > When I'm trying to build valgrind using this script that tries to emulate the > rpm build environment, valgrind finishes with these errors: > [SNIP] -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Apple Inc. is Evil - http://www.shlomifish.org/open-source/anti/apple/ Sophie: Let’s suppose you have a table with 2^n cups… Jack: Wait a second! Is ‘n’ a natural number? Please reply to list if it's a mailing list post - http://shlom.in/reply . |
|
From: <pc...@ma...> - 2011-12-23 14:01:14
|
> Hi all, > > replying to myself, here are a few other things I discovered: > > 1. The mca-bits (sp?) script still hangs the "make regtest" inside the rpm > process even after I set the CFLAGS and CXXFLAGS to "-O2 -g". > > 2. Outside the rpm build process with the default ./configure selected CFLAGS > and CXXFLAGS, then valgrind builds and completes the tests successfully. > > Can anyone shed any light on these problems? I did a few patches in some test cases that rely on consistent behavior when reading writing to global variables by declaring the variable volatile, but ended up just setting CFLAGS and CXXFLAGS to "-O0 -g3", because, for example, it would still fail on tests using gdb to modify the program state, as variables that live on registers cannot be changed. But I wonder some may be side effects of the patch I made to enable it to compile, and I commented at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47602 because the comment in the valgrind C file kind of tells me I should not manually save/restore %ebp because should not touch the stack... Patch I made is to revert to use valgrind 3.6.1 behavior: http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/valgrind/current/SOURCES/valgrind-3.7.0-pic-clobber.patch?view=markup > Regards, > > Shlomi Fish Paulo |