Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1105030

Summary: valgrind do not build on ppc64le archi
Product: [Fedora] Fedora Reporter: Michel Normand <normand>
Component: valgrindAssignee: Mark Wielaard <mjw>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dan, dodji, gustavold, jakub, mjw, mjw
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: valgrind-3.9.0-20.svn20140718r14176 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-21 12:59:17 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1051573    
Attachments:
Description Flags
valgrind.spec.ppc64le.patch
none
valgrind_ppc64le_step1.patch
none
valgrind_ppc64le_step2.patch
none
valgrind_ppc64le_step3.patch
none
valgrind_ppc64le_step3.patch none

Description Michel Normand 2014-06-05 09:11:08 UTC
Created attachment 902458 [details]
valgrind.spec.ppc64le.patch

Description of problem: valgrind do not build on ppc64le archi


Version-Release number of selected component (if applicable):
valgrind-3.9.0-15.svn20140513r13961.fc21

Steps to Reproduce:
1.fedpkg clone -a valgrind
2.fedpkg mockbuild

Additional info:

The code changes are available in following bz:
# https://bugs.kde.org/show_bug.cgi?id=334384: Base compilation enablement
# https://bugs.kde.org/show_bug.cgi?id=334834: Run time enablement
# https://bugs.kde.org/show_bug.cgi?id=334836: Test suite changes for ppc64le

I did a scratch build that succeeded on ppcle koji
http://ppc-le.koji.fedoraproject.org/koji/taskinfo?taskID=76179
with related patches I will append in attachments.

Comment 1 Michel Normand 2014-06-05 09:11:48 UTC
Created attachment 902459 [details]
valgrind_ppc64le_step1.patch

Comment 2 Michel Normand 2014-06-05 09:12:24 UTC
Created attachment 902460 [details]
valgrind_ppc64le_step2.patch

Comment 3 Michel Normand 2014-06-05 09:13:31 UTC
Created attachment 902461 [details]
valgrind_ppc64le_step3.patch

Comment 4 Mark Wielaard 2014-06-05 10:08:56 UTC
Thanks for that. I did an earlier scratch build as discussed here:
http://thread.gmane.org/gmane.comp.debugging.valgrind.devel/26830

One issue is that the testsuite doesn't build correctly. If you look at your build.log you'll see that because the test suite doesn't build none of the tests are ran:
http://ppc-le.koji.fedoraproject.org/kojifiles/work/tasks/6180/76180/build.log

Which makes it a little hard to know how well the port is working.

As soon as that is fixed and those patches are accepted upstream I'll rebase the valgrind package in rawhide.

Comment 5 Dan Horák 2014-06-05 11:27:16 UTC
FWIW http://pkgs.fedoraproject.org/cgit/llvm.git/tree/0001-PPC64LE-ELFv2-ABI-updates-for-the-.opd-section.patch is the fix llvm uses for

...
/usr/bin/ld: .opd not allowed in ABI version 2
jm_insns-jm-insns.o: error adding symbols: Bad value
...
that appears in the build.log

Comment 6 Michel Normand 2014-06-05 11:40:08 UTC
(In reply to Dan Horák from comment #5)
> FWIW
> http://pkgs.fedoraproject.org/cgit/llvm.git/tree/0001-PPC64LE-ELFv2-ABI-
> updates-for-the-.opd-section.patch is the fix llvm uses for
> 
> ...
> /usr/bin/ld: .opd not allowed in ABI version 2
> jm_insns-jm-insns.o: error adding symbols: Bad value
> ...
> that appears in the build.log

yes partially, but in fact the step3 patch I retrieved from  https://bugs.kde.org/show_bug.cgi?id=334836 is incomplete because some changes for files in none/tests/ppc32 are missing for files in none/tests/ppc64. I will work on that.

Comment 7 Michel Normand 2014-06-05 14:49:18 UTC
Created attachment 902565 [details]
valgrind_ppc64le_step3.patch

valgrind_ppc64le_step3.patch updated as some missing changes in previous version.

Comment 8 Jakub Jelinek 2014-06-05 14:52:35 UTC
Perhaps I'm blind, but why the duplicated blocks?
#elif defined (VGA_ppc64le)
...
#elif defined (VGA_ppc64le)
...

Comment 9 Michel Normand 2014-06-05 16:38:44 UTC
(In reply to Jakub Jelinek from comment #8)
> Perhaps I'm blind, but why the duplicated blocks?
> #elif defined (VGA_ppc64le)
> ...
> #elif defined (VGA_ppc64le)
> ...

good point :) I am asking to the owner of the original patch

Comment 10 Michel Normand 2014-06-05 16:41:54 UTC
(In reply to Michel Normand from comment #7)
> Created attachment 902565 [details]
> valgrind_ppc64le_step3.patch
> 
> valgrind_ppc64le_step3.patch updated as some missing changes in previous
> version.

the associated scratch build has make check complete but still have some reporting errors
http://ppc-le.koji.fedoraproject.org/koji/taskinfo?taskID=76372

Comment 11 Mark Wielaard 2014-06-05 17:44:46 UTC
(In reply to Michel Normand from comment #10)
> (In reply to Michel Normand from comment #7)
> > Created attachment 902565 [details]
> > valgrind_ppc64le_step3.patch
> > 
> > valgrind_ppc64le_step3.patch updated as some missing changes in previous
> > version.
> 
> the associated scratch build has make check complete but still have some
> reporting errors
> http://ppc-le.koji.fedoraproject.org/koji/taskinfo?taskID=76372

Thanks. That already looks fairly good. I think a couple of these have already been fixed upstream. In particular valgrind svn r13983 should fix the pthread_create_WRK issue.

Please do work with upstream to get these patches fixed and integrated. Then we can rebase the valgrind package in fedora rawhide to include the ppc64le support.

Comment 12 Mark Wielaard 2014-07-21 12:59:17 UTC
Although the patches are still not upstream it seems things are close now to be integrated. Since I will be a away for a while I integrated them into the valgrind.spec already:

    3.9.0-20.svn20140718r14176
    
    - Update to upstream svn r14176
      Remove valgrind-3.9.0-arm64-user_regs.patch
    - Add ppc64le support
      valgrind-3.9.0-ppc64le-initial.patch
      valgrind-3.9.0-ppc64le-functional.patch
      valgrind-3.9.0-ppc64le-test.patch
      valgrind-3.9.0-ppc64le-extra.patch

Uploaded to both f21 and rawhide.
Scratch build on ppc64/ppc64le looks good (test results included in the build.log):
http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=1957511