Bug 1636613

Summary: gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory
Product: [Fedora] Fedora Reporter: Chrit van Ewijk <cvanewijk>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 28CC: aoliva, davejohansen, dmalcolm, fweimer, jakub, jwakely, law, mpolacek, msebor, nickc
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-16 18:59:09 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 Chrit van Ewijk 2018-10-05 20:45:23 UTC
Description of problem:
I want to run the program gp2c-run from the GP/Pari suite.
gp2c translates gp scripts into c programs.
gp2c-run does the same as gp2c but also compiles the c program
But gcc complains ...

[cewijk@localhost Tests]$ gp2c-run zeta.gp
gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory


Version-Release number of selected component (if applicable):

[cewijk@localhost ~]$ gcc --version
gcc (GCC) 8.1.1 20180712 (Red Hat 8.1.1-5)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
gc2c-run does not produce an object file zeta.o

Expected results:
zeta.gp
zeta.gp.c
zeta.o
zeta.gp.run
zeta.gp.so


Additional info: for GP Pari see
https://pari.math.u-bordeaux.fr/

Comment 1 Nick Clifton 2018-10-09 11:45:17 UTC
Hi Chrit,

  The redhat-hardened-cc1 file is part of the redhat-rpm-macros package.
  Please can you check to see if it is installed in your build environment.
  If not, then please install it, and see if this solves the build problem.
  If it does, then it would appear that the gp2c-run program needs to have
  a dependency upon redhat-rpm-macros.

Cheers
  Nick

Comment 2 Marek Polacek 2018-10-16 17:40:54 UTC
Indeed, this is not a GCC bug.

Comment 3 Chrit van Ewijk 2018-10-16 18:55:40 UTC
I cannot install redhat-rpm-macros . 
Maybe it's not in the default repo's?


[cewijk@localhost ~]$ su -
Password: 
[root@localhost ~]# rpm -q redhat-rpm-macros
package redhat-rpm-macros is not installed
[root@localhost ~]# dnf install redhat-rpm-macros
Last metadata expiration check: 0:04:26 ago on Tue 16 Oct 2018 08:40:11 PM CEST.
No match for argument: redhat-rpm-macros
Error: Unable to find a match

Comment 4 Marek Polacek 2018-10-16 18:59:09 UTC
Sorry, the correct name of the package is actually "redhat-rpm-config":

$ rpm -ql redhat-rpm-config | grep hardened
/usr/lib/rpm/redhat/redhat-hardened-cc1
/usr/lib/rpm/redhat/redhat-hardened-ld

Comment 5 Chrit van Ewijk 2018-10-17 09:50:53 UTC
I have installed redhat-rpm-config.

And indeed gcc does not complain any more.

Nick, thanks for your help.

-Chrit