diff --git a/.gitignore b/.gitignore index 405be427931b2..76a19ee71efb4 100644 --- a/.gitignore +++ b/.gitignore @@ -77,7 +77,7 @@ core/base/src/RGitCommit.h /core/metautils/src/stlLoader_complex.cc # /core/pcre/src/ -/core/pcre/src/pcre-7.8 +/core/pcre/src/pcre-8.37 # /core/utils/src/ /core/utils/src/rootcint_tmp @@ -158,7 +158,7 @@ core/base/src/RGitCommit.h /graf2d/asimage/src/libAfterImage/libAfterImage.a # /graf2d/freetype/src/ -/graf2d/freetype/src/freetype-2.3.12 +/graf2d/freetype/src/freetype-2.6.1 # /graf2d/qt/src/ /graf2d/qt/src/moc_*.cxx diff --git a/CMakeLists.txt b/CMakeLists.txt index 13e51e16a37f1..e5a844fec257b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -193,6 +193,11 @@ get_property(__clingetcpch GLOBAL PROPERTY CLINGETCPCH) string(REGEX REPLACE "[ ]-" ";-" CMAKE_CXX_FLAGS_SEPARATE ${CMAKE_CXX_FLAGS}) +if(cxxmodules) + # rootcling doesn't know what to do with these flags. + # FIXME: Disable until until somebody teaches it. + string(REPLACE "${ROOT_CXXMODULES_FLAGS}" "" CMAKE_CXX_FLAGS_SEPARATE ${CMAKE_CXX_FLAGS_SEPARATE}) +endif(cxxmodules) add_custom_command(OUTPUT etc/dictpch/allLinkDefs.h etc/dictpch/allHeaders.h etc/dictpch/allCppflags.txt @@ -212,20 +217,28 @@ add_dependencies(onepcm ${__allTargets}) install(FILES ${CMAKE_BINARY_DIR}/etc/allDict.cxx.pch DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}) install(DIRECTORY ${CMAKE_BINARY_DIR}/etc/dictpch DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}) +#---CXX MODULES----------------------------------------------------------------------------------- +if(cxxmodules) + add_custom_target(copymodulemap ALL DEPENDS build/unix/module.modulemap) + add_custom_command(TARGET copymodulemap PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/build/unix/module.modulemap ${CMAKE_BINARY_DIR}/include/module.modulemap + ) +endif(cxxmodules) + #---hsimple.root---------(use the executable for clearer dependencies and proper return code)--- if(NOT gnuinstall) # TODO hsimple.root for gnuinstall add_custom_target(hsimple ALL DEPENDS tutorials/hsimple.root) add_dependencies(hsimple onepcm) - ROOT_EXECUTABLE(hsimple.exe test/hsimple.cxx NOINSTALL LIBRARIES RIO Tree Hist) if(WIN32) add_custom_command(OUTPUT tutorials/hsimple.root - COMMAND set PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} && $ - WORKING_DIRECTORY tutorials DEPENDS Cling) + COMMAND set PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} && + $ -l -q -b -n -x hsimple.C -e return + WORKING_DIRECTORY tutorials DEPENDS root.exe Cling Hist Tree Gpad Graf HistPainter) else() add_custom_command(OUTPUT tutorials/hsimple.root - COMMAND ${ld_library_path}=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}:$ENV{${ld_library_path}} - $ - WORKING_DIRECTORY tutorials DEPENDS Cling) + COMMAND ${ld_library_path}=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}:$ENV{${ld_library_path}} + $ -l -q -b -n -x hsimple.C -e return + WORKING_DIRECTORY tutorials DEPENDS root.exe Cling Hist Tree Gpad Graf HistPainter) endif() install(FILES ${CMAKE_BINARY_DIR}/tutorials/hsimple.root DESTINATION ${CMAKE_INSTALL_TUTDIR} COMPONENT tests) endif() diff --git a/Makefile b/Makefile index da11341521c9e..85a524b2dbc4c 100644 --- a/Makefile +++ b/Makefile @@ -115,8 +115,11 @@ SYSTEMDICTH = -DSYSTEM_TYPE_unix $(SYSTEMDH) SYSTEML = $(UNIXL) SYSTEMO = $(UNIXO) SYSTEMDO = $(UNIXDO) -endif -endif +ifeq ($(PLATFORM),macosx) +CORELIBEXTRA += -F /System/Library/PrivateFrameworks -framework CoreSymbolication +endif # macos +endif # not win32gcc +endif # not win32 ifeq ($(BUILDCOCOA),yes) MODULES += core/macosx @@ -224,6 +227,7 @@ MODULES += graf2d/gviz endif ifeq ($(BUILDPYTHON),yes) MODULES += bindings/pyroot +MODULES += main/python endif ifeq ($(BUILDRUBY),yes) MODULES += bindings/ruby @@ -328,14 +332,15 @@ MODULES += core/unix core/winnt graf2d/x11 graf2d/x11ttf \ graf2d/qt gui/qtroot gui/qtgsi net/netx net/netxng net/alien \ proof/proofd proof/proofx proof/pq2 graf3d/x3d net/davix \ sql/oracle io/xmlparser math/mathmore \ - tmva/tmva tmva/tmvagui math/genetic io/hdfs graf2d/fitsio roofit/roofitcore \ + tmva/tmva tmva/tmvagui math/genetic io/hdfs graf2d/fitsio \ + roofit/roofitcore \ roofit/roofit roofit/roostats roofit/histfactory \ math/minuit2 net/monalisa math/fftw sql/odbc math/unuran \ geom/geocad geom/gdml graf3d/eve net/glite misc/memstat \ math/genvector net/bonjour graf3d/gviz3d graf2d/gviz \ proof/proofbench proof/afdsmgrd graf2d/ios \ graf2d/quartz graf2d/cocoa core/macosx math/vc math/vdt \ - net/http bindings/r + net/http bindings/r main/python MODULES := $(sort $(MODULES)) # removes duplicates endif @@ -546,6 +551,9 @@ endif ifeq ($(BUILDCOCOA),yes) STATICEXTRALIBS += -framework Cocoa -framework OpenGL endif +ifeq ($(PLATFORM),macosx) +STATICEXTRALIBS += -F /System/Library/PrivateFrameworks -framework CoreSymbolication +endif ##### libCore ##### @@ -589,9 +597,16 @@ MAINLIBS = endif ##### all ##### +ALLHDRS := +ifeq ($(CXXMODULES),yes) +# Copy the modulemap in $ROOTSYS/include first. +ALLHDRS := include/module.modulemap +ROOT_CXXMODULES_FLAGS = -fmodules -fmodule-map-file=$(ROOT_OBJDIR)/include/module.modulemap -fmodules-cache-path=$(ROOT_OBJDIR)/include/pcms/ +CXXFLAGS += $(ROOT_CXXMODULES_FLAGS) +CFLAGS += $(ROOT_CXXMODULES_FLAGS) +endif + -# Copy the modulemap in the right place first. -ALLHDRS := include/module.modulemap ALLLIBS := $(CORELIB) ALLMAPS := $(COREMAP) ALLEXECS := @@ -803,13 +818,15 @@ endif $(COMPILEDATA): $(ROOT_SRCDIR)/config/Makefile.$(ARCH) config/Makefile.comp Makefile \ $(MAKECOMPDATA) $(wildcard MyRules.mk) $(wildcard MyConfig.mk) $(wildcard MyModules.mk) @$(MAKECOMPDATA) $(COMPILEDATA) "$(CXX)" "$(OPTFLAGS)" "$(DEBUGFLAGS)" \ - "$(filter-out -fmodules,$(CXXFLAGS))" "$(SOFLAGS)" "$(LDFLAGS)" "$(SOEXT)" "$(SYSLIBS)" \ + "$(CXXFLAGS)" "$(SOFLAGS)" "$(LDFLAGS)" "$(SOEXT)" "$(SYSLIBS)" \ "$(LIBDIR)" "$(BOOTLIBS)" "$(RINTLIBS)" "$(INCDIR)" \ "$(MAKESHAREDLIB)" "$(MAKEEXE)" "$(ARCH)" "$(ROOTBUILD)" \ "$(EXPLICITLINK)" +ifeq ($(CXXMODULES),yes) include/module.modulemap: $(ROOT_SRCDIR)/build/unix/module.modulemap cp $< $@ +endif # We rebuild GITCOMMITH only when we would re-link libCore anyway. # Thus it depends on all dependencies of libCore (minus TROOT.o @@ -1081,7 +1098,7 @@ maintainer-clean:: distclean @rm -rf bin lib include htmldoc system.rootrc config/Makefile.config \ config/Makefile.comp $(ROOTRC) etc/system.rootauthrc \ etc/system.rootdaemonrc etc/root.mimes etc/daemons/rootd.rc.d \ - etc/daemons/rootd.xinetd etc/daemons/proofd.rc.d \ + etc/daemons/rootd.xinetd etc/daemons/proofd.rc.d etc/cling \ etc/daemons/proofd.xinetd main/src/proofserv.sh main/src/roots.sh \ macros/html.C \ build/misc/root-help.el build-arch-stamp build-indep-stamp \ @@ -1114,9 +1131,15 @@ changelog: releasenotes: @$(MAKERELNOTES) +ROOTCLING_CXXFLAGS := $(CXXFLAGS) +# rootcling doesn't know what to do with these flags. +# FIXME: Disable until until somebody teaches it. +ifeq ($(CXXMODULES),yes) +ROOTCLING_CXXFLAGS := $(filter-out $(ROOT_CXXMODULES_FLAGS),$(CXXFLAGS)) +endif $(ROOTPCH): $(MAKEPCH) $(ROOTCLINGSTAGE1DEP) $(ALLHDRS) $(CLINGETCPCH) $(ORDER_) $(ALLLIBS) - @$(MAKEPCHINPUT) $(ROOT_SRCDIR) "$(MODULES)" $(CLINGETCPCH) -- $(CXXFLAGS) + @$(MAKEPCHINPUT) $(ROOT_SRCDIR) "$(MODULES)" $(CLINGETCPCH) -- $(ROOTCLING_CXXFLAGS) @$(MAKEPCH) $@ $(MAKEPCH): $(ROOT_SRCDIR)/$(MAKEPCH) @@ -1223,7 +1246,7 @@ install: all echo "Installing GDML conversion scripts in $(DESTDIR)$(LIBDIR)"; \ $(INSTALLDATA) $(ROOT_SRCDIR)/geom/gdml/*.py $(DESTDIR)$(LIBDIR); \ (cd $(DESTDIR)$(TUTDIR); \ - LD_LIBRARY_PATH=$(DESTDIR)$(LIBDIR):$$LD_LIBRARY_PATH && ! $(DESTDIR)$(BINDIR)/root -l -b -q -n -x hsimple.C); \ + ! LD_LIBRARY_PATH=$(DESTDIR)$(LIBDIR):$$LD_LIBRARY_PATH $(DESTDIR)$(BINDIR)/root -l -b -q -n -x hsimple.C); \ fi uninstall: @@ -1439,6 +1462,7 @@ showbuild: @echo "PYTHONLIBDIR = $(PYTHONLIBDIR)" @echo "PYTHONLIB = $(PYTHONLIB)" @echo "PYTHONINCDIR = $(PYTHONINCDIR)" + @echo "PYTHONEXE = $(PYTHONEXE)" @echo "RUBYLIBDIR = $(RUBYLIBDIR)" @echo "RUBYLIB = $(RUBYLIB)" @echo "RUBYINCDIR = $(RUBYINCDIR)" diff --git a/README/CREDITS b/README/CREDITS index c54ebcff5bfeb..0735977d473c2 100644 --- a/README/CREDITS +++ b/README/CREDITS @@ -335,6 +335,10 @@ N: Mary-Louise Gill E: m.l.gill+cern@gmail.com D: editline terminal interface +N: Enrico Guiraud +E: enrico.guiraud@gmail.com +D: author of the multiproc module + N: Thorsten Glebe E: T.Glebe@mpi-hd.mpg.de D: Original author of the Smatrix package @@ -423,6 +427,10 @@ D: contributions to the build system (configure, Makefile.in, config.in) D: implementation of the principal component analysis class TPrincipal D: debian and redhat packaging scripts, port to GNU/Hurd (Debian) +N: Burt Holzman +E: burt@fnal.gov +D: Contribution to TWebFile,rpdutils and sockets. + N: Marian Ivanov E: m.ivanov@gsi.de D: memory leak checker @@ -612,7 +620,7 @@ D: libRDAVIX, the davix client code N: Lorenzo Moneta E: Lorenzo.Moneta@cern.ch -D: Math libraries +D: Math libraries, ROOT-R, TMVA N: Miroslav Morhac E: fyzimiro@savba.sk (died on August 11 2011) @@ -685,6 +693,7 @@ D: author of Carrot (http://carrot.cern.ch) N: Katerina Opocenska E: opocenska@gmail.com D: author of the Event Recorder +D: author of the sub-merging technology in PROOF N: Juan Palacios E: Juan.Palacios@cern.ch @@ -762,6 +771,10 @@ N: Sven Ravndal E: Sven.Ravndal@dresdner-bank.com D: initial event generator interface +N: Benjamin Ragan-Kelley +E: benjaminrk@gmail.com +D: cling / Jupyter integration + N: Reiner Rohlfs E: Reiner.Rohlfs@obs.unige.ch D: various contributions to GUI classes @@ -922,3 +935,15 @@ D: contributed to Reflex N: Andreas Zoglauer E: zog@mpe.mpg.de D: contributed to TStyle::CreateGradientColorTable() + +N: Omar Andres Zapata Mesa +E: Omar.Zapata@cern.ch +D: ROOT-R, JupyROOT, TMVA + +N: Sergei Gleyzer +E: Sergei.Gleyzer@cern.ch +D: TMVA + +N: Jeromy Tompkins +E: Tompkins@nscl.msu.edu +D: COL2 drawing option diff --git a/README/INSTALL b/README/INSTALL index 71eb86ba9886b..87bd2246c05b9 100644 --- a/README/INSTALL +++ b/README/INSTALL @@ -9,13 +9,9 @@ Contents: 3. Choosing the installation method 3.1. Environment driven build 3.2. Fixed locations build - 3.3. Redhat packages - 3.4. Debian GNU/Linux packages 4. Installation Location 5. Makefile targets 6. Installing optional add-on libraries - 6.1. Using the environment - 6.2. Using "configure" flags 7. Information on third party software 7.1. Posix Thread usage 7.2. OpenGL library @@ -64,60 +60,42 @@ Here's a short summary: prompt% gzip -dc root-.source.tar.gz | tar -xf - -An alternative approach is to use our public Subversion repository to get -the latest version. See URL: - http://root.cern.ch/twiki/bin/view/ROOT/SubversionHowto +An alternative approach is to use our public GIT repository to get +the latest version. -Here's a short summary: - -1a) Get a specific version (>= 2.25/00), e.g.: version 2.25/03: + git clone http://root.cern.ch/git/root.git - prompt% svn co http://root.cern.ch/svn/root/tags/v2-25-03 root +The release specific tag can be obtained using for example: -1b) Alternatively, checkout the head (development version) of the sources: + cd root + git checkout -b v6-04-14 v6-04-14 - prompt% svn co http://root.cern.ch/svn/root/trunk root - -In both cases you should have a subdirectory called "root" in the -directory you ran the above commands in. 2. Getting ready to build: ========================== +Building ROOT requires to have CMake in your system. This can be +downloaded from http://cmake.org You may want to compile features into ROOT, which depends on third party libraries. Make sure you meet all demands for additional features before trying to enable them (see below). -If you are using some Un*x, you need to have libXpm installed. On very -few systems libXpm.a is not available. In that case get the pre-built -version from: - - ftp://root.cern.ch/root/xpm. - -Then use either environment variable XPM or "configure" flags -"--with-xpm-libdir=" to specify where you installed libXpm, if you -didn't install it in some generally searched directory (see more below). - -If you are using Windows make sure you've installed Cygwin - - http://sources.redhat.com/cygwin/ +The prerequisites neded for the different platforms are documented at -and that it is setup correctly, see: - - http://root.cern.ch/root/Cygwin.html - -Before proceeding read the complete document. Note: With the advent -of Cygwin 1.0 your system is mostly setup correctly by the setup.exe -program. + https://root.cern.ch/build-prerequisites 3. Choosing the installation method: ==================================== -There are two main methods of installing ROOT from source. As an -alternative, you can build either a set of Debian GNU/Linux or Redhat -Linux packages. +There are two main methods of installing ROOT from source. + - 'location independent' is advised for a personal installation of ROOT + - 'fix location' for a system wide installation. + +Both require to set the CMAKE_INSTALL_PREFIX variable at configuration time. +The 'fix location' requires in addition to set the 'gnuinstall' option at configuration. + 3.1. Environment driven build: ------------------------------ @@ -128,10 +106,10 @@ variables ROOTSYS, LD_LIBRARY_PATH, and PATH. 1) Get the sources of the latest ROOT (see above) 2) Type the build commands: - cd root - ./configure --help - ./configure [change arch appropriately] - (g)make [or, make -j n for n core machines] + mkdir + cd + cmake ../root + cmake --build . [ or simply "make -j" on Unix systems ] 3) Add bin/ to PATH and lib/ to LD_LIBRARY_PATH. For the sh shell family do: . bin/thisroot.sh @@ -151,14 +129,9 @@ like `/usr/local/bin' or even `/usr/bin'. This allows you, and all others on your system, to run ROOT without having to setup ROOTSYS and special PATH and LD_LIBRARY_PATH variables. -This scheme also makes it easier to make ROOT -distributions/installations that fit with an existing system. E.g., it -is trivial to install ROOT via a RedHat (.rpm) or Debian GNU/Linux -(.deb) package (see also below). - It's _strongly_ recommended to enable version numbers in sonames (if -possible) using this method (see --enable-soversion below). Also, -using the --enable-rpath option to "configure" you can set the load +possible) using this method (see 'soversion' option below). Also, +using the 'rpath' option to "cmake" you can set the load path to the ROOT libraries on the applications. However, this is not recommended if you have some other way (like /etc/ld.so.conf) of making the dynamic loader aware of where you installed the ROOT @@ -167,103 +140,18 @@ libraries. 1) Get the sources of latest ROOT (see above) 2) Now type the build commands: - cd root - ./configure --help - ./configure --prefix=/usr/local [change arch appropriately] - (g)make [or, make -j2, for dual CPU machines] - (g)make install [su to root if --prefix points to a system dir] - + mkdir + cd + cmake ../root -DCMAKE_INSTALL_PREFIX= -Dgnuinstall=ON + cmake --build . [ or simply "make -j" on Unix systems ] + cmake --build . --target install [ or simply "make install" on Unix systems ] + 3) Update the ldconfig cache by doing: ldconfig 4) try running root: root -3.3. Redhat packages: ---------------------- -Get the sources for a specific release from Subversion or from a tar-ball, as -outlined above and cd into the source directory. Then just do - - make redhat - -This will create a RPM spec file in the source tree. To build the -packages do: - -1) Make a tar-ball of the source tree: - - cd ../ - tar -czvf root-v.source.tar.gz - - where =.. is the version number of - ROOT (see the file build/version_number). - -2) - A) If you have system privileges, you can now do: - - cp root_v.source.tar.gz /usr/src/redhat/SOURCES/ - - or where ever RPM looks for source archives. - - B) However, if you don't have system privileges, you should set up a - build area by having the file ~/.rpmrc with a contents like: - - %macrofiles: /usr/lib/rpm/macros:/.rpmmac - - and a file /.rpmmac with a contents like: - - %_topdir /redhat - - Then you should make the appropriate directories: - - mkdir /redhat - mkdir /redhat/SOURCES - mkdir /redhat/BUILD - mkdir /redhat/RPMS - mkdir /redhat/SRPMS - mkdir /redhat/SPECS - - and finally copy the source tar-ball: - - cp root_v.source.tar.gz \ - /redhat/SOURCES - -3) Wether you have system privileges or not, you can now build the RPM - packages by issuing (Red Hat 7.3 or less): - - rpm -ba root.spec - - or (Red Hat 8.0 or above): - - rpmbuild -ba root.spec - - If you left the spec file in the source tree, you can build directly - from the tar-ball. You still need to have a proper build area - setup, as outlined above. All you need to do is: - - rpm -ta root_v.source.tar.gz (Red Hat 7.3-) - rpmbuild -ta root_v.source.tar.gz (Red Hat 8.0+) - -Per default the binaries will be build in /tmp/rootrpm, but one may -change that at build time by passing the option --buildroot too rpm. - -Please refer to man-page rpm(1) and http://www.rpm.org for more -information on RPM. - -Please note, that all possible packages may not be specified in the -spec file. See also build/package/common/README. - -3.4. Debian GNU/Linux packages: -------------------------------- -Get the sources for a specific release from Subversion or from a tar-ball, as -outlined above and cd into the source directory. Then just do - - make debian - -The packages will be build in "../". - -Please note, that all possible packages may not be specified in the -debian directory file. See also build/package/common/README. - 4. Installation Location: ========================= @@ -271,12 +159,12 @@ By default, the system will be installed depending on the ROOTSYS environment variable. In that case the whole package will live under the directory ROOTSYS points to. -Using the fixed location mode (section 3.2), the default `--prefix' -path is `/usr/local', which will result in the ROOT files to be -installed in `/usr/local/bin', `/usr/local/lib', etc. You can specify -an installation prefix other than `/usr/local' by giving `configure' -the option `--prefix=PATH'. For more detailed location specifications -see `configure --help'. +Using the fixed location mode (section 3.2), the default 'CMAKE_INSTALL_PREFIX' +path is '/usr/local', which will result in the ROOT files to be +installed in '/usr/local/bin', `/usr/local/lib', etc. You can specify +an installation prefix other than `/usr/local' by giving `cmake' +the option `-DCMAKE_INSTALL_PREFIX=PATH'. For more detailed location specifications +see http://root.cern.ch/building-root#variables. Here's the complete list: @@ -343,263 +231,18 @@ Here's the complete list: 5. Makefile targets: ==================== -The Makefile system and supported make targets are explained in the -BUILDSYSTEM file. +The availble Makefile top level targets are shown by doing + + make help 6. Installing optional add-on libraries: ======================================== -There are two ways in which you can specify additional features to -build into the ROOT system: - -6.1. Using the environment: ---------------------------- - -If you want to compile the ROOT optional add-on libraries to handle -True Type fonts, OpenGL graphics, SRP authentication, MySQL access, -RFIO access and event generator interfaces (Pythia, Pythia6 and -Venus) you can either specify the options as environment variables. -For example: - - # Used during build of ROOT can be overridden in ./configure - export ROOTBUILD=debug # see $ROOTSYS/README/BUILDSYSTEM - export CERNLIB=~/cernlib # must contain libpacklib.a libkernlib.a - export RFIO=~/shift/lib # CERN's SHIFT library, must - # contain libshift.a - export OPENGL=~/Mesa # must contain include/ lib/ - export SRP=~/src/srp # must contain include/ lib/ - #export AFS= # must contain include/ lib/ - #export XPM= # must contain libXpm - #export MYSQL= # must contain include/ lib/ - #export PYTHIA= # must contain libPythia - #export PYTHIA6= # must contain libPythia6 - #export VENUS= # must contain libVenus - #export TABLE=yes # to build the Table contrib library - -The ROOTBUILD environment variable is special and architecture -dependent. To get an idea of which values it can take, take a look in -the config/Makefile. corresponding to your -architecture. - - -6.2. Using "configure" flags: ------------------------------ - You can also specify additional features and external linking using -command line options - or flags - to the configure script. - -A special flag is "--build=