Bug 1288703

Summary: binutils with mpx required, gcov-tool not renamed to gcov-tool5 when building without SCL
Product: Red Hat Developer Toolset Reporter: Xiangyang Chen <chenxy>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Martin Cermak <mcermak>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: DTS 4.0 RHEL 6CC: law, mcermak, mfranc, mnewsome, mpolacek
Target Milestone: alpha   
Target Release: 4.1   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-08 11:05:51 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:

Description Xiangyang Chen 2015-12-05 10:19:15 UTC
Description of problem:

I try to compile devtoolset-4-gcc without scl on a fresh installed CentOS 6.7 x86_64, with `Name:' switched to `Name: %{?scl_prefix}gcc%{!?scl:5}', but encounter 2 problems:

1. libmpxwrapper is not compiled.
2. /usr/bin/gcov-tool is not renamed to /usr/bin/gconv-tool5

The first problem is due to lack of support of MPX in binutils.  After I upgrade binutils to 2.25.1, libmpxwrapper gets compiled.

The second problem is due to the line in gcc.spec doesn't include the new added `gcov-tool':

%if 0%{!?scl:1}
for i in %{buildroot}%{_prefix}/bin/{*gcc,*++,gcov,gfortran,gcc-ar,gcc-nm,gcc-ranlib}; do
  mv -f $i ${i}5
done
%endif

Version-Release number of selected component (if applicable):
devtoolset-4-gcc-5.2.1-2.2.el6

How reproducible:
Always.

Steps to Reproduce:
1. Edit gcc.spec, switch `Name:' to `Name: %{?scl_prefix}gcc%{!?scl:5}'
2. rpmbuild -ba gcc.spec
3. Upgrade binutils to 2.23.52.0.1 or up and rpmbuild -ba gcc.spec again

Actual results:
The following line gives `file not found' error:
mv -f %{buildroot}%{_prefix}/%{_lib}/libmpxwrappers.*a $FULLLPATH/

File not found: /root/rpmbuild/BUILDROOT/gcc5-5.2.1-2.2.el6.x86_64/usr/bin/gcov-tool5

Expected results:
Compiled without problem.

Additional info:
Modification of gcc.spec would fix these problems:

1. Rename gcov-tool:
for i in %{buildroot}%{_prefix}/bin/{*gcc,*++,gcov*,gfortran,gcc-ar,gcc-nm,gcc-ranlib}; do
  mv -f $i ${i}5
done

2. BuildRequires: binutils >= 2.23.52.0.1-30

Comment 1 Xiangyang Chen 2015-12-06 06:10:16 UTC
Updated: binutils >= 2.24.51.0.1

Comment 4 Jakub Jelinek 2015-12-08 11:05:51 UTC
Only scl builds of DTS packages are supported, the fact that the spec file has some conditional does not mean that non-scl builds are going to work.
You really can't rely on features of newer binutils in non-scl packages, so if anything, the solution for that would be to disable building of mpx stuff.