Uploaded image for project: 'Virtual Monte Carlo'
  1. Virtual Monte Carlo
  2. VMC-4

geant4_vmc: bad discovery of Root folders

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: geant4_vmc 3.0
    • Labels:
      None
    • Environment:

      Scientific Linux 5 32 bit

    • Development:

      Description

      When compiling geant4_vmc 2.15a against Root 5.34.20 I get this error:

      $ make
      Making g4root ...
      Makefile:38: /wizard/02/pamela_software/simulation/install/ROOT_5.34.20/etc/vmc/Makefile.linux: No such file or directory
      Makefile:51: /wizard/02/pamela_software/simulation/install/ROOT_5.34.20/etc/vmc/MakeRules: No such file or directory
      Makefile:124: /wizard/02/pamela_software/simulation/install/ROOT_5.34.20/etc/vmc/MakeMacros: No such file or directory

      and lots of similar ones. The directories searched by make are indeed wrong, since I installed Root outside the build directory so the files are inside a "root" subfolder:

      $ root-config --etcdir
      /wizard/02/pamela_software/simulation/install/ROOT_5.34.20/etc/root
      ^^^^^

      It seems to me that the problem is in how the Makefiles determine the Root installation folders. For example, in g4root/Makefile:

      ifeq ($(ROOTSYS),)
      ROOT_INCDIR := $(shell root-config --incdir)
      ROOT_BINDIR := $(shell root-config --bindir)
      ROOT_ETCDIR := $(shell root-config --etcdir)/vmc
      else
      ROOT_INCDIR = $(ROOTSYS)/include
      ROOT_BINDIR = $(ROOTSYS)/bin
      ROOT_ETCDIR = $(ROOTSYS)/etc/vmc
      endif

      ROOTSYS is defined by thisroot.sh which I source before compiling geant4_vmc, so the "else" part of the conditional is executed and wrong folders are set.

      A possible fix would be to always rely on root-config by telling the user to source thisroot.sh before compiling.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              nmori Nicola Mori
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: