/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:

在jetson Orin盒子上编译cuda相关的代码报错,

gins/axy_layer.h:94:116: warning: ‘IPluginV2’ is deprecated [-Wdeprecated-declarations]
   94 |         nvinfer1::IPluginV2* deserializePlugin(const char* name, const void* serial_data, size_t serial_length) noexcept override;
      |                                                                                                                    ^~~~~~~~
/usr/include/aarch64-linux-gnu/NvInferRuntimeCommon.h:393:22: note: declared here
  393 | class TRT_DEPRECATED IPluginV2
      |                      ^~~~~~~~~
/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |                                                                                                                                                 ^ 
/usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |                                                                                                                                                  ^ 
/usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
make: *** [Makefile_jetson:124: caffe/math_functions_.o] Error 1
make: *** Waiting for unfinished jobs....

解决方法

$ sudo apt install gcc-10 g++-10
$ export CC=/usr/bin/gcc-10
$ export CXX=/usr/bin/g++-10
$ export CUDA_ROOT=/usr/local/cuda
$ ln -s /usr/bin/gcc-10 $CUDA_ROOT/bin/gcc
$ ln -s /usr/bin/g++-10 $CUDA_ROOT/bin/g++
(Build Instant-NGP as described)

参考文献error: parameter packs not expanded with ‘...’ · Issue #119 · NVlabs/instant-ngp · GitHub

猜你喜欢

转载自blog.csdn.net/u013171226/article/details/142261258