Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gcc v11 build failure RE: std::size_t #138

Closed
matthewfeickert opened this issue Jun 29, 2021 · 0 comments · Fixed by #139
Closed

Fix gcc v11 build failure RE: std::size_t #138

matthewfeickert opened this issue Jun 29, 2021 · 0 comments · Fixed by #139

Comments

@matthewfeickert
Copy link
Contributor

Following up Issue #136 and PR #137 given the build failure in https://its.cern.ch/jira/browse/ATLINFR-4147, it is seen that for gcc v11 there is a build failure of

[ 23%] Building CXX object CMakeFiles/lwtnn-stat.dir/src/FastInputPreprocessor.cxx.o
In file included from /__w/lwtnn/lwtnn/include/lwtnn/lightweight_network_config.hh:7,
                 from /__w/lwtnn/lwtnn/include/lwtnn/generic/FastInputPreprocessor.hh:4,
                 from /__w/lwtnn/lwtnn/src/FastInputPreprocessor.cxx:1:
/__w/lwtnn/lwtnn/include/lwtnn/NNLayerConfig.hh:69:17: error: 'size_t' was not declared in this scope; did you mean 'std::size_t'?
   69 |     std::vector<size_t> sources;
      |                 ^~~~~~
      |                 std::size_t
In file included from /usr/local/include/c++/11.1.0/bits/stl_algobase.h:59,
                 from /usr/local/include/c++/11.1.0/vector:60,
                 from /__w/lwtnn/lwtnn/include/lwtnn/NNLayerConfig.hh:11,
                 from /__w/lwtnn/lwtnn/include/lwtnn/lightweight_network_config.hh:7,
                 from /__w/lwtnn/lwtnn/include/lwtnn/generic/FastInputPreprocessor.hh:4,
                 from /__w/lwtnn/lwtnn/src/FastInputPreprocessor.cxx:1:
/usr/local/include/c++/11.1.0/x86_64-linux-gnu/bits/c++config.h:280:33: note: 'std::size_t' declared here
  280 |   typedef __SIZE_TYPE__         size_t;
      |                                 ^~~~~~
In file included from /__w/lwtnn/lwtnn/include/lwtnn/lightweight_network_config.hh:7,
                 from /__w/lwtnn/lwtnn/include/lwtnn/generic/FastInputPreprocessor.hh:4,
                 from /__w/lwtnn/lwtnn/src/FastInputPreprocessor.cxx:1:
/__w/lwtnn/lwtnn/include/lwtnn/NNLayerConfig.hh:69:23: error: template argument 1 is invalid
   69 |     std::vector<size_t> sources;
      |                       ^
/__w/lwtnn/lwtnn/include/lwtnn/NNLayerConfig.hh:69:23: error: template argument 2 is invalid
[ 26%] Building CXX object CMakeFiles/lwtnn.dir/src/FastInputPreprocessor.cxx.o
In file included from /__w/lwtnn/lwtnn/include/lwtnn/lightweight_network_config.hh:7,
                 from /__w/lwtnn/lwtnn/include/lwtnn/generic/FastInputPreprocessor.hh:4,
                 from /__w/lwtnn/lwtnn/src/FastInputPreprocessor.cxx:1:
/__w/lwtnn/lwtnn/include/lwtnn/NNLayerConfig.hh:69:17: error: 'size_t' was not declared in this scope; did you mean 'std::size_t'?
   69 |     std::vector<size_t> sources;
      |                 ^~~~~~
      |                 std::size_t
In file included from /usr/local/include/c++/11.1.0/bits/stl_algobase.h:59,
                 from /usr/local/include/c++/11.1.0/vector:60,
                 from /__w/lwtnn/lwtnn/include/lwtnn/NNLayerConfig.hh:11,
                 from /__w/lwtnn/lwtnn/include/lwtnn/lightweight_network_config.hh:7,
                 from /__w/lwtnn/lwtnn/include/lwtnn/generic/FastInputPreprocessor.hh:4,
                 from /__w/lwtnn/lwtnn/src/FastInputPreprocessor.cxx:1:
