Bug 1288703 - binutils with mpx required, gcov-tool not renamed to gcov-tool5 when building without SCL
binutils with mpx required, gcov-tool not renamed to gcov-tool5 when building...
Status: CLOSED NOTABUG
Product: Red Hat Developer Toolset
Classification: Red Hat
Component: gcc (Show other bugs)
DTS 4.0 RHEL 6
x86_64 Linux
unspecified Severity unspecified
: alpha
: 4.1
Assigned To: Jakub Jelinek
Martin Cermak
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-05 05:19 EST by Xiangyang Chen
Modified: 2015-12-08 06:05 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-08 06:05:51 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Xiangyang Chen 2015-12-05 05:19:15 EST
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 01:10:16 EST
Updated: binutils >= 2.24.51.0.1
Comment 4 Jakub Jelinek 2015-12-08 06:05:51 EST
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.

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