Bug 715129

Summary: gcc-plugin-devel: Missing gengtype?
Product: [Fedora] Fedora Reporter: Dave Malcolm <dmalcolm>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: jakub
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-17 13:47:23 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 Dave Malcolm 2011-06-21 23:05:47 UTC
Description of problem:
Reading http://gcc.gnu.org/onlinedocs/gccint/Plugins.html it seems that a plugin that wants to add new roots to the GCC garbage collector needs to run gengtype over its source code to process GTY() macros.

This may be PEBKAC (I'm relatively new to GCC), but I don't see gengtype within the payload of the gcc-plugin-devel package.  Does it need to be installed? (or am I looking in the wrong place?)

Version-Release number of selected component (if applicable):
It doesn't seem to be in gcc-plugin-devel-4.6.0-0.15.fc15.x86_64

and doesn't seem to be in the latest Koji build:
  gcc-plugin-devel-4.6.0-10.fc16.i686.rpm
  c.f. http://koji.fedoraproject.org/koji/rpminfo?rpmID=2566444

Additional info:
I might need this for my GCC Python plugin:
  https://fedorahosted.org/gcc-python-plugin/
(not sure yet)

Comment 2 Jakub Jelinek 2011-06-22 06:47:49 UTC
gengtype / gengtype.state just aren't installed upstream nor downstream, see:
http://gcc.gnu.org/ml/gcc/2010-12/msg00087.html
for some details.

Anyway, as I wrote on gcc@, if you don't use GTY(()) markers in the plugin code
and all the additional GC roots you need are embedded inside of python objects you can easily programmatically walk, then you don't need gengtype + gengtype.state at all.

#include "ggc.h"

static void my_walker (void *arg ATTRIBUTE_UNUSED)
{
  /* Ignore argument, as it is dummy */
  /* Walk all the still live python objects here and if they reference
     GCC GC objects, call
  ggc_mark (ptr);
     on each of them.  */
}

static struct ggc_root_tab myroot = { "", 1, 1, my_walker, NULL };

...
init_plugin (...)
{
...
  ggc_register_root_tab (&myroot);
...
}

Comment 3 Dave Malcolm 2012-01-14 11:55:47 UTC
Thanks.  FWIW, I implemented something like this in 
http://git.fedorahosted.org/git/?p=gcc-python-plugin.git;a=commitdiff;h=58d65a1b353220efbcf8d908b0946ef5d1c4fafd

though ggc_mark() seemed to be wrong: it only sets the mark on one object, and doesn't recurse over the unmarked things to which it refers.  In my version, I use gt_ggc_mx_NAME_OF_TYPE() on each wrapped object, which I hope is the correct approach.

Comment 4 Fedora End Of Life 2013-04-03 15:05:13 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 5 Fedora End Of Life 2015-01-09 16:42:01 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Fedora End Of Life 2015-02-17 13:47:23 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.