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

Where to download libpaddle_inference.so version 2.7 for ubuntu 20? #11763

Closed
richardgohth opened this issue Mar 19, 2024 · 11 comments
Closed

Where to download libpaddle_inference.so version 2.7 for ubuntu 20? #11763

richardgohth opened this issue Mar 19, 2024 · 11 comments
Assignees
Labels
inference this is a inference phase issue. needs investigation this issue needs investigation to either narrow down, or clarify status/close triaged this issue has been looked, and triaged.

Comments

@richardgohth
Copy link

Have downloaded from
https://paddleinference.paddlepaddle.org.cn/master/user_guides/download_lib.html#linux

but is not able to link with my versio 2.7 cpp program.

Where to download libpaddle_inference.so version 2.7 from?
Thank you

@jzhang533
Copy link
Collaborator

PaddleOCR v2.7 is supposed to be compatible with Paddle Inference v2.6, which could be downloaded from this page :
https://www.paddlepaddle.org.cn/inference/v2.6/guides/install/download_lib.html

jzhang533 added a commit to jzhang533/PaddleOCR that referenced this issue Mar 19, 2024
@richardgohth
Copy link
Author

Thank you.
Downloaded 3 versions. all got errors.

/usr/bin/ld: warning: libpaddle2onnx.so.1.0.0rc2, needed by /imps/bin/cam1/libpaddle_inference.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libonnxruntime.so.1.11.1, needed by /imps/bin/cam1/libpaddle_inference.so, not found

@richardgohth
Copy link
Author

richardgohth commented Mar 19, 2024

managed to download libpaddle2onnx and libonnxruntime and compile
but now has run time errors

--- Running analysis [ir_graph_to_program_pass]
I0319 15:49:10.520725 329688 naive_executor.cc:200] --- skip [feed], feed -> x
I0319 15:49:10.522290 329688 naive_executor.cc:200] --- skip [sigmoid_0.tmp_0], fetch -> fetch
I0319 15:49:10.522653 329686 naive_executor.cc:200] --- skip [feed], feed -> x
Process 329432 stopped

  • thread add words_img #19, name = 'idwox_rtsp_sgca', stop reason = signal SIGSEGV: invalid address (fault address: 0x3)
    frame #0: 0x00007fffed7af6f0 libc.so.6`__GI___libc_free(mem=0x000000000000000b) at malloc.c:3104:7
    (lldb) bt
  • thread add words_img #19, name = 'idwox_rtsp_sgca', stop reason = signal SIGSEGV: invalid address (fault address: 0x3)
    • frame #0: 0x00007fffed7af6f0 libc.so.6__GI___libc_free(mem=0x000000000000000b) at malloc.c:3104:7 frame #1: 0x00005555556014f4 idwox_rtsp_sgcarpaddle::DistConfig::~DistConfig(this=0x00007fffb4e4bb98) at paddle_analysis_config.h:157:8
      frame del tmp #2: 0x000055555560152a idwox_rtsp_sgcarpaddle::AnalysisConfig::~AnalysisConfig(this=0x00007fffb4e4b490) at paddle_analysis_config.h:218:22 frame #3: 0x00005555556050ff idwox_rtsp_sgcarPaddleOCR::DBDetector::LoadModel(this=0x00007fffa4000bc0, model_dir="/root/det_model_dir") at ocr_det.cpp:21:24
      (lldb)

using gdb
Thread 21 "idwox_rtsp_sgca" received signal SIGSEGV, Segmentation fault.
--Type for more, q to quit, c to continue without paging--
[Switching to Thread 0x7fffa77fe700 (LWP 335915)]
__GI___libc_free (mem=0xb) at malloc.c:3102
3102 malloc.c: No such file or directory.
(gdb) where
#0 __GI___libc_free (mem=0xb) at malloc.c:3102
#1 0x00005555556014f4 in paddle::DistConfig::~DistConfig() (this=0x7fffa77d6b98, __in_chrg=)
at /paddleocr/paddle_inference/paddle/include/paddle_analysis_config.h:157
#2 0x000055555560152a in paddle::AnalysisConfig::~AnalysisConfig() (this=0x7fffa77d6490, __in_chrg=)
at /paddleocr/paddle_inference/paddle/include/paddle_analysis_config.h:218
#3 0x00005555556050ff in PaddleOCR::DBDetector::LoadModel(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (this=
0x7fff98000bc0, model_dir="/root/det_model_dir") at /paddleocr/newdownload/PaddleOCR/deploy/cpp_infer/src/ocr_det.cpp:21
#4 0x0000000000000000 in ()

@TingquanGao
Copy link
Collaborator

Thank you.

Downloaded 3 versions. all got errors.
/usr/bin/ld: warning: libpaddle2onnx.so.1.0.0rc2, needed by /imps/bin/cam1/libpaddle_inference.so, not found (try using -rpath or -rpath-link) /usr/bin/ld: warning: libonnxruntime.so.1.11.1, needed by /imps/bin/cam1/libpaddle_inference.so, not found

that is warning, and libonnxruntime.so.1.11.1 and libpaddle2onnx.so.1.0.0rc2 are not required.

@TingquanGao
Copy link
Collaborator

could you provide the total log of compiling and runing? that are useful to analyse and solve errors.

@richardgohth
Copy link
Author

richardgohth commented Mar 20, 2024

Hi Mr. Gao,
Thanks for your assistance. Appreciate it.
To reduce the program, we compiled ppocr and run it,
we found the same crash during running.
Our OS is Ubuntu 20.
ppocr.tgz

below debug trace
seems crashed at libc

I0320 10:51:44.409886 408109 memory_optimize_pass.cc:118] The persistable params in main graph are : 4.46894MB
I0320 10:51:44.411602 408109 memory_optimize_pass.cc:246] Cluster name : x  size: 12
I0320 10:51:44.411604 408109 memory_optimize_pass.cc:246] Cluster name : tmp_21  size: 192
I0320 10:51:44.411607 408109 memory_optimize_pass.cc:246] Cluster name : tmp_109  size: 384
I0320 10:51:44.411607 408109 memory_optimize_pass.cc:246] Cluster name : tmp_35  size: 384
I0320 10:51:44.411608 408109 memory_optimize_pass.cc:246] Cluster name : tmp_73  size: 768
I0320 10:51:44.411609 408109 memory_optimize_pass.cc:246] Cluster name : hardswish_81.tmp_0  size: 1536
I0320 10:51:44.411610 408109 memory_optimize_pass.cc:246] Cluster name : tmp_98  size: 1536
I0320 10:51:44.411612 408109 memory_optimize_pass.cc:246] Cluster name : tmp_105  size: 384
I0320 10:51:44.411613 408109 memory_optimize_pass.cc:246] Cluster name : pool2d_1.tmp_0  size: 1536
--- Running analysis [ir_graph_to_program_pass]
I0320 10:51:44.428125 408109 analysis_predictor.cc:1838] ======= optimize end =======
I0320 10:51:44.428782 408109 naive_executor.cc:200] ---  skip [feed], feed -> x

I0320 10:51:44.429445 408109 naive_executor.cc:200] ---  skip [sigmoid_0.tmp_0], fetch -> fetch
Process 408109 stopped
* thread #1, name = 'ppocr', stop reason = signal SIGSEGV: invalid address (fault address: 0x3)
    frame #0: 0x00007fffe0d566f0 libc.so.6`__GI___libc_free(mem=0x000000000000000b) at malloc.c:3104:7
(lldb) bt
* thread #1, name = 'ppocr', stop reason = signal SIGSEGV: invalid address (fault address: 0x3)
  * frame #0: 0x00007fffe0d566f0 libc.so.6`__GI___libc_free(mem=0x000000000000000b) at malloc.c:3104:7
    frame #1: 0x000055555560cd6e ppocr`paddle::DistConfig::~DistConfig(this=0x00007fffffffdb08) at paddle_analysis_config.h:157
    frame #2: 0x000055555560d336 ppocr`paddle::AnalysisConfig::~AnalysisConfig(this=0x00007fffffffd400) at paddle_analysis_config.h:218
    frame #3: 0x000055555561206d ppocr`PaddleOCR::DBDetector::LoadModel(this=0x00005555584bc270, model_dir="KXUU"...) at ocr_det.cpp:21

update:
copied ppocr to ubuntu 18 system
and it was able run

@TingquanGao
Copy link
Collaborator

I am confirming the requirements of the Paddle Inference for OS. What os that ppocr be compiled on?

@richardgohth
Copy link
Author

richardgohth commented Mar 21, 2024 via email

@vivienfanghuagood
Copy link

@xiaoxiaohehe001

jzhang533 added a commit that referenced this issue Mar 27, 2024
@xiaoxiaohehe001
Copy link

xiaoxiaohehe001 commented Mar 27, 2024

@richardgohth Normally, Paddle library is compiled through Centos, so there will be no version issues. Based on your test, the library supports Ubuntu 18, and you can compile it in your environment through the link https://www.paddlepaddle.org.cn/inference/v2.6/guides/install/compile/source_compile_under_Linux.html Thx.

@richardgohth
Copy link
Author

Thanks anyway.

@jzhang533 jzhang533 added triaged this issue has been looked, and triaged. needs investigation this issue needs investigation to either narrow down, or clarify inference this is a inference phase issue. labels Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inference this is a inference phase issue. needs investigation this issue needs investigation to either narrow down, or clarify status/close triaged this issue has been looked, and triaged.
Projects
None yet
Development

No branches or pull requests

6 participants