TFile can not store a pythia.event object

Hi all,
Based on PYTHIA8 example main92.cc ( BTW, this code can not compile…), I write a code to store pythia event object.

#include "Pythia8/Pythia.h"
#include<iostream>
#include "TFile.h"
#include "TTree.h"

using namespace Pythia8;

int main() {
    
    Pythia pythia;
    pythia.readString("Beams:frameType=4");
    pythia.readString("Beams:LHEF=/Users/li/work/zhh/pythia/neutrino/data/zhh.lhe");
    pythia.init();
    
    // Set up the ROOT TFile and TTree.
    TFile *f = new TFile("result.root","recreate");
    TTree *t = new TTree("t","pythia event Tree");
    Event *event = &pythia.event;
    t->Branch("event",&event,32000,99);
        
    // Fastjet input
    std::vector <fastjet::PseudoJet> fjInputs;

    
    for (int iEvent = 0; ; ++iEvent)
    {
        if (!pythia.next())
        {
            if (pythia.info.atEndOfFile()) break; // Exit at enf of LHEF.
            continue; // Skip event in case of problem.
        }
        t->Fill();
    }
    t->Write();    
    return 0;
    
}

And I hope I can get a tfile with a tree name t contains pythia events. And then I can read the information( particles in every event, and the particle momentum) from this file. But I find the TFile generated can’t store any objet ( And the file is really small, just 5 kb ) . It only contain a tree( named t) and no branch and no leaf.

In contrast, I tried to store every particle’s px , just do some simple modify, my code really work. So I don’t know why I can’t store a pythia event.

Best,
Li

I think maybe the reason is that I need to do the same compilation as example mian92,

It’s make file is:

[code]main92: $$@.cc $$@.h $$@LinkDef.h $(PREFIX_LIB)/libpythia8.a
ifeq ($(ROOT_USE),true)
export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(ROOT_LIB);
$(ROOT_BIN)rootcint -f $@Dct.cc -c -I$(PREFIX_INCLUDE) $@.h $@LinkDef.h
$(CXX) $@Dct.cc $^ -o $@ -w -I$(ROOT_INCLUDE) $(CXX_COMMON)
-Wl,-rpath,$(ROOT_LIB) $(ROOT_BIN)root-config --glibs
else
@echo "Error: $@ requires ROOT"
endif

[/code]

But when I compile it,

lis-MacBook-Pro:examples li$ make main92 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/Users/li/tools/root5/lib/;\ /Users/li/tools/root5/bin/rootcint -f main92Dct.cc -c -I/Users/li/tools/packages/pythia8/include main92.h main92LinkDef.h Error: cannot open file "stdbool.h" /usr/include/dlfcn.h:41: Error: Too many '}' /usr/include/dlfcn.h:85: /bin/sh: line 1: 1446 Segmentation fault: 11 /Users/li/tools/root5/bin/rootcint -f main92Dct.cc -c -I/Users/li/tools/packages/pythia8/include main92.h main92LinkDef.h make: *** [main92] Error 139

I find there is no “stdbool.h” in /usr/include, I search it and find the most likely one is in :

But I try to add it ( in make file, in make.inc , in ~/.bash_profile …) but no improvement.

Does anyone knows how to solve it? I use ROOT 5 and mac osx 10.11 now.

Which compiler are you using to build pythia and which compiler are you using to build ROOT?

Hi,
I use X code 7.3.1 , and gcc installed by homebrew:

The configure information is:

