[pypy-issue] [issue1576] cppyy: Need newer genreflex

Alex Stewart tracker at bugs.pypy.org
Fri Aug 2 20:12:55 CEST 2013

New submission from Alex Stewart <foogod at gmail.com>:

The version of reflex distributed as http://cern.ch/wlav/reflex-2013-04-
23.tar.bz2 (referenced from http://doc.pypy.org/en/latest/cppyy.html) has a bug 
in genreflex which does not correctly generate cpp files when classes contain 
union members.

This bug appears to have been fixed in the Reflex found as part of the latest 
ROOT distribution (5.34/09), so it is possible to use genreflex from the full 
ROOT package instead, however:

1) Downloading and building ROOT properly (with Reflex enabled) is more 
complicated, and it doesn't appear to be designed to be installed anywhere other 
than in its own source directory (i.e. 'make install' does not put things in the 
right places to actually run)

2) The ROOT version does not build libcppyy_backend, so it is necessary to 
download and build both reflex-2013-04-23.tar.bz2 and ROOT, and then use an ugly 
combination of both to get things to both build and run on the same host.

The workaround I have currently come up with is to build/install reflex-2013-04-
23.tar.bz2 (in /usr/local), build ROOT (in its own $ROOTSYS dir), and then:

rm -rf /usr/local/lib/python2.7/dist-packages/Reflex
cp -a $ROOTSYS/lib/python/genreflex/ /usr/local/lib/python2.7/dist-

(This is obviously an ugly hack, however, and I'm a little bit uneasy about 
generating source with a version of genreflex which is different than the 
version of libReflex it's designed to link against (though it seems to work so 

It's unclear how the current standalone reflex .tar.bz2 was generated, but would 
it be possible to create a new one based off of the ROOT 5.34 version to fix 
this issue?

messages: 6026
nosy: Foogod, pypy-issue
priority: bug
release: 2.0
status: unread
title: cppyy: Need newer genreflex

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list