It took some time, but I used your script without changing anything. The output is attached, but the relevent piece is that the same compile error was given.
[ 38%] Generating G__IO.cxx, ../../lib/libRIO.rootmap
input_line_1:1:10: fatal error: 'new' file not found
#include <new>
^
/bin/sh: line 1: 26859 Segmentation fault (core dumped) ../../bin/rootcling_tmp -f G__IO.cxx -s /tmp/root-build/lib/libRIO.so -rml libRIO.so -rmf /tmp/root-build/lib/libRIO.rootmap -I/tmp/root-6.06.06 -I/tmp/root-build/include TZIPFile.h TVirtualObject.h TVirtualCollectionIterators.h TVirtualArray.h TStreamerInfoActions.h TStreamerInfo.h TMemFile.h TMapFile.h TMakeProject.h TLockFile.h TKeyMapFile.h TKey.h TGenCollectionStreamer.h TGenCollectionProxy.h TFree.h TFilePrefetch.h TFileMerger.h TFileCacheWrite.h TFileCacheRead.h TFile.h TFPBlock.h TEmulatedMapProxy.h TEmulatedCollectionProxy.h TDirectoryFile.h TContainerConverters.h TCollectionProxyFactory.h TBufferFile.h TArchiveFile.h /tmp/root-6.06.06/io/io/inc/LinkDef.h
gmake[2]: *** [io/io/G__IO.cxx] Error 139
gmake[1]: *** [io/io/CMakeFiles/G__IO.dir/all] Error 2
gmake: *** [all] Error 2
scriptout.txt (324 KB)