lis-MacBook-Pro:root5 li$ ./configure --all --disable-vc --with-pythia8-incdir=/Users/li/tools/packages/pythia8/include --with-pythia8-libdir=/Users/li/tools/packages/pythia8/lib
Checking for source directory ... /Users/li/tools/root5
Configuring for macosx64
Checking for Fink/MacPorts directory ... 
Checking for GNU Make version >= 3.80 ... ok
Checking for C compiler ... clang
Checking for C++ compiler ... clang++
Checking for linker (LD) ... clang++
Checking for F77 compiler ... gfortran
Checking whether libc++ is supported ... yes
Checking whether to build native MacOS X Cocoa backend ... yes
Checking for Xcode OSX SDK ... yes
Checking for freetype-config ... not found
Checking whether to build included libfreetype6 ... yes
Checking for pcre-config ... not found
Checking whether to build included libpcre ... yes
Checking for zlib.h ... /usr/include
Checking for libz ... /usr/lib
Checking whether to build included zlib ... no
Checking for lzma.h ... no
Checking for liblzma ... /usr/lib
Checking whether to build included lzma ... yes
Checking for GL/gl.h, or gl.h ... /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Headers
Checking for libGL, or libMesaGL ... /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Libraries
Checking for libGLU, or libMesaGLU ... /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Libraries
Checking for GL/glew.h ... no
Checking for libGLEW ... no
Checking whether to build included GLEW ... yes
Checking for pkg-config ... not found
Checking whether to build included libftgl ... yes
Checking for mysql_config ... not found
Checking for mysql.h ... no
Checking for libmysqlclient_r, libmysqlclient, or mysqlclient ... no
Checking for occi.h ... no
Checking for libclntsh, or oci ... no
Checking for libocci, or oraocci10 ... no
Checking for libpq-fe.h ... no
Checking for libpq ... /usr/lib
Checking for sqlite3.h ... /usr/include
Checking for libsqlite3 ... /usr/lib
Checking for sql.h ... no
Checking for libsqlod ... no
Checking for sqlext.h ... no
Checking for libiodbc, libodbc, or odbc32 ... /usr/lib
Checking for Qt/qglobal.h ... no
Checking for moc or moc.exe ... no
Checking for rfio_api.h ... no
Checking for librfio, libdpm, libcastorrfio, libshift, shiftmd, or shift ... no
Checking for rfio_api.h ... no
Checking for stager_api.h ... no
Checking for libcastorrfio, libshift, shiftmd, or shift ... no
Checking for gfal_api.h ... no
Checking for libgfal ... no
Checking for gfal_srm_ifce_types.h ... no
Checking for ApMon.h ... no
Checking for libapmoncpp ... no
Checking for fftw3.h ... no
Checking for libfftw3, or libfftw3-3 ... no
Checking for fitsio.h ... no
Checking for libcfitsio, or cfitsio ... no
Checking for gvc.h ... no
Checking for libgvc, or gvc ... no
Checking for libgraph, graph, libcgraph, or cgraph ... no
Checking for libcdt, or cdt ... no
Checking for libpathplan, or pathplan ... no
Checking for libexpat, or expat ... /usr/lib
Checking for libgvplugin_dot_layout, or gvplugin_dot_layout ... no
Checking for libPythia6 ... no
Checking for Pythia8/Pythia.h ... /Users/li/tools/packages/pythia8/include
Checking for libpythia8 ... /Users/li/tools/packages/pythia8/lib
Checking for dcap.h ... no
Checking for libdcap ... no
Checking for davix.hpp ... no
Checking for libdavix ... no
Checking for chirp_reli.h ... no
Checking for libchirp_client ... no
Checking for hdfs.h ... no
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
Checking for jni.h ... no
Checking for libhdfs ... no
Checking for libjvm ... no
Checking for libglite-api-wrapper ... no
Checking for gapiUI.h ... no
Checking for libgapiUI ... no
Checking whether to build included libAfterImage ... yes
Checking for ldap.h ... /usr/include
Checking for libldap ... /usr/lib
Checking for liblber ... /usr/lib
Checking for Python.h ... /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/include/python2.7
Checking for python2.7, libpython2.7, libpython, python, or Python ... /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib
Checking for ruby.h ... /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0
Checking for ruby/config.h ... /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15
Checking for libruby.2.0.0.dylib ... /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Checking for xml2-config ... /usr/bin/xml2-config
Checking for libxml2 version >= 2.4.x ... ok
Checking for XrdVersion.hh ... no
Checking for libssl ... /usr/lib
Checking for libcrypto ... /usr/lib
Checking for openssl/bio.h ... no
Checking for t_server.h ... no
Checking for libsrp ... no
Checking for libgmp ... /usr/local/lib
Checking for libmisc ... no
Checking for pwauth.h ... no
Checking for krb5.h ... /usr/include
Checking for krb5.h redirect ... /usr/include/krb5/krb5.h
Checking for krb5_c_valid_cksumtype in krb5.h ... yes
Checking for valid_cksumtype in krb5.h ... no
Checking for libk5crypto ... /usr/lib
Checking whether we're using MIT Kerberos ... yes
Checking for krb5_c_valid_cksumtype in /usr/lib/libk5crypto.dylib ... ok
Checking for valid_cksumtype in /usr/lib/libk5crypto.dylib ... ok
Checking for libkrb5 ... /usr/lib
Checking for kinit ... /usr/bin/kinit
Checking for libcom_err ... /usr/lib
Checking for shadow passwords ... no
Checking for gsl/gsl_version.h ... no
Checking for gsl-config ... not found
Checking whether to build libMathMore ... no
Checking whether to build libGenVector ... yes
Checking whether to build libCintex ... yes
Checking whether to build libReflex ... yes
Checking whether to build libRooFit ... yes
Checking whether to build libMinuit2 ... yes
Checking whether to build libUnuran ... yes
Checking whether to build libVc ... no
Checking whether to install VDT ... yes
Checking whether to build libGdml ... yes
Checking whether to build libTable ... yes
Checking whether to build libTMVA ... yes
Checking whether to build libRHTTP ... yes
Checking for fcgiapp.h ... no
Checking for libfcgi ... no
Checking whether to build libMemStat ... yes
Checking whether to build afdsmgrd ... no
Checking whether to integrate experimental cling ... no 
Checking what type of dictionaries to build ... cint
Writing config/Makefile.config ... done
Writing config/Makefile.comp ... done
Writing include/RConfigure.h ... done
Writing include/RConfigOptions.h ... done
Writing bin/root-config ... done
Writing etc/system.rootrc ... done
Writing etc/system.rootauthrc ... done
Writing etc/system.rootdaemonrc ... done
Writing etc/root.mimes ... done
Writing etc/daemons/rootd.rc.d ... done
Writing etc/daemons/rootd.xinetd ... done
Writing etc/daemons/proofd.rc.d ... done
Writing etc/daemons/proofd.xinetd ... done
Writing main/src/proofserv.sh ... done
Writing main/src/roots.sh ... done
Writing bin/memprobe ... done
Writing build/misc/root-help.el ... done
Writing macros/html.C ... done
Writing bin/thisroot.sh ... done
Writing bin/thisroot.csh ... done
Writing bin/setxrd.sh ... done
Writing bin/setxrd.csh ... done
Writing bin/genreflex ... done
Writing bin/genreflex-rootcint ... done
Writing config.status ... done

