microsoft / onnxruntime

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
https://onnxruntime.ai
MIT License
14.69k stars 2.93k forks source link

descriptor_table_tensorboard_2fcompat_2fproto_2fattr_5fvalue_2eproto not declared (TRT 8.5.0) #15131

Open sl1pkn07 opened 1 year ago

sl1pkn07 commented 1 year ago

Hi.

onnxruntime 1.14.1

[ 17%] Building CXX object tensorboard/compat/proto/CMakeFiles/tensorboard.dir/api_def.pb.cc.o
cd /tmp/makepkg/python-onnxruntime/src/build/tensorboard/compat/proto && /opt/cuda/bin/g++ -DEIGEN_MPL2_ONLY -DENABLE_STRIDED_TENSORS -DENABLE_TRAINING -DENABLE_TRAINING_APIS -DENABLE_TRAINING_CORE -DENABLE_TRAINING_OPS -DORT_ENABLE_STREAM -DORT_USE_NCCL=1 -DPROTOBUF_USE_DLLS -DUSE_MPI=1 -DUSE_NCCL_P2P=1 -I/tmp/makepkg/python-onnxruntime/src/onnxruntime/include/onnxruntime -I/tmp/makepkg/python-onnxruntime/src/onnxruntime/include/onnxruntime/core/session -I/tmp/makepkg/python-onnxruntime/src/onnxruntime/orttraining/orttraining/training_api/include -I/tmp/makepkg/python-onnxruntime/src/build -march=native -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/tmp/makepkg/python-onnxruntime/src=/usr/src/debug/python-onnxruntime -ffunction-sections -fdata-sections -DCPUINFO_SUPPORTED -O2 -g -DNDEBUG -std=gnu++17 -fPIC -MD -MT tensorboard/compat/proto/CMakeFiles/tensorboard.dir/api_def.pb.cc.o -MF CMakeFiles/tensorboard.dir/api_def.pb.cc.o.d -o CMakeFiles/tensorboard.dir/api_def.pb.cc.o -c /tmp/makepkg/python-onnxruntime/src/build/tensorboard/compat/proto/api_def.pb.cc
/tmp/makepkg/python-onnxruntime/src/build/tensorboard/compat/proto/api_def.pb.cc:213:6: error: ‘::descriptor_table_tensorboard_2fcompat_2fproto_2fattr_5fvalue_2eproto’ no se ha declarado
  213 |   &::descriptor_table_tensorboard_2fcompat_2fproto_2fattr_5fvalue_2eproto,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [tensorboard/compat/proto/CMakeFiles/tensorboard.dir/build.make:328: tensorboard/compat/proto/CMakeFiles/tensorboard.dir/api_def.pb.cc.o] Error 1

my system have Protobuf version: 3.21.12.0, and also try to update tensorboard to 2.12.0 in the deps.txt file. untouch deps.txt or ugrade ternsorboard link have the same issue

this happen when try to build the TRT foo things

      -Donnxruntime_USE_TENSORRT=ON
      -Donnxruntime_USE_TENSORRT_BUILTIN_PARSER=ON

if not. builds ok

greetings

snnn commented 1 year ago

Please let me know how "/tmp/makepkg/python-onnxruntime/src/build/tensorboard/compat/proto/api_def.pb.cc" was generated. Show me the full command.

sl1pkn07 commented 1 year ago

how i get that information? is a build or configure process?

sl1pkn07 commented 1 year ago

maybe this?

/tmp/makepkg/python-onnxruntime/src/onnxruntime/cmake/external/protobuf_function.cmake(150):  add_custom_command(OUTPUT ${_generated_srcs} COMMAND ${PROTOC_EXECUTABLE} ARGS --${onnxruntime_protobuf_generate_LANGUAGE}_out ${_dll_export_decl}${CMAKE_CURRENT_BINARY_DIR}/${_src_sub_dir} ${_protobuf_include_path} ${_abs_file} DEPENDS ${_abs_file} ${PROTOC_DEPS} COMMENT Running ${onnxruntime_protobuf_generate_LANGUAGE} protocol buffer (full) compiler on ${_proto} VERBATIM )

EDIT:

/tmp/makepkg/python-onnxruntime/src/onnxruntime/cmake/external/protobuf_function.cmake(150):  add_custom_command(OUTPUT /tmp/makepkg/python-onnxruntime/src/build/tensorboard/compat/proto/api_def.pb.h;/tmp/makepkg/python-onnxruntime/src/build/tensorboard/compat/proto/api_def.pb.cc COMMAND /usr/bin/protoc ARGS --cpp_out /tmp/makepkg/python-onnxruntime/src/build/tensorboard/compat/proto/ -I;/tmp/makepkg/python-onnxruntime/src/build/_deps/tensorboard-src/tensorboard/compat/proto;-I;/tmp/makepkg/python-onnxruntime/src/build/_deps/tensorboard-src;-I;/src /tmp/makepkg/python-onnxruntime/src/build/_deps/tensorboard-src/tensorboard/compat/proto/api_def.proto DEPENDS /tmp/makepkg/python-onnxruntime/src/build/_deps/tensorboard-src/tensorboard/compat/proto/api_def.proto  COMMENT Running cpp protocol buffer (full) compiler on /tmp/makepkg/python-onnxruntime/src/build/_deps/tensorboard-src/tensorboard/compat/proto/api_def.proto VERBATIM )
snnn commented 1 year ago

Go to the build folder and run:

make clean
make VERBOSE=1 >& build.log 
sl1pkn07 commented 1 year ago

build.log

sorry the LOCALE. i hope this may not a inconvenient

greetings

snnn commented 1 year ago

Running cpp protocol buffer (full) compiler on /tmp/makepkg/python-onnxruntime/src/build/_deps/tensorboard-src/tensorboard/compat/proto/api_def.proto cd /tmp/makepkg/python-onnxruntime/src/build/tensorboard/compat/proto && /usr/bin/protoc --cpp_out /tmp/makepkg/python-onnxruntime/src/build/tensorboard/compat/proto/ -I /tmp/makepkg/python-onnxruntime/src/build/_deps/tensorboard-src/tensorboard/compat/proto -I /tmp/makepkg/python-onnxruntime/src/build/_deps/tensorboard-src -I /src /tmp/makepkg/python-onnxruntime/src/build/_deps/tensorboard-src/tensorboard/compat/proto/api_def.proto

snnn commented 1 year ago

If you run

/usr/bin/protoc -v

What does it say?

snnn commented 1 year ago

And why do you use "/opt/cuda/bin/g++"? What's that? The complier may have some builtin include dirs that I don't know.

sl1pkn07 commented 1 year ago

gcc thing is only a symlink to cuda compatible gcc. in my case, gcc 12

https://github.com/archlinux/svntogit-community/blob/c01860bd4d999a35baadd317e6c67b04749d680f/trunk/PKGBUILD#L103-L106

output of that command when back to home

sl1pkn07 commented 1 year ago

@snnn oh. sorry, now understand what you say

cd /tmp/makepkg/python-onnxruntime/src/build/tensorboard/compat/proto && /usr/bin/protoc --cpp_out /tmp/makepkg/python-onnxruntime/src/build/tensorboard/compat/proto/ -I /tmp/makepkg/python-onnxruntime/src/build/_deps/tensorboard-src/tensorboard/compat/proto -I /tmp/makepkg/python-onnxruntime/src/build/_deps/tensorboard-src -I /src /tmp/makepkg/python-onnxruntime/src/build/_deps/tensorboard-src/tensorboard/compat/proto/api_def.proto
/src: warning: directory does not exist.

that src directory not exist

EDIT: removing the -I src flag, the files generated is equal as without removal the -I src flag'

protoc -v say

└───╼  protoc -v
Missing value for flag: -v
sl1pkn07 commented 1 year ago

Hi. any other hint about this? im stuck here when try to build the tensorrt provider. now with TRT 8.6x (same output like 8.5.x)

greetings

snnn commented 1 year ago

Sorry I have no idea why it happened.

maekawatoshiki commented 1 year ago

I encountered the same problem when building ort with --enable_training.