You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
hi, I am trying to build onnxruntime but ı got an error like this:
[ 17%] Running C++ protocol buffer compiler on /workspace/onnxruntime/build/Linux/Debug/external/onnx/onnx/onnx-data.proto
[ 17%] Running C++ protocol buffer compiler on /workspace/onnxruntime/build/Linux/Debug/external/onnx/onnx/onnx-operators-ml.proto
[ 17%] Building CXX object external/onnx/CMakeFiles/onnx_proto.dir/onnx/onnx-ml.pb.cc.o
[ 17%] Building CXX object external/onnx/CMakeFiles/onnx_proto.dir/onnx/onnx-operators-ml.pb.cc.o
[ 17%] Building CXX object external/onnx/CMakeFiles/onnx_proto.dir/onnx/onnx-data.pb.cc.o
[ 17%] Linking CXX static library libonnx_proto.a
[ 17%] Built target onnx_proto
[ 17%] Building CXX object CMakeFiles/onnxruntime_common.dir/workspace/onnxruntime/onnxruntime/core/common/cpuid_info.cc.o
[ 17%] Building CXX object CMakeFiles/onnxruntime_common.dir/workspace/onnxruntime/onnxruntime/core/common/denormal.cc.o
[ 18%] Building CXX object CMakeFiles/onnxruntime_common.dir/workspace/onnxruntime/onnxruntime/core/common/helper.cc.o
[ 18%] Building CXX object CMakeFiles/onnxruntime_common.dir/workspace/onnxruntime/onnxruntime/core/common/logging/capture.cc.o
[ 18%] Building CXX object CMakeFiles/onnxruntime_common.dir/workspace/onnxruntime/onnxruntime/core/common/logging/logging.cc.o
[ 18%] Building CXX object CMakeFiles/onnxruntime_common.dir/workspace/onnxruntime/onnxruntime/core/common/logging/sinks/ostream_sink.cc.o
[ 18%] Building CXX object CMakeFiles/onnxruntime_common.dir/workspace/onnxruntime/onnxruntime/core/common/path.cc.o
[ 18%] Building CXX object CMakeFiles/onnxruntime_common.dir/workspace/onnxruntime/onnxruntime/core/common/profiler.cc.o
[ 18%] Building CXX object CMakeFiles/onnxruntime_common.dir/workspace/onnxruntime/onnxruntime/core/common/status.cc.o
[ 18%] Building CXX object CMakeFiles/onnxruntime_common.dir/workspace/onnxruntime/onnxruntime/core/common/threadpool.cc.o
[ 18%] Building CXX object CMakeFiles/onnxruntime_common.dir/workspace/onnxruntime/onnxruntime/core/platform/env.cc.o
[ 18%] Building CXX object CMakeFiles/onnxruntime_common.dir/workspace/onnxruntime/onnxruntime/core/platform/env_time.cc.o
[ 18%] Building CXX object CMakeFiles/onnxruntime_common.dir/workspace/onnxruntime/onnxruntime/core/platform/logging/make_platform_default_log_sink.cc.o
[ 18%] Building CXX object CMakeFiles/onnxruntime_common.dir/workspace/onnxruntime/onnxruntime/core/platform/path_lib.cc.o
[ 18%] Building CXX object CMakeFiles/onnxruntime_common.dir/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc.o
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc: In function ‘void onnxruntime::{anonymous}::UnmapFile(void*)’:
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:80:9: error: expected unqualified-id before ‘[’ token
auto[err_no, err_msg] = GetSystemError();
^
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:81:61: error: ‘err_no’ was not declared in this scope
LOGS_DEFAULT(ERROR) << "munmap failed. error code: " << err_no << " error msg: " << err_msg;
^
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:81:89: error: ‘err_msg’ was not declared in this scope
LOGS_DEFAULT(ERROR) << "munmap failed. error code: " << err_no << " error msg: " << err_msg;
^
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc: In static member function ‘static void onnxruntime::{anonymous}::FileDescriptorTraits::CleanUp(onnxruntime::{anonymous}::FileDescriptorTraits::Handle)’:
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:91:11: error: expected unqualified-id before ‘[’ token
auto[err_no, err_msg] = GetSystemError();
^
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:92:94: error: ‘err_no’ was not declared in this scope
LOGS_DEFAULT(ERROR) << "Failed to close file descriptor " << h << " - error code: " << err_no << " error msg: " << err_msg;
^
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:92:122: error: ‘err_msg’ was not declared in this scope
LOGS_DEFAULT(ERROR) << "Failed to close file descriptor " << h << " - error code: " << err_no << " error msg: " << err_msg;
^
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc: In function ‘int onnxruntime::{anonymous}::nftw_remove(const char*, const stat*, int, FTW*)’:
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:118:9: error: expected unqualified-id before ‘[’ token
auto[err_no, err_msg] = GetSystemError();
^
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:119:65: error: ‘err_no’ was not declared in this scope
LOGS_DEFAULT(WARNING) << "remove() failed. Error code: " << err_no << " error msg: " << err_msg
^
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:119:93: error: ‘err_msg’ was not declared in this scope
LOGS_DEFAULT(WARNING) << "remove() failed. Error code: " << err_no << " error msg: " << err_msg
^
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc: In constructor ‘onnxruntime::{anonymous}::PosixThread::PosixThread(const char*, int, unsigned int ()(int, Eigen::ThreadPoolInterface), Eigen::ThreadPoolInterface*, const onnxruntime::ThreadOptions&)’:
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:149:11: error: expected unqualified-id before ‘[’ token
auto[err_no, err_msg] = GetSystemError();
^
In file included from /workspace/onnxruntime/onnxruntime/core/platform/env.h:26:0,
from /workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:17:
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:150:59: error: ‘err_no’ was not declared in this scope
ORT_THROW("pthread_attr_init failed, error code: ", err_no, " error msg: ", err_msg);
^
/workspace/onnxruntime/include/onnxruntime/core/common/common.h:171:93: note: in definition of macro ‘ORT_THROW’
throw ::onnxruntime::OnnxRuntimeException(ORT_WHERE_WITH_STACK, ::onnxruntime::MakeString(VA_ARGS))
^
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:150:83: error: ‘err_msg’ was not declared in this scope
ORT_THROW("pthread_attr_init failed, error code: ", err_no, " error msg: ", err_msg);
^
/workspace/onnxruntime/include/onnxruntime/core/common/common.h:171:93: note: in definition of macro ‘ORT_THROW’
throw ::onnxruntime::OnnxRuntimeException(ORT_WHERE_WITH_STACK, ::onnxruntime::MakeString(VA_ARGS))
^
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:155:13: error: expected unqualified-id before ‘[’ token
auto[err_no, err_msg] = GetSystemError();
^
In file included from /workspace/onnxruntime/onnxruntime/core/platform/env.h:26:0,
from /workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:17:
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:156:69: error: ‘err_no’ was not declared in this scope
ORT_THROW("pthread_attr_setstacksize failed, error code: ", err_no, " error msg: ", err_msg);
^
/workspace/onnxruntime/include/onnxruntime/core/common/common.h:171:93: note: in definition of macro ‘ORT_THROW’
throw ::onnxruntime::OnnxRuntimeException(ORT_WHERE_WITH_STACK, ::onnxruntime::MakeString(VA_ARGS))
^
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:156:93: error: ‘err_msg’ was not declared in this scope
ORT_THROW("pthread_attr_setstacksize failed, error code: ", err_no, " error msg: ", err_msg);
^
/workspace/onnxruntime/include/onnxruntime/core/common/common.h:171:93: note: in definition of macro ‘ORT_THROW’
throw ::onnxruntime::OnnxRuntimeException(ORT_WHERE_WITH_STACK, ::onnxruntime::MakeString(VA_ARGS))
^
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:162:11: error: expected unqualified-id before ‘[’ token
auto[err_no, err_msg] = GetSystemError();
^
In file included from /workspace/onnxruntime/onnxruntime/core/platform/env.h:26:0,
from /workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:17:
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:163:56: error: ‘err_no’ was not declared in this scope
ORT_THROW("pthread_create failed, error code: ", err_no, " error msg: ", err_msg);
^
/workspace/onnxruntime/include/onnxruntime/core/common/common.h:171:93: note: in definition of macro ‘ORT_THROW’
throw ::onnxruntime::OnnxRuntimeException(ORT_WHERE_WITH_STACK, ::onnxruntime::MakeString(VA_ARGS))
^
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:163:80: error: ‘err_msg’ was not declared in this scope
ORT_THROW("pthread_create failed, error code: ", err_no, " error msg: ", err_msg);
^
/workspace/onnxruntime/include/onnxruntime/core/common/common.h:171:93: note: in definition of macro ‘ORT_THROW’
throw ::onnxruntime::OnnxRuntimeException(ORT_WHERE_WITH_STACK, ::onnxruntime::MakeString(VA_ARGS))
^
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:172:13: error: expected unqualified-id before ‘[’ token
auto[err_no, err_msg] = GetSystemError();
^
In file included from /workspace/onnxruntime/onnxruntime/core/platform/env.h:26:0,
from /workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:17:
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:173:66: error: ‘err_no’ was not declared in this scope
ORT_THROW("pthread_setaffinity_np failed, error code: ", err_no, " error msg: ", err_msg);
^
/workspace/onnxruntime/include/onnxruntime/core/common/common.h:171:93: note: in definition of macro ‘ORT_THROW’
throw ::onnxruntime::OnnxRuntimeException(ORT_WHERE_WITH_STACK, ::onnxruntime::MakeString(VA_ARGS))
^
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:173:90: error: ‘err_msg’ was not declared in this scope
ORT_THROW("pthread_setaffinity_np failed, error code: ", err_no, " error msg: ", err_msg);
^
/workspace/onnxruntime/include/onnxruntime/core/common/common.h:171:93: note: in definition of macro ‘ORT_THROW’
throw ::onnxruntime::OnnxRuntimeException(ORT_WHERE_WITH_STACK, ::onnxruntime::MakeString(VA_ARGS))
^
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc: In static member function ‘static onnxruntime::common::Status onnxruntime::{anonymous}::PosixEnv::ReportSystemError(const char*, const string&)’:
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:362:9: error: expected unqualified-id before ‘[’ token
auto[err_no, err_msg] = GetSystemError();
^
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:364:69: error: ‘err_msg’ was not declared in this scope
oss << operation_name << " file "" << path << "" failed: " << err_msg;
^
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:365:43: error: ‘err_no’ was not declared in this scope
return common::Status(common::SYSTEM, err_no, oss.str());
^
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc: At global scope:
/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc:57:36: error: ‘std::pair<int, std::__cxx11::basic_string > onnxruntime::{anonymous}::GetSystemError()’ defined but not used [-Werror=unused-function]
static std::pair<int, std::string> GetSystemError() {
^
cc1plus: all warnings being treated as errors
CMakeFiles/onnxruntime_common.dir/build.make:271: recipe for target 'CMakeFiles/onnxruntime_common.dir/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc.o' failed
make[2]: *** [CMakeFiles/onnxruntime_common.dir/workspace/onnxruntime/onnxruntime/core/platform/posix/env.cc.o] Error 1
CMakeFiles/Makefile2:1132: recipe for target 'CMakeFiles/onnxruntime_common.dir/all' failed
make[1]: *** [CMakeFiles/onnxruntime_common.dir/all] Error 2
Makefile:165: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "/workspace/onnxruntime/tools/ci_build/build.py", line 2325, in
sys.exit(main())
File "/workspace/onnxruntime/tools/ci_build/build.py", line 2246, in main
build_targets(args, cmake_path, build_dir, configs, num_parallel_jobs, args.target)
File "/workspace/onnxruntime/tools/ci_build/build.py", line 1175, in build_targets
run_subprocess(cmd_args, env=env)
File "/workspace/onnxruntime/tools/ci_build/build.py", line 625, in run_subprocess
return run(*args, cwd=cwd, capture_stdout=capture_stdout, shell=shell, env=my_env)
File "/workspace/onnxruntime/tools/python/util/run.py", line 45, in run
env=env, shell=shell)
File "/root/anaconda3/envs/onnx/lib/python3.7/subprocess.py", line 468, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/usr/local/bin/cmake', '--build', '/workspace/onnxruntime/build/Linux/Debug', '--config', 'Debug']' returned non-zero exit status 2.
my cuda version: 10.1
cmake version: 3.22.0
python version: 3.7
Why might I be getting this error, can you help with this?
Beta Was this translation helpful? Give feedback.
All reactions