Bug 990931 - it's not possible to rebuild dts valgrind on ia32 with -march=i386
Summary: it's not possible to rebuild dts valgrind on ia32 with -march=i386
Alias: None
Product: Red Hat Developer Toolset
Classification: Red Hat
Component: doc-Release_Notes
Version: DTS 2.0 RHEL 5
Hardware: i386
OS: Linux
Target Milestone: beta2
: 2.0
Assignee: Eliska Slobodova
QA Contact: Miroslav Franc
Depends On:
TreeView+ depends on / blocked
Reported: 2013-08-01 08:46 UTC by Miroslav Franc
Modified: 2016-06-17 21:06 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Release Note
Doc Text:
Valgrind must be rebuilt without Red Hat Developer Toolset's gcc installed, or it will be used in preference to the RHEL system gcc, which will result in different binaries to those built and shipped by Red Hat. For any testing, Red Hat Developer Toolset's gdb should be used.
Clone Of:
Last Closed: 2013-08-07 07:16:30 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Miroslav Franc 2013-08-01 08:46:54 UTC
Description of problem:
On rhel5, the packages are build with -march=i386 by default, but this turns out to be very bad for valgrind.  It seems like some gcc buildin is missing there.  Rebuild with i486 fixed that for me.  Not entirely sure why it works in brew.  

Steps to Reproduce:
1. install dts valgrind srpm on rhel5 i386 machine
2. rpmbuild -ba /usr/src/redhat/SPECS/valgrind.spec

Actual results:
../coregrind/libcoregrind-x86-linux.a(libcoregrind_x86_linux_a-ticket-lock-linux.o): In function `release_sched_lock':
/usr/src/redhat/BUILD/valgrind-3.8.1/coregrind/m_scheduler/ticket-lock-linux.c:170: undefined reference to `__sync_fetch_and_add_4'
../coregrind/libcoregrind-x86-linux.a(libcoregrind_x86_linux_a-ticket-lock-linux.o): In function `acquire_sched_lock':
/usr/src/redhat/BUILD/valgrind-3.8.1/coregrind/m_scheduler/ticket-lock-linux.c:123: undefined reference to `__sync_fetch_and_add_4'

Expected results:
packages are build

Comment 1 Mark Wielaard 2013-08-01 12:09:59 UTC
Could you attach the full build log? Then we can see what configure detected. And we can compare with with the full build log in brew to see what that detected.

In particular it seems in your environment configure seems to think sync and fetch support is available while it really isn't (since it is i386). It should use alternative code that doesn't use sync and fetch.

Note You need to log in before you can comment on or make changes to this bug.