Enabled support for asimage, astiff, bonjour, builtin_afterimage, builtin_ftgl, builtin_freetype, builtin_glew, builtin_pcre, builtin_lzma, libcxx, cintex, cocoa, explicitlink, fink, gdml, genvector, http, krb5, ldap, memstat, minuit2, opengl, pythia8, python, reflex, roofit, ruby, rpath, shared, sqlite, table, tmva, unuran, vdt, xml.

To build ROOT type:

   make 

lis-MacBook-Pro:root5 li$ make -j4

For pythia8,

[code]lis-MacBook-Pro:pythia8219 li$ ./configure --prefix=/Users/li/tools/packages/pythia8 --with-fastjet3=/Users/li/tools/packages/fastjet --with-fastjet3-include=/Users/li/tools/packages/fastjet/include/ --with-fastjet3-lib=/Users/li/tools/packages/fastjet/lib/ --with-hepmc2=/Users/li/tools/packages/hepmc/ --with-hepmc2-include=/Users/li/tools/packages/hepmc/include/ --with-hepmc2-lib=/Users/li/tools/packages/hepmc/lib/ --enable-shared --with-root=/Users/li/tools/root5/ --with-root-include=/Users/li/tools/root5/include/ --with-root-lib=/Users/li/tools/root5/lib/ --with-root-bin=/Users/li/tools/root5/bin/

PYTHIA Configuration Summary

Configured for DARWIN with the following options:
–enable-shared

The following optional external packages will be used:

  • FASTJET3

  • HEPMC2

  • ROOT
    [/code]

    And the gcc and gfortran version is:

lis-MacBook-Pro:~ li$ gcc -v Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 7.3.0 (clang-703.0.31) Target: x86_64-apple-darwin15.4.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

lis-MacBook-Pro:~ li$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/5.3.0/libexec/gcc/x86_64-apple-darwin15.0.0/5.3.0/lto-wrapper
Target: x86_64-apple-darwin15.0.0
Configured with: ../configure --build=x86_64-apple-darwin15.0.0 --prefix=/usr/local/Cellar/gcc/5.3.0 --libdir=/usr/local/Cellar/gcc/5.3.0/lib/gcc/5 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-5 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --with-build-config=bootstrap-debug --disable-werror --with-pkgversion='Homebrew gcc 5.3.0' --with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin --disable-nls --enable-multilib
Thread model: posix
gcc version 5.3.0 (Homebrew gcc 5.3.0) 

I am not sure about the compile because I never learn it. But I just use X code 7.3.1 and gcc installed in home brew, will the problem is that ROOT used X code’s gcc while pythia use another one ?