/usr/local/include/c++/11.1.0/x86_64-linux-gnu/bits/c++config.h:280:33: note: 'std::size_t' declared here
  280 |   typedef __SIZE_TYPE__         size_t;
      |                                 ^~~~~~
In file included from /__w/lwtnn/lwtnn/include/lwtnn/lightweight_network_config.hh:7,
                 from /__w/lwtnn/lwtnn/include/lwtnn/generic/FastInputPreprocessor.hh:4,
                 from /__w/lwtnn/lwtnn/src/FastInputPreprocessor.cxx:1:
/__w/lwtnn/lwtnn/include/lwtnn/NNLayerConfig.hh:69:23: error: template argument 1 is invalid
   69 |     std::vector<size_t> sources;
      |                       ^
/__w/lwtnn/lwtnn/include/lwtnn/NNLayerConfig.hh:69:23: error: template argument 2 is invalid
gmake[2]: *** [CMakeFiles/lwtnn-stat.dir/build.make:134: CMakeFiles/lwtnn-stat.dir/src/FastInputPreprocessor.cxx.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:276: CMakeFiles/lwtnn-stat.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
[ 28%] Building CXX object CMakeFiles/lwtnn.dir/src/FastGraph.cxx.o
In file included from /__w/lwtnn/lwtnn/include/lwtnn/lightweight_network_config.hh:7,
                 from /__w/lwtnn/lwtnn/src/FastGraph.cxx:1:
/__w/lwtnn/lwtnn/include/lwtnn/NNLayerConfig.hh:69:17: error: 'size_t' was not declared in this scope; did you mean 'std::size_t'?
   69 |     std::vector<size_t> sources;
      |                 ^~~~~~
      |                 std::size_t
In file included from /usr/local/include/c++/11.1.0/bits/stl_algobase.h:59,
                 from /usr/local/include/c++/11.1.0/vector:60,
                 from /__w/lwtnn/lwtnn/include/lwtnn/NNLayerConfig.hh:11,
                 from /__w/lwtnn/lwtnn/include/lwtnn/lightweight_network_config.hh:7,
                 from /__w/lwtnn/lwtnn/src/FastGraph.cxx:1:
/usr/local/include/c++/11.1.0/x86_64-linux-gnu/bits/c++config.h:280:33: note: 'std::size_t' declared here
  280 |   typedef __SIZE_TYPE__         size_t;
      |                                 ^~~~~~
In file included from /__w/lwtnn/lwtnn/include/lwtnn/lightweight_network_config.hh:7,
                 from /__w/lwtnn/lwtnn/src/FastGraph.cxx:1:
/__w/lwtnn/lwtnn/include/lwtnn/NNLayerConfig.hh:69:23: error: template argument 1 is invalid
   69 |     std::vector<size_t> sources;
      |                       ^
/__w/lwtnn/lwtnn/include/lwtnn/NNLayerConfig.hh:69:23: error: template argument 2 is invalid
gmake[2]: *** [CMakeFiles/lwtnn.dir/build.make:147: CMakeFiles/lwtnn.dir/src/FastGraph.cxx.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: *** [CMakeFiles/lwtnn.dir/build.make:134: CMakeFiles/lwtnn.dir/src/FastInputPreprocessor.cxx.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1140: CMakeFiles/lwtnn.dir/all] Error 2
gmake: *** [Makefile:160: all] Error 2

where it looks like a relevant code block is

// graph node configuration
struct NodeConfig
{
enum class Type {
INPUT, INPUT_SEQUENCE, FEED_FORWARD, CONCATENATE, SEQUENCE,
TIME_DISTRIBUTED, SUM };
Type type;
std::vector<size_t> sources;
int index; // input node size, or layer number
};
}

cc @dguest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant