Bug 787345

Summary: lto plugin adds unnecessary gcc dependency to cpp
Product: [Fedora] Fedora Reporter: Mitch Davis <mjd+redhat>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 16CC: jakub, stadtkind2
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-07 07:39:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Mitch Davis 2012-02-04 09:10:32 UTC
Description of problem:

I want to use cpp to do some text substitution.  I don't want gcc installed (public facing server).  If cpp is used when the gcc package is not installed, cpp barfs with an LTO shared lib error message:

This is on an f16 machine with gcc installed:

[mjd@xiaomao ~]$ cat /etc/redhat-release 
Fedora release 16 (Verne)
[mjd@xiaomao]$ rpm -q cpp gcc
cpp-4.6.2-1.fc16.x86_64
gcc-4.6.2-1.fc16.x86_64
[mjd@xiaomao ~]$ rpm -V cpp
[mjd@xiaomao ~]$ echo | cpp
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "<stdin>"

This is on a machine that does not have gcc installed:

[mjd@example ~]$ cat /etc/redhat-release 
Fedora release 15 (Lovelock)
[mjd@example]$ rpm -q cpp gcc
cpp-4.6.1-9.fc15.i686
package gcc is not installed
[mjd@example ~]$ rpm -V cpp
[mjd@example ~]$ echo | cpp
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "<stdin>"
cpp: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found
compilation terminated.
[mjd@example ~]$ logout

(The return code was 4, which breaks makefiles and stuff)

This problem occurs in both F15 and F16.

How reproducible:

  Every time, just run "echo | cpp"

Actual results:

  See above (f15 machine)

Expected results:

  See above (f16 machine)

Additional info:

  This bug has already been fixed in debian:

    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=639531

  Their fix was to move LTO from gcc to cpp.

Comment 1 Mitch Davis 2012-02-07 03:01:09 UTC
Jakub, is there any additional info I need to provide for this?  Thanks.

Comment 2 Jakub Jelinek 2012-02-07 07:39:47 UTC
Worked around in cpp-4.7.0-0.11.fc17 in rawhide, will see if the lto plugin dependency for -E/-S/-c compilation can't be avoided in the driver instead.

Comment 3 David Cantrell 2012-03-29 20:11:07 UTC
*** Bug 799594 has been marked as a duplicate of this bug. ***