Best,
Li

Hi,

For ROOT you are actually using clang to compile (and the c++ library 4.2.1)

The gfortran you have is version 5.3 which is not compatible with clang …

You can try to use the configure option of ROOT to redirect to use the gcc coming from Homebrew (–with- gcc-toolchain).

Cheers,
Philippe.

[quote=“pcanal”]Hi,

For ROOT you are actually using clang to compile (and the c++ library 4.2.1)

The gfortran you have is version 5.3 which is not compatible with clang …

You can try to use the configure option of ROOT to redirect to use the gcc coming from Homebrew (–with- gcc-toolchain).

Cheers,
Philippe.[/quote]

Hi,
With it,

And I see that the options are:

lis-MacBook-Pro:root5 li$ ./configure --with-gcc-toolchain Checking for source directory ... /Users/li/tools/root5 Configuring for macosx64 Invalid option '--with-gcc-toolchain'. Try ./configure --help

[code]with compiler options, prefix with --with-, overrides default value

cc alternative C compiler and options to be used
cxx alternative C++ compiler and options to be used
f77 alternative Fortran compiler and options to be used
ld alternative Linker and options to be used
clang use clang compiler instead of gcc (mutual exclusive with
the cc, cxx and ld options)
[/code]

Best,
Li

[code]with compiler options, prefix with --with-, overrides default value

cc alternative C compiler and options to be used
cxx alternative C++ compiler and options to be used
f77 alternative Fortran compiler and options to be used
ld alternative Linker and options to be used
gcc-toolchain directory where gcc is installed (needed for compilation
of clang/LLVM in case not the default gcc is used)
clang use clang compiler instead of gcc (mutual exclusive with
the cc, cxx and ld options)
python alternative python interpreter to be used
[/code]
so either --with-cxx=path_to_g++_executable and/or --with-gcc-toolchain=path_to_gcc_installaton.

[quote=“pcanal”][code]with compiler options, prefix with --with-, overrides default value

cc alternative C compiler and options to be used
cxx alternative C++ compiler and options to be used
f77 alternative Fortran compiler and options to be used
ld alternative Linker and options to be used
gcc-toolchain directory where gcc is installed (needed for compilation
of clang/LLVM in case not the default gcc is used)
clang use clang compiler instead of gcc (mutual exclusive with
the cc, cxx and ld options)
python alternative python interpreter to be used
[/code]
so either --with-cxx=path_to_g++_executable and/or --with-gcc-toolchain=path_to_gcc_installaton.[/quote]

Hi,
Since I have no option --with-gcc-toolchain. I use --with-cxx to do configure.

First, my brew installed gcc is in:

lis-MacBook-Pro:root5 li$ gfortran -v Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/5.3.0/libexec/gcc/x86_64-apple-darwin15.0.0/5.3.0/lto-wrapper Target: x86_64-apple-darwin15.0.0 Configured with: ../configure --build=x86_64-apple-darwin15.0.0 --prefix=/usr/local/Cellar/gcc/5.3.0 --libdir=/usr/local/Cellar/gcc/5.3.0/lib/gcc/5 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-5 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --with-build-config=bootstrap-debug --disable-werror --with-pkgversion='Homebrew gcc 5.3.0' --with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin --disable-nls --enable-multilib Thread model: posix gcc version 5.3.0 (Homebrew gcc 5.3.0)

So I use command to configure:

lis-MacBook-Pro:root5 li$ ./configure --with-cxx=/usr/local/Cellar/gcc/5.3.0/bin/gcc-5

the configure information is:

