Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-7478

Generating PCH fails with CXX flags with spaces

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • High
    • Resolution: Fixed
    • 6.04/02
    • 6.06/00, 6.04/04
    • None
    • None
    • Mac OSX 10.10.4 using cmake

    Description

      I am experiencing a build/install failure with this release, which was not there with 6.04/00. I am building on OSX 10.10.4 using cmake, with the configure, build and install commands

      > cmake ../root-6.04.02 -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="" -DCMAKE_OSX_SYSROOT="/" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`pwd`/../install -Dgnuinstall=ON

      > make -j 8

      > make install

      The failures occurs during the install step.

      [ 49%] Generating etc/allDict.cxx.pch
      /Users/chris/Projects/root-6.04.02/etc/dictpch/makepch.py etc/allDict.cxx.pch -I/Users/chris/Projects/build/include/root
      error: invalid arch name '-arch -stdlib=libc++'
       
      *** Break *** segmentation violation

      After a little digging the crux of the problem seems to be in the generated file

      ~/Projects/build > cat etc/dictpch/allCppflags.txt
      -I/System/Library/Frameworks/OpenGL.framework
      -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
      -I/opt/local/include
      -I/opt/local/include/graphviz
      -I/opt/local/include/xrootd
      -I/opt/local/include/xrootd/private
      -I/usr/include
      -pipe
      -Os
      -arch
      x86_64
      -stdlib=libc++
      -m64
      -pipe
      -fsigned-char
      -fno-common
      -Qunused-arguments
      -pthread
      -std=c++11
      -Wno-deprecated-declarations
      -stdlib=libc++
      -DR__HAVE_CONFIG

      in that there seems to be a line break in the definition of

      -arch
      x86_64

      which is causing the above when the file is used (via `` etc.).

      Attachments

        Issue Links

          Activity

            People

              axel Axel Naumann
              jonrob Christopher Rob Jones
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: