Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 990931

Summary: it's not possible to rebuild dts valgrind on ia32 with -march=i386
Product: Red Hat Developer Toolset Reporter: Miroslav Franc <mfranc>
Component: doc-Release_NotesAssignee: Eliska Slobodova <eslobodo>
Status: CLOSED CURRENTRELEASE QA Contact: Miroslav Franc <mfranc>
Severity: medium Docs Contact:
Priority: medium    
Version: DTS 2.0 RHEL 5CC: eslobodo, jakub, mcermak, mfranc, mjw, mnewsome, ohudlick
Target Milestone: beta2   
Target Release: 2.0   
Hardware: i386   
OS: Linux   
Whiteboard:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-07 07:16:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.