[code]lis-MacBook-Pro:root5 li$ ./configure --with-cxx=/usr/local/Cellar/gcc/5.3.0/bin/gcc-5
Checking for source directory … /Users/li/tools/root5
Configuring for macosx64
Checking for Fink/MacPorts directory …
Checking for GNU Make version >= 3.80 … ok
Checking for C compiler … clang
Checking for C++ compiler … /usr/local/Cellar/gcc/5.3.0/bin/gcc-5
Checking for linker (LD) … clang++
Checking for F77 compiler … gfortran
Checking whether to build native MacOS X Cocoa backend … yes
Checking for Xcode OSX SDK … yes
Checking for freetype-config … not found
Checking whether to build included libfreetype6 … yes
Checking for pcre-config … not found
Checking whether to build included libpcre … yes
Checking for zlib.h … /usr/include
Checking for libz … /usr/lib
Checking whether to build included zlib … no
Checking for lzma.h … no
Checking for liblzma … /usr/lib
Checking whether to build included lzma … yes
Checking for GL/gl.h, or gl.h … /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Headers
Checking for libGL, or libMesaGL … /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Libraries
Checking for libGLU, or libMesaGLU … /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Libraries
Checking for GL/glew.h … no
Checking for libGLEW … no
Checking whether to build included GLEW … yes
Checking for pkg-config … not found
Checking whether to build included libftgl … yes
Checking for mysql_config … not found
Checking for mysql.h … no
Checking for libmysqlclient_r, libmysqlclient, or mysqlclient … no
Checking for occi.h … no
Checking for libclntsh, or oci … no
Checking for libocci, or oraocci10 … no
Checking for libpq-fe.h … no
Checking for libpq … /usr/lib
Checking for sqlite3.h … /usr/include
Checking for libsqlite3 … /usr/lib
Checking for sql.h … no
Checking for libsqlod … no
Checking for sqlext.h … no
Checking for libiodbc, libodbc, or odbc32 … /usr/lib
Checking for rfio_api.h … no
Checking for librfio, libdpm, libcastorrfio, libshift, shiftmd, or shift … no
Checking for rfio_api.h … no
Checking for stager_api.h … no
Checking for libcastorrfio, libshift, shiftmd, or shift … no
Checking for gfal_api.h … no
Checking for libgfal … no
Checking for gfal_srm_ifce_types.h … no
Checking for ApMon.h … no
Checking for libapmoncpp … no
Checking for fftw3.h … no
Checking for libfftw3, or libfftw3-3 … no
Checking for fitsio.h … no
Checking for libcfitsio, or cfitsio … no
Checking for gvc.h … no
Checking for libgvc, or gvc … no
Checking for libgraph, graph, libcgraph, or cgraph … no
Checking for libcdt, or cdt … no
Checking for libpathplan, or pathplan … no
Checking for libexpat, or expat … /usr/lib
Checking for libgvplugin_dot_layout, or gvplugin_dot_layout … no
Checking for libPythia6 … no
Checking for Pythia8/Pythia.h … /Users/li/tools/packages/pythia8/include
Checking for libpythia8 … no
Checking for dcap.h … no
Checking for libdcap … no
Checking for davix.hpp … no
Checking for libdavix … no
Checking for chirp_reli.h … no
Checking for libchirp_client … no
Checking for hdfs.h … no
Unable to find any JVMs matching version “(null)”.
No Java runtime present, try --request to install.
Checking for jni.h … no
Checking for libhdfs … no
Checking for libjvm … no
Checking for libglite-api-wrapper … no
Checking for gapiUI.h … no
Checking for libgapiUI … no
Checking whether to build included libAfterImage … yes
Checking for ldap.h … /usr/include
Checking for libldap … /usr/lib
Checking for liblber … /usr/lib
Checking for Python.h … /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/include/python2.7
Checking for python2.7, libpython2.7, libpython, python, or Python … /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib
Checking for xml2-config … /usr/bin/xml2-config
Checking for libxml2 version >= 2.4.x … ok
Checking for XrdVersion.hh … no
Checking for libssl … /usr/lib
Checking for libcrypto … /usr/lib
Checking for openssl/bio.h … no
Checking for t_server.h … no
Checking for libsrp … no
Checking for libgmp … /usr/local/lib
Checking for libmisc … no
Checking for pwauth.h … no
Checking for krb5.h … /usr/include
Checking for krb5.h redirect … /usr/include/krb5/krb5.h
Checking for krb5_c_valid_cksumtype in krb5.h … yes
Checking for valid_cksumtype in krb5.h … no
Checking for libk5crypto … /usr/lib
Checking whether we’re using MIT Kerberos … yes
Checking for krb5_c_valid_cksumtype in /usr/lib/libk5crypto.dylib … ok
Checking for valid_cksumtype in /usr/lib/libk5crypto.dylib … ok
Checking for libkrb5 … /usr/lib
Checking for kinit … /usr/bin/kinit
Checking for libcom_err … /usr/lib
Checking for shadow passwords … no
Checking for gsl/gsl_version.h … no
Checking for gsl-config … not found
Checking whether to build libMathMore … no
Checking whether to build libGenVector … yes
Checking whether to build libCintex … yes
Checking whether to build libReflex … yes
Checking whether to build libRooFit … no
Checking whether to build libMinuit2 … no
Checking whether to build libUnuran … no
Checking whether to build libVc … no
Checking whether to install VDT … yes
Checking whether to build libGdml … no
Checking whether to build libTable … no
Checking whether to build libTMVA … yes
Checking whether to build libRHTTP … no
Checking whether to build libMemStat … yes
Checking whether to build afdsmgrd … no
Checking whether to integrate experimental cling … no
Checking what type of dictionaries to build … cint
Writing config/Makefile.config … done
Writing config/Makefile.comp … done
Writing include/RConfigure.h … done
Writing include/RConfigOptions.h … done
Writing bin/root-config … done
Writing etc/system.rootrc … done
Writing etc/system.rootauthrc … done
Writing etc/system.rootdaemonrc … done
Writing etc/root.mimes … done
Writing etc/daemons/rootd.rc.d … done
Writing etc/daemons/rootd.xinetd … done
Writing etc/daemons/proofd.rc.d … done
Writing etc/daemons/proofd.xinetd … done
Writing main/src/proofserv.sh … done
Writing main/src/roots.sh … done
Writing bin/memprobe … done
Writing build/misc/root-help.el … done
Writing macros/html.C … done
Writing bin/thisroot.sh … done
Writing bin/thisroot.csh … done
Writing bin/setxrd.sh … done
Writing bin/setxrd.csh … done
Writing bin/genreflex … done
Writing bin/genreflex-rootcint … done
Writing config.status … done

