CMake 3.6.3 in MIPSpro
#1
CMake 3.6.3 in MIPSpro
I've been fiddling with making MIPSpro compile CMake 3.6.3, alas seeing not much success (learning lots, achieving little). I was wondering if anybody had any ideas.

Here are the first few errors I get:

Code:
cc-3316 CC: ERROR File = /usr/include/CC/stl_vector.h, Line = 637
  The expression must be a pointer to a complete object type.

      construct(_M_finish, *(_M_finish - 1));
                             ^
          detected during instantiation of "void
                    std::vector<cmState::SnapshotDataType,
                    std::allocator<cmState::SnapshotDataType>>::_M_insert_aux(s
                    td::vector<cmState::SnapshotDataType,
                    std::allocator<cmState::SnapshotDataType>>::iterator,
                    const cmState::SnapshotDataType &)"

cc-1070 CC: ERROR File = /usr/include/CC/stl_construct.h, Line = 53
  The indicated type is incomplete.

    new (__p) _T1(__value);
              ^
          A template was detected during header processing.
            instantiation of "void std::construct(cmState::SnapshotDataType *,
                      const <error-type> &)" at line 637 of
                      "/usr/include/CC/stl_vector.h"
            instantiation of "void std::vector<cmState::SnapshotDataType,
                      std::allocator<cmState::SnapshotDataType>>::_M_insert_aux
                      (std::vector<cmState::SnapshotDataType,
                      std::allocator<cmState::SnapshotDataType>>::iterator,
                      const cmState::SnapshotDataType &)"

cc-3316 CC: ERROR File = /usr/include/CC/stl_vector.h, Line = 638
  The expression must be a pointer to a complete object type.

      ++_M_finish;
        ^
          detected during instantiation of "void
                    std::vector<cmState::SnapshotDataType,
                    std::allocator<cmState::SnapshotDataType>>::_M_insert_aux(s
                    td::vector<cmState::SnapshotDataType,
                    std::allocator<cmState::SnapshotDataType>>::iterator,
                    const cmState::SnapshotDataType &)"

So what I'm getting is that cmState::SnapshotDataType is not completely defined.

Here is the relevent portion of cmState.h:

Code:
#ifndef cmState_h
#define cmState_h

#include "cmStandardIncludes.h"

#include "cmAlgorithms.h"
#include "cmLinkedTree.h"
#include "cmPolicies.h"
#include "cmPropertyDefinitionMap.h"
#include "cmPropertyMap.h"

class cmake;
class cmCommand;
class cmDefinitions;
class cmListFileBacktrace;
class cmCacheManager;

class cmState
{
  struct SnapshotDataType;
  struct PolicyStackEntry;
  struct BuildsystemDirectoryStateType;
  typedef cmLinkedTree<SnapshotDataType>::iterator PositionType;
  friend class Snapshot;

public:
  cmState();
  ~cmState();

  enum SnapshotType
  {
    BaseType,
    BuildsystemDirectoryType,
    FunctionCallType,
    MacroCallType,
    IncludeFileType,
    InlineListFileType,
    PolicyScopeType,
    VariableScopeType
  };

And cmState.cxx:

Code:
#include "cmState.h"

#include "cmAlgorithms.h"
#include "cmCacheManager.h"
#include "cmCommand.h"
#include "cmDefinitions.h"
#include "cmVersion.h"
#include "cmake.h"

#include <assert.h>

struct cmState::SnapshotDataType
{
  cmState::PositionType ScopeParent;
  cmState::PositionType DirectoryParent;
  cmLinkedTree<cmState::PolicyStackEntry>::iterator Policies;
  cmLinkedTree<cmState::PolicyStackEntry>::iterator PolicyRoot;
  cmLinkedTree<cmState::PolicyStackEntry>::iterator PolicyScope;
  cmState::SnapshotType SnapshotType;
  bool Keep;
  cmLinkedTree<std::string>::iterator ExecutionListFile;
  cmLinkedTree<cmState::BuildsystemDirectoryStateType>::iterator
    BuildSystemDirectory;
  cmLinkedTree<cmDefinitions>::iterator Vars;
  cmLinkedTree<cmDefinitions>::iterator Root;
  cmLinkedTree<cmDefinitions>::iterator Parent;
  std::vector<std::string>::size_type IncludeDirectoryPosition;
  std::vector<std::string>::size_type CompileDefinitionsPosition;
  std::vector<std::string>::size_type CompileOptionsPosition;
};

I've tried a lot of things, such as moving the struct declaration into the header and attempting to explicitly declare cmLinkedTree<SnapshotDataType>::iterator in various places. For a long time I thought this was an issue with that typedef of a template being in a header, but I have drifted away from that theory.

Does anybody have any thoughts?
(This post was last modified: 04-24-2020, 11:08 PM by nintendoeats.)
nintendoeats
Octane

Trade Count: (0)
Posts: 85
Threads: 8
Joined: Nov 2019
Location: Canada
Find Reply
04-14-2020, 01:34 AM


Messages In This Thread
CMake 3.6.3 in MIPSpro - by nintendoeats - 04-14-2020, 01:34 AM
RE: So this data type isn't complete... - by ghost180sx - 04-15-2020, 04:19 PM
RE: So this data type isn't complete... - by nintendoeats - 04-15-2020, 04:28 PM
RE: So this data type isn't complete... - by nintendoeats - 04-15-2020, 07:49 PM
RE: So this data type isn't complete... - by Raion - 04-15-2020, 09:35 PM
RE: So this data type isn't complete... - by ghost180sx - 04-16-2020, 05:11 PM
RE: So this data type isn't complete... - by Raion - 04-16-2020, 05:16 PM
RE: So this data type isn't complete... - by ghost180sx - 04-16-2020, 05:25 PM
RE: So this data type isn't complete... - by Raion - 04-16-2020, 07:07 PM
RE: So this data type isn't complete... - by nintendoeats - 04-23-2020, 11:41 AM
RE: So this data type isn't complete... - by nintendoeats - 04-23-2020, 03:41 PM
RE: So this data type isn't complete... - by nintendoeats - 04-24-2020, 01:26 AM
RE: So this data type isn't complete... - by Raion - 04-24-2020, 03:26 AM
RE: CMake 3.6.3 in MIPSpro - by nintendoeats - 04-24-2020, 11:18 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)