Bug 40004 - gcc does not install appropriate plugin headers
Summary: gcc does not install appropriate plugin headers
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-02 07:22 UTC by Brad Hards
Modified: 2009-05-08 07:58 UTC (History)
1 user (show)

See Also:
Host:
Target: x86_64-unknown-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
.i of trivial example (64 bytes, text/plain)
2009-05-02 07:23 UTC, Brad Hards
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brad Hards 2009-05-02 07:22:04 UTC
Writing a plugin requires use of a range of headers (such as gcc-plugin.h) which are not installed. Here is an example:

$ /opt/gccsvn/bin/gcc -v --save-temps  -Dmy_gcc_plugin_EXPORTS -fPIC -o dumb_plugin-orig.c.o   -c dumb_plugin-orig.c
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /home/bradh/devel/gcc-svn/configure --prefix=/opt/gccsvn --enable-plugins : (reconfigured) /home/bradh/devel/gcc-svn/configure --prefix=/opt/gccsvn --enable-plugins : (reconfigured) /home/bradh/devel/gcc-svn/configure --prefix=/opt/gccsvn --enable-plugins : (reconfigured) /home/bradh/devel/gcc-svn/configure --prefix=/opt/gccsvn --enable-plugins
Thread model: posix
gcc version 4.5.0 20090502 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-Dmy_gcc_plugin_EXPORTS' '-fPIC' '-o' 'dumb_plugin-orig.c.o' '-c' '-mtune=generic'
 /opt/gccsvn/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/cc1 -E -quiet -v -Dmy_gcc_plugin_EXPORTS dumb_plugin-orig.c -mtune=generic -fPIC -fpch-preprocess -o dumb_plugin-orig.i
ignoring nonexistent directory "/opt/gccsvn/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /opt/gccsvn/include
 /opt/gccsvn/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/include
 /opt/gccsvn/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/include-fixed
 /usr/include
End of search list.
dumb_plugin-orig.c:1: fatal error: gcc-plugin.h: No such file or directory
compilation terminated.
Comment 1 Brad Hards 2009-05-02 07:23:32 UTC
Created attachment 17791 [details]
.i of trivial example

Source was only one line:
#include "gcc-plugin.h"
Comment 2 jsm-csl@polyomino.org.uk 2009-05-02 09:34:24 UTC
Subject: Re:   New: gcc does not install appropriate plugin
 headers

On Sat, 2 May 2009, bradh at frogmouth dot net wrote:

> Writing a plugin requires use of a range of headers (such as gcc-plugin.h)
> which are not installed. Here is an example:
> 
> $ /opt/gccsvn/bin/gcc -v --save-temps  -Dmy_gcc_plugin_EXPORTS -fPIC -o
> dumb_plugin-orig.c.o   -c dumb_plugin-orig.c

You'd need to use a -I option pointing to the plugin headers install 
directory anyway; they aren't going to be installed in the default search 
path, since they are headers for the host, not the target, and depend on 
the exact GCC configuration, and multiple differently configured copies of 
GCC for different targets can be installed in the same prefix.  But it 
doesn't look like the patch to install plugin headers under 
libsubdir/plugin/include has yet been reviewed/approved.

Comment 3 Brad Hards 2009-05-08 07:58:20 UTC
Looks like the install is now dealing with this.