Enabled support for asimage, astiff, bonjour, builtin_afterimage, builtin_ftgl, builtin_freetype, builtin_glew, builtin_pcre, builtin_lzma, cintex, cocoa, explicitlink, fink, genvector, krb5, ldap, memstat, opengl, python, reflex, rpath, shared, sqlite, tmva, vdt, xml.

To build ROOT type:

make

lis-MacBook-Pro:root5 li$
[/code]

And the make information is:

lis-MacBook-Pro:root5 li$ make -j4 bin/rmkdepend -R -fcore/base/src/TROOT.d -Y -w 1000 -- -m64 -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -pthread -D__cplusplus -- /Users/li/tools/root5/core/base/src/TROOT.cxx /usr/local/Cellar/gcc/5.3.0/bin/gcc-5 -O2 -m64 -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -pthread -o core/base/src/TROOT.o -c /Users/li/tools/root5/core/base/src/TROOT.cxx bin/rmkdepend -R -fcore/macosx/src/TMacOSXSystem.d -Y -w 1000 -- -m64 -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -pthread -DNDEBUG -D__cplusplus -- /Users/li/tools/root5/core/macosx/src/TMacOSXSystem.mm /usr/local/Cellar/gcc/5.3.0/bin/gcc-5 -O2 -m64 -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -pthread -DNDEBUG -ObjC++ -o core/macosx/src/TMacOSXSystem.o -c /Users/li/tools/root5/core/macosx/src/TMacOSXSystem.mm bin/rmkdepend -R -fcore/thread/src/TCondition.d -Y -w 1000 -- -m64 -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -pthread -D__cplusplus -- /Users/li/tools/root5/core/thread/src/TCondition.cxx /usr/local/Cellar/gcc/5.3.0/bin/gcc-5 -O2 -m64 -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -pthread -o core/thread/src/TCondition.o -c /Users/li/tools/root5/core/thread/src/TCondition.cxx cc1objplus: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast' bin/rmkdepend -R -fcore/thread/src/TMutex.d -Y -w 1000 -- -m64 -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -pthread -D__cplusplus -- /Users/li/tools/root5/core/thread/src/TMutex.cxx /usr/local/Cellar/gcc/5.3.0/bin/gcc-5 -O2 -m64 -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -pthread -o core/thread/src/TMutex.o -c /Users/li/tools/root5/core/thread/src/TMutex.cxx make: *** [core/macosx/src/TMacOSXSystem.o] Error 1 make: *** Waiting for unfinished jobs.... lis-MacBook-Pro:root5 li$

Should I provide more information in configuration?

Best,
Li

With the help of Philip Ilten, I finally get rid of this problem. And he is willing to share the answer.

Please instead “configure” in PYTHIA folder, and “main92LinkDef.h” and “Makefile” in PYTHIA/example folder.(they are in attachments) Change the “dlfcn.h” inclusion to the following in PythiaStdlib.h .

// Stdlib header file for dynamic library loading. #ifndef __CINT__ #define dlsym __ #include <dlfcn.h> #undef dlsym #endif

In this way, one can solve installation with ROOT 5 or/and ROOT 6 . And the problem of running example main92. This work well in my osx 10.11.
Archive.zip (9.52 KB)