Onnx-tensorrt: x86_64-linux-gnu-g++: error: build/libnvonnxparser.so: No such file or directory

Created on 1 Mar 2019  路  7Comments  路  Source: onnx/onnx-tensorrt

When I install the Python module by
"python3 setup.py build"

I get the problems:
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c nv_onnx_parser_bindings_wrap.cpp -o build/temp.linux-x86_64-3.5/nv_onnx_parser_bindings_wrap.o -std=c++11 -DUNIX -D__UNIX -m64 -fPIC -O2 -w -fmessage-length=0 -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -DNDEBUG -g -fwrapv -Wall -DSWIG
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.5/nv_onnx_parser_bindings_wrap.o build/libnvonnxparser.so -o build/lib.linux-x86_64-3.5/onnx_tensorrt/parser/_nv_onnx_parser_bindings.cpython-35m-x86_64-linux-gnu.so
x86_64-linux-gnu-g++:
error: build/libnvonnxparser.so: No such file or directory error: command 'x86_64-linux-gnu-g++' failed with exit status

Any cues would be appreciated!

question triaged

Most helpful comment

You should specify correct location of libnvonnxparser.so in setup.py.

  1. Find the location of libnvonnxparser.so by running following command:
locate libnvonnxparser.so
  1. The output will look like as below:
    > /usr/lib/x86_64-linux-gnu/libnvonnxparser.so
    > /usr/lib/x86_64-linux-gnu/libnvonnxparser.so.6
    > /usr/lib/x86_64-linux-gnu/libnvonnxparser.so.6.0.1
  2. In setup.py, replace the string build/libnvonnxparser.so with /usr/lib/x86_64-linux-gnu/libnvonnxparser.so
  3. Run the script again

All 7 comments

same error

same error

same error

same error

You should specify correct location of libnvonnxparser.so in setup.py.

  1. Find the location of libnvonnxparser.so by running following command:
locate libnvonnxparser.so
  1. The output will look like as below:
    > /usr/lib/x86_64-linux-gnu/libnvonnxparser.so
    > /usr/lib/x86_64-linux-gnu/libnvonnxparser.so.6
    > /usr/lib/x86_64-linux-gnu/libnvonnxparser.so.6.0.1
  2. In setup.py, replace the string build/libnvonnxparser.so with /usr/lib/x86_64-linux-gnu/libnvonnxparser.so
  3. Run the script again

You should specify correct location of libnvonnxparser.so in setup.py.

  1. Find the location of libnvonnxparser.so by running following command:
locate libnvonnxparser.so
  1. The output will look like as below:

/usr/lib/x86_64-linux-gnu/libnvonnxparser.so
/usr/lib/x86_64-linux-gnu/libnvonnxparser.so.6
/usr/lib/x86_64-linux-gnu/libnvonnxparser.so.6.0.1

  1. In setup.py, replace the string build/libnvonnxparser.so with /usr/lib/x86_64-linux-gnu/libnvonnxparser.so
  2. Run the script again

Thanks for your solution! It is helpful.

Thanks @SuJiaKuan for answering the question and solving this problem. Closing this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aif2017 picture aif2017  路  3Comments

felixplum picture felixplum  路  7Comments

cloudrivers picture cloudrivers  路  6Comments

CNSaintNeo picture CNSaintNeo  路  9Comments

omeralierdemir picture omeralierdemir  路  6Comments