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

Error when compiling PyMVA

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Medium
    • Resolution: Not a Bug
    • 6.06/04
    • None
    • Build System
    • None
    • ArchLinux 64 bit

    Description

      I get an error while trying to compile ROOT in my ArchLinux system:

      [ 97%] Building CXX object tmva/pymva/CMakeFiles/PyMVA.dir/src/PyMethodBase.cxx.o
      [ 97%] Building CXX object tmva/tmvagui/CMakeFiles/TMVAGui.dir/src/annconvergencetest.cxx.o
      In file included from /usr/include/unistd.h:229:0,
      from /home/mori/software/source/root-6.06.04.build/include/strlcpy.h:19,
      from /home/mori/software/source/root-6.06.04.build/include/Rtypes.h:36,
      from /home/mori/software/source/root-6.06.04.build/include/TMathBase.h:30,
      from /home/mori/software/source/root-6.06.04.build/include/TString.h:36,
      from /home/mori/software/source/root-6.06.04.build/include/TMVA/MethodBase.h:50,
      from /home/mori/software/source/root-6.06.04.build/include/TMVA/PyMethodBase.h:27,
      from /home/mori/software/source/root-6.06.04/tmva/pymva/src/PyMethodBase.cxx:14:
      /home/mori/software/source/root-6.06.04/tmva/pymva/src/PyMethodBase.cxx: In static member function ¿static void TMVA::PyMethodBase::PyInitialize()¿:
      /usr/include/python3.5m/numpy/__multiarray_api.h:1527:35: error: return-statement with a value, in function returning 'void' [-fpermissive]
      #define NUMPY_IMPORT_ARRAY_RETVAL NULL
      ^
      /usr/include/python3.5m/numpy/__multiarray_api.h:1532:151: note: in expansion of macro ¿NUMPY_IMPORT_ARRAY_RETVAL¿
      #define import_array() {if (_import_array() < 0)

      {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return NUMPY_IMPORT_ARRAY_RETVAL; }

      }
      ^~~~~~~~~~~~~~~~~~~~~~~~~
      /home/mori/software/source/root-6.06.04/tmva/pymva/src/PyMethodBase.cxx:91:7: note: in expansion of macro ¿import_array¿
      import_array();
      ^~~~~~~~~~~~
      /home/mori/software/source/root-6.06.04/tmva/pymva/src/PyMethodBase.cxx:94:55: error: ¿PyString_FromString¿ was not declared in this scope
      PyObject *bName = PyString_FromString("_builtin_");
      ^
      /home/mori/software/source/root-6.06.04/tmva/pymva/src/PyMethodBase.cxx: In static member function ¿static void TMVA::PyMethodBase::PySetProgramName(TString)¿:
      /home/mori/software/source/root-6.06.04/tmva/pymva/src/PyMethodBase.cxx:136:53: error: cannot convert ¿char*¿ to ¿wchar_t*¿ for argument ¿1¿ to ¿void Py_SetProgramName(wchar_t*)¿
      Py_SetProgramName(const_cast<char *>(name.Data()));
      ^
      tmva/pymva/CMakeFiles/PyMVA.dir/build.make:102: recipe for target 'tmva/pymva/CMakeFiles/PyMVA.dir/src/PyMethodBase.cxx.o' failed
      make[2]: *** [tmva/pymva/CMakeFiles/PyMVA.dir/src/PyMethodBase.cxx.o] Error 1
      CMakeFiles/Makefile2:20878: recipe for target 'tmva/pymva/CMakeFiles/PyMVA.dir/all' failed
      make[1]: *** [tmva/pymva/CMakeFiles/PyMVA.dir/all] Error 2
      make[1]: *** Waiting for unfinished jobs....

      At first sight it looks more of a numpy problem (possibly triggered by GCC 6?) rather than a ROOT problem, but I'm not 100% sure so I report the problem. System details:
      gcc 6.1.1
      root 6.06.04
      python 3.5.1
      numpy 1.11.0

      Attachments

        Activity

          People

            moneta Lorenzo Moneta
            nmori Nicola Mori
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Actual End: