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

Failed to compile uncertainty_pnp on ubuntu 20.04 using compile_all.sh #126

Open
GiantRabbit12138 opened this issue Oct 15, 2024 · 6 comments

Comments

@GiantRabbit12138
Copy link

Hi, could you please help me with the following issue? @wangg12 @goodfella47 @Rainbowend @lolrudy @tzsombor95
When I compile using the compile_all.sh script, uncertainty_pnp failed to compile successfully. I'm using Ubuntu version 20.04. The error screenshot is as follows:
image
image

@tzsombor95
Copy link
Contributor

@GiantRabbit12138 Maybe your gcc version is not compatible with this code. Try to use 5.4.0 gcc version.

@GiantRabbit12138
Copy link
Author

@GiantRabbit12138 Maybe your gcc version is not compatible with this code. Try to use 5.4.0 gcc version.

@tzsombor95 Thank you for your reply! According to your suggestion, I replaced the original gcc 9.4.0 with gcc 5.4.0. However, the previous error in compiling uncertainty_pnp did not disappear. In addition, packages such as flow and ransac_voting also prompt that the gcc version is too low. In fact, the two errors reported by gcc before only appeared when compiling uncertainty_pnp (i.e. gcc: error: ./lib/libceres.so: No such file or directory and gcc: error: ./lib/libglog.so: No such file or directory) Could you please give me some other suggestions? By the way, my operating system is ubuntu22.04, python version is 3.8, cuda version is 11.6, and pytorch version is 1.13.1.
image
image
image

@tzsombor95
Copy link
Contributor

@GiantRabbit12138 I checked my environment, I have 9.4.0 gcc, so it was a good start. Did you run scripts/install_deps.sh before compile_all.sh script?

@GiantRabbit12138
Copy link
Author

@GiantRabbit12138 I checked my environment, I have 9.4.0 gcc, so it was a good start. Did you run scripts/install_deps.sh before compile_all.sh script?

@tzsombor95 Yes, in order to avoid ignoring some wrong installation information, I executed the installation command line by line(install_depth.sh). However, uncertainty_pnp still failed to compile successfully. Then I started to look at the error content of gcc. It showed that it would use two dynamic library files in the ./lib folder during compilation, but I did not find these two files in the ./lib folder. So I would like to ask how to generate these two files.
image
However, if this was a common problem, I might have found it in the issue, but I didn't find the same problem as mine in the issue, which makes me wonder if there is another reason causing this problem.

@tzsombor95
Copy link
Contributor

Try to follow this instructions: https://github.com/shanice-l/gdrnpp_bop2022/blob/main/docs/INSTALL.md
At the end of this doc, there is a how to install uncertainty pnp (for pvnet)

@GiantRabbit12138
Copy link
Author

Try to follow this instructions: https://github.com/shanice-l/gdrnpp_bop2022/blob/main/docs/INSTALL.md At the end of this doc, there is a how to install uncertainty pnp (for pvnet)

@tzsombor95 Thank you, sir. Following the steps in INSTALL.md, I successfully generated the libceres.so file. As for libglog.so, I used the whereis command to find its directory and created a symbolic link using the sudo ln -s command. Finally, I created a lib directory under the uncertainty_pnp directory and placed these two files in it. The compilation did not report any errors in the end.
The compilation result of the uncertainty_pnp library is:

generating ./_ext.c
(already up-to-date)
the current directory is '/root/gdrnpp_bop2022/core/csrc/uncertainty_pnp'
running build_ext
building '_ext' extension
gcc -pthread -B /root/miniconda3/envs/myconda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/miniconda3/envs/myconda/include/python3.8 -c _ext.c -o ./_ext.o
gcc -pthread -shared -B /root/miniconda3/envs/myconda/compiler_compat -L/root/miniconda3/envs/myconda/lib -Wl,-rpath=/root/miniconda3/envs/myconda/lib -Wl,--no-as-needed -Wl,--sysroot=/ ./_ext.o src/uncertainty_pnp.cpp.o ./lib/libceres.so ./lib/libglog.so -lstdc++ -o ./_ext.cpython-38-x86_64-linux-gnu.so

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants