0

I have installed an updated gcc compiler suite and binutils on my RHEL6 system. These installations do not interfere with the system versions. However, when I build a static library with rpmbuild (using my upgraded compiler), I get errors when rpmbuild executes strip. It uses the system version, installed in /usr/bin/strip, rather than my updated version. I have verified that if I run strip manually from my updated install, everything is fine. I can reproduce the error by using /usr/bin/strip.

Is there a way to make rpmbuild use my custom binutils rather than the system one?

Fadecomic
  • 1,220
  • 1
  • 10
  • 23
  • You should really be using [SCL](https://www.softwarecollections.org/en/)s which would solve this problem without any hackish stuff. – Aaron D. Marasco Apr 18 '18 at 00:22

1 Answers1

0

You can add

%define __strip /your/binutils/bin/strip
%define __objdump /your/binutils/bin/objdump

to the top of your spec file. I'm not sure if this is the most appropriate way to do this, but it works.

Fadecomic
  • 1,220
  • 1
  • 10
  • 23