Menu

Build problems with cmake

Help
flapique
2006-11-29
2013-04-22
  • flapique

    flapique - 2006-11-29

    I can compile/install VTK with no problem ( 5.0.2) I've downloaded the octaviz-0.4.5 tarball release, as well as checked out the CVS version. When I try to configure ccmake . (CMake Version 2.4 - patch 4) I get: :

    CMake Error: Error in cmake code at
    /tmp/octaviz/CMakeLists.txt:152:
    ADD_CUSTOM_TARGET called with invalid target name
    "/usr/local/VTK/Common/vtkTypeInt8Array.cc".  Target names may not contain a
    slash.  Use ADD_CUSTOM_COMMAND to generate files.  Set
    CMAKE_BACKWARDS_COMPATIBILITY to 2.2 or lower to skip this check.
    Current CMake stack: /tmp/octaviz/Common/CMakeLists.txt

    CMake Error: Error in cmake code at
    /tmp/octaviz/CMakeLists.txt:153:
    ADD_CUSTOM_TARGET called with invalid target name
    "/usr/local/VTK/Common/vtkTypeInt8Array.oct".  Target names may not contain a
    slash.  Use ADD_CUSTOM_COMMAND to generate files.  Set
    CMAKE_BACKWARDS_COMPATIBILITY to 2.2 or lower to skip this check.
    Current CMake stack: /tmp/octaviz/Common/CMakeLists.txt

    Is this a VTK configuration problem, or and octaviz configuration problem?

    Thanks,
    Francis

     
    • Thomas Weber

      Thomas Weber - 2006-11-29

      Hi,

      this is probably a VTK problem. Please look for a file "vtkCommonKit.cmake"; what are the settings for VTK_COMMON_CLASSES in there?

      And on which system are you trying this?

        Thomas

       
    • flapique

      flapique - 2006-11-29

      System : Redhat Enterprise 4

      I set CMAKE_BACKWARDS_COMPATIBILITY to 2.2, then

      make
      Scanning dependencies of target vtkWrapOctave
      [  0%] Building C object Wrapping/CMakeFiles/vtkWrapOctave.dir/vtkWrapOctave.o
      [  0%] Building C object Wrapping/CMakeFiles/vtkWrapOctave.dir/vtkParse.tab.o
      Linking C executable vtkWrapOctave
      [  0%] Built target vtkWrapOctave
      Error opening input file /usr/local/VTK/Common//usr/local/VTK/Common/vtkTypeFloat32Array.h
      make[2]: *** [Common/CMakeFiles/usr/local/VTK/Common/vtkTypeFloat32Array.cc] Erreur 1
      make[1]: *** [Common/CMakeFiles/usr/local/VTK/Common/vtkTypeFloat32Array.cc.dir/all] Erreur 2
      make: *** [all] Erreur 2

      # Directory containing class headers.
      SET(VTK_COMMON_HEADER_DIR "/usr/local/VTK/Common")

      # Classes in vtkCommon.
      SET(VTK_COMMON_CLASSES
        "vtkAbstractArray"
        "vtkAbstractTransform"
        "vtkAmoebaMinimizer"
        "vtkAnimationCue"
        "vtkAnimationScene"
        "vtkAssemblyNode"
        "vtkAssemblyPath"
        "vtkAssemblyPaths"
        "vtkBitArray"
        "vtkBox"
        "vtkByteSwap"
        "vtkCallbackCommand"
        "vtkCharArray"
        "vtkCollection"
        "vtkCollectionIterator"
        "vtkCommand"
        "vtkContourValues"
        "vtkCriticalSection"
        "vtkCylindricalTransform"
        "vtkDataArray"
        "vtkDataArrayCollection"
        "vtkDataArrayCollectionIterator"
        "vtkDataArraySelection"
        "vtkDebugLeaks"
        "vtkDebugLeaksManager"
        "vtkDirectory"
        "vtkDoubleArray"
        "vtkDynamicLoader"
        "vtkEdgeTable"
        "vtkErrorCode"
        "vtkEventForwarderCommand"
        "vtkExtentSplitter"
        "vtkExtentTranslator"
        "vtkFastNumericConversion"
        "vtkFileOutputWindow"
        "vtkFloatArray"
        "vtkFunctionParser"
        "vtkFunctionSet"
        "vtkGarbageCollector"
        "vtkGarbageCollectorManager"
        "vtkGeneralTransform"
        "vtkHeap"
        "vtkHomogeneousTransform"
        "vtkIOStream"
        "vtkIdList"
        "vtkIdListCollection"
        "vtkIdTypeArray"
        "vtkIdentityTransform"
        "vtkImplicitFunction"
        "vtkImplicitFunctionCollection"
        "vtkIndent"
        "vtkInitialValueProblemSolver"
        "vtkInstantiator"
        "vtkIntArray"
        "vtkLargeInteger"
        "vtkLinearTransform"
        "vtkLogLookupTable"
        "vtkLongArray"
        "vtkLookupTable"
        "vtkMath"
        "vtkMatrix4x4"
        "vtkMatrixToHomogeneousTransform"
        "vtkMatrixToLinearTransform"
        "vtkMultiPartExtentTranslator"
        "vtkMultiThreader"
        "vtkMutexLock"
        "vtkOStrStreamWrapper"
        "vtkOStreamWrapper"
        "vtkObject"
        "vtkObjectBase"
        "vtkObjectFactory"
        "vtkObjectFactoryCollection"
        "vtkOldStyleCallbackCommand"
        "vtkOutputWindow"
        "vtkOverrideInformation"
        "vtkOverrideInformationCollection"
        "vtkParametricBoy"
        "vtkParametricConicSpiral"
        "vtkParametricCrossCap"
        "vtkParametricDini"
        "vtkParametricEllipsoid"
        "vtkParametricEnneper"
        "vtkParametricFigure8Klein"
        "vtkParametricFunction"
        "vtkParametricKlein"
        "vtkParametricMobius"
        "vtkParametricRandomHills"
        "vtkParametricRoman"
        "vtkParametricSuperEllipsoid"
        "vtkParametricSuperToroid"
        "vtkParametricTorus"
        "vtkPerspectiveTransform"
        "vtkPlane"
        "vtkPlaneCollection"
        "vtkPlanes"
        "vtkPoints"
        "vtkPriorityQueue"
        "vtkProp"
        "vtkPropCollection"
        "vtkProperty2D"
        "vtkQuadric"
        "vtkReferenceCount"
        "vtkRungeKutta2"
        "vtkRungeKutta4"
        "vtkRungeKutta45"
        "vtkScalarsToColors"
        "vtkShortArray"
        "vtkSignedCharArray"
        "vtkSmartPointerBase"
        "vtkSphericalTransform"
        "vtkStdString"
        "vtkStringArray"
        "vtkStructuredData"
        "vtkStructuredVisibilityConstraint"
        "vtkTableExtentTranslator"
        "vtkTensor"
        "vtkThreadMessager"
        "vtkTimeStamp"
        "vtkTimerLog"
        "vtkTransform"
        "vtkTransformCollection"
        "vtkUnsignedCharArray"
        "vtkUnsignedIntArray"
        "vtkUnsignedLongArray"
        "vtkUnsignedShortArray"
        "vtkVersion"
        "vtkVoidArray"
        "vtkWarpTransform"
        "vtkWindow"
        "vtkWindowLevelLookupTable"
        "vtkXMLFileOutputWindow"
        "vtkLongLongArray"
        "vtkUnsignedLongLongArray"
        "/usr/local/VTK/Common/vtkTypeInt8Array"
        "/usr/local/VTK/Common/vtkTypeInt16Array"
        "/usr/local/VTK/Common/vtkTypeInt32Array"
        "/usr/local/VTK/Common/vtkTypeInt64Array"
        "/usr/local/VTK/Common/vtkTypeUInt8Array"
        "/usr/local/VTK/Common/vtkTypeUInt16Array"
        "/usr/local/VTK/Common/vtkTypeUInt32Array"
        "/usr/local/VTK/Common/vtkTypeUInt64Array"
        "/usr/local/VTK/Common/vtkTypeFloat32Array"
        "/usr/local/VTK/Common/vtkTypeFloat64Array")

      # Abstract classes in vtkCommon.
      SET(VTK_COMMON_CLASSES_ABSTRACT
        "vtkAbstractArray"
        "vtkAbstractTransform"
        "vtkCallbackCommand"
        "vtkCommand"
        "vtkDataArray"
        "vtkEventForwarderCommand"
        "vtkFunctionSet"
        "vtkHomogeneousTransform"
        "vtkImplicitFunction"
        "vtkInitialValueProblemSolver"
        "vtkLinearTransform"
        "vtkObjectBase"
        "vtkObjectFactory"
        "vtkOldStyleCallbackCommand"
        "vtkOverrideInformation"
        "vtkOverrideInformationCollection"
        "vtkParametricFunction"
        "vtkProp"
        "vtkScalarsToColors"
        "vtkStructuredData"
        "vtkWarpTransform"
        "vtkWindow")

      # Wrap-exclude classes in vtkCommon.
      SET(VTK_COMMON_CLASSES_WRAP_EXCLUDE
        "vtkCallbackCommand"
        "vtkCommand"
        "vtkDebugLeaksManager"
        "vtkErrorCode"
        "vtkEventForwarderCommand"
        "vtkGarbageCollectorManager"
        "vtkIOStream"
        "vtkIndent"
        "vtkLargeInteger"
        "vtkOStrStreamWrapper"
        "vtkOStreamWrapper"
        "vtkOldStyleCallbackCommand"
        "vtkSmartPointerBase"
        "vtkStdString"
        "vtkTimeStamp")

       
      • Thomas Weber

        Thomas Weber - 2006-11-29

        > Error opening input file /usr/local/VTK/Common//usr/local/VTK/Common/vtkTypeFloat32Array.h

        This is a bug in VTK; a patch can be found at
        https://sourceforge.net/tracker/index.php?func=detail&aid=1565595&group_id=100501&atid=627604

        (the "no-paths.patch" from the tarball).

        This means you must recompile VTK afterwards.

        Is this a 64bit system? (And please pass -Wno-deprecated to the compiler. The warnings will clutter up your complete build log; there's nothing Octaviz can do about this, these are warnings coming from VTK).

        Thomas

         
    • Jared

      Jared - 2006-11-29

      You'll need to edit your vtkCommonkit.cmake file and remove the paths from these class names
      "/usr/local/VTK/Common/vtkTypeInt8Array"
      "/usr/local/VTK/Common/vtkTypeInt16Array"
      "/usr/local/VTK/Common/vtkTypeInt32Array"
      "/usr/local/VTK/Common/vtkTypeInt64Array"
      "/usr/local/VTK/Common/vtkTypeUInt8Array"
      "/usr/local/VTK/Common/vtkTypeUInt16Array"
      "/usr/local/VTK/Common/vtkTypeUInt32Array"
      "/usr/local/VTK/Common/vtkTypeUInt64Array"
      "/usr/local/VTK/Common/vtkTypeFloat32Array"
      "/usr/local/VTK/Common/vtkTypeFloat64Array"
      You'll also want to check your vtkRenderingkit.cmake and see if there are any paths prepended to some of the classes in there as well (I had the same problem).

       
    • flapique

      flapique - 2006-11-29

      Than you I progrees

      make
      Scanning dependencies of target vtkWrapOctave
      [  0%] Building C object Wrapping/CMakeFiles/vtkWrapOctave.dir/vtkWrapOctave.o
      [  0%] Building C object Wrapping/CMakeFiles/vtkWrapOctave.dir/vtkParse.tab.o
      Linking C executable vtkWrapOctave
      [  0%] Built target vtkWrapOctave
      Scanning dependencies of target octaviz
      [  0%] Building CXX object Common/CMakeFiles/octaviz.dir/octaviz.o
      /tmp/octaviz/Common/octaviz.cc: In member function `virtual octave_uint64 vtk_object::uint64_scalar_value() const':
      /tmp/octaviz/Common/octaviz.cc:188: erreur: « octave_uint64_t » n'a pas été déclaré
      make[2]: *** [Common/CMakeFiles/octaviz.dir/octaviz.o] Erreur 1
      make[1]: *** [Common/CMakeFiles/octaviz.dir/all] Erreur 2
      make: *** [all] Erreur 2

       
    • Jared

      Jared - 2006-11-29

      Edit the Common/octaviz.cc on line 188 and replace the octave_uint64_t with uintptr_t

       
    • flapique

      flapique - 2006-11-29

      OK

      make
      [  0%] Built target vtkWrapOctave
      Scanning dependencies of target octaviz
      [  0%] Building CXX object Common/CMakeFiles/octaviz.dir/octaviz.o
      Linking CXX shared library liboctaviz.so
      [  0%] Built target octaviz
      [  0%] Built target vtkAbstractArray.cc
      Dans le fichier inclus à partir de /usr/local/VTK/Common/vtkSystemIncludes.h:30,
                à partir de /usr/local/VTK/Common/vtkIndent.h:24,
                à partir de /usr/local/VTK/Common/vtkObjectBase.h:43,
                à partir de /usr/local/VTK/Common/vtkCommand.h:47,
                à partir de octaviz.h:119,
                à partir de OctavizCommon.h:5,
                à partir de vtkAbstractArray.cc:3:
      /usr/local/VTK/Common/vtkWin32Header.h:27:26: vtkConfigure.h : Aucun fichier ou répertoire de ce type
      Dans le fichier inclus à partir de /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/backward/iostream.h:31,
                à partir de /usr/local/VTK/Common/vtkIOStream.h:72,
                à partir de /usr/local/VTK/Common/vtkSystemIncludes.h:40,
                à partir de /usr/local/VTK/Common/vtkIndent.h:24,
                à partir de /usr/local/VTK/Common/vtkObjectBase.h:43,
                à partir de /usr/local/VTK/Common/vtkCommand.h:47,
                à partir de octaviz.h:119,
                à partir de OctavizCommon.h:5,
                à partir de vtkAbstractArray.cc:3:
      /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/backward/backward_warning.h:32:2: attention : #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
      Dans le fichier inclus à partir de /usr/local/VTK/Common/vtkSystemIncludes.h:40,
                à partir de /usr/local/VTK/Common/vtkIndent.h:24,
                à partir de /usr/local/VTK/Common/vtkObjectBase.h:43,
                à partir de /usr/local/VTK/Common/vtkCommand.h:47,
                à partir de octaviz.h:119,
                à partir de OctavizCommon.h:5,
                à partir de vtkAbstractArray.cc:3:
      /usr/local/VTK/Common/vtkIOStream.h:77:58: strstream.h : Aucun fichier ou répertoire de ce type
      Dans le fichier inclus à partir de /usr/local/VTK/Common/vtkSystemIncludes.h:44,
                à partir de /usr/local/VTK/Common/vtkIndent.h:24,
                à partir de /usr/local/VTK/Common/vtkObjectBase.h:43,
                à partir de /usr/local/VTK/Common/vtkCommand.h:47,
                à partir de octaviz.h:119,
                à partir de OctavizCommon.h:5,
                à partir de vtkAbstractArray.cc:3:
      /usr/local/VTK/Common/vtkType.h:144:3: #error "No native data type can represent an 8-bit integer."
      /usr/local/VTK/Common/vtkType.h:159:3: #error "No native data type can represent a 16-bit integer."
      /usr/local/VTK/Common/vtkType.h:174:3: #error "No native data type can represent a 32-bit integer."
      /usr/local/VTK/Common/vtkType.h:194:3: #error "No native data type can represent a 64-bit integer."
      /usr/local/VTK/Common/vtkType.h:202:3: #error "No native data type can represent a 32-bit floating point value."
      /usr/local/VTK/Common/vtkType.h:210:3: #error "No native data type can represent a 64-bit floating point value."
      make[2]: *** [Common/CMakeFiles/vtkAbstractArray.oct] Erreur 1
      make[1]: *** [Common/CMakeFiles/vtkAbstractArray.oct.dir/all] Erreur 2
      make: *** [all] Erreur 2

       
    • Jared

      Jared - 2006-11-29

      Did you build your VTK as a shared library?  If not, you may want to try building it as a shared library, then you'll have to go back and edit the vtkCommonkit.cmake and vtkRenderkit.cmake again.

       
    • flapique

      flapique - 2006-12-04

      ==> line 65 vtkXRenderWindowInteractor* CurrentInteractor = reinterpret_cast<vtkXRenderWindowInteractor*>(vtk_pointer);

      vtkInitializeInteractor.cc: In function `octave_value_list FvtkInitializeInteractor(const octave_value_list&, int)':
      vtkInitializeInteractor.cc:65: erreur: « vtkXRenderWindowInteractor » n'a pas été déclaré dans cet horizon
      vtkInitializeInteractor.cc:65: erreur: « CurrentInteractor » n'a pas été déclaré dans cet horizon
      vtkInitializeInteractor.cc:65: erreur: « vtkXRenderWindowInteractor » is not a type
      vtkInitializeInteractor.cc:65: erreur: expected `>' avant un élément lexical « * »
      vtkInitializeInteractor.cc:65: erreur: expected `(' avant un élément lexical « * »
      vtkInitializeInteractor.cc:65: erreur: expected primary-expression avant un élément lexical « > »
      vtkInitializeInteractor.cc:65: erreur: expected `)' avant un élément lexical « ; »
      vtkInitializeInteractor.cc:75: erreur: « vtkXOpenGLRenderWindow » n'a pas été déclaré dans cet horizon
      vtkInitializeInteractor.cc:75: erreur: « RenderWindow » n'a pas été déclaré dans cet horizon
      vtkInitializeInteractor.cc:75: erreur: « vtkXOpenGLRenderWindow » is not a type
      vtkInitializeInteractor.cc:75: erreur: expected `>' avant un élément lexical « * »
      vtkInitializeInteractor.cc:75: erreur: expected `(' avant un élément lexical « * »
      vtkInitializeInteractor.cc:75: erreur: expected primary-expression avant un élément lexical « > »
      vtkInitializeInteractor.cc:75: erreur: expected `)' avant un élément lexical « ; »
      vtkInitializeInteractor.cc:78: embrouillé par les erreurs précédentes, abandon
      make[2]: *** [Common/CMakeFiles/vtkInitializeInteractor.oct] Erreur 1
      make[1]: *** [Common/CMakeFiles/vtkInitializeInteractor.oct.dir/all] Erreur 2

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.