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

setup_Unix.py in LFR not working #10

Open
ahartlba opened this issue Oct 31, 2023 · 3 comments
Open

setup_Unix.py in LFR not working #10

ahartlba opened this issue Oct 31, 2023 · 3 comments

Comments

@ahartlba
Copy link

ahartlba commented Oct 31, 2023

Description

The setup_Unix.py (AOS for Own Projects/LFR/python/setup_Unix.py) script is not working properly (linker-error for glfw and assimp libraries.

I was able to make it work by changing

ext_modules = [Extension(...
                          libraries=["glfw3", "assimp"], ....

to

ext_modules = [Extension(...
                          libraries=["glfw", "assimp"], ....

so this would be my proposal for a bugfix.

Environment

ubuntu22.04 base-docker image + necessary python packages

@codecalypse
Copy link

Thank you for confirmation, I also figured out that this works indeed for building. Very helpful.
However, did you also encountered the issue with:

import pyaos as LFR
ImportError: libglfw.so.3: cannot open shared object file: No such file or directory

even I can confirm that the file libglfw.so.3 is located in the /usr/lib directory?
I am currently not sure why this is happening.

I will try now to build the libglfw once more. (x11 for manjaro linux)

@codecalypse
Copy link

Ok, I tried to install also the 32-bit versions of the library and point the linker to that files (usr/lib32).
sadly he writes out, to skip them and ends up with the 64-bit versions again (usr/lib).

Here are the last few lines of the output of setup_Unix:

g++ -pthread -B /home/nidhoeggr/miniconda3/envs/cv2023/compiler_compat -Wl,--sysroot=/ -pthread -shared -B /home/nidhoeggr/miniconda3/envs/cv2023/compiler_compat -L/home/nidhoeggr/miniconda3/envs/cv2023/lib -Wl,-rpath=/home/nidhoeggr/miniconda3/envs/cv2023/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-cpython-37/../src/AOS.o build/temp.linux-x86_64-cpython-37/../src/gl_utils.o build/temp.linux-x86_64-cpython-37/../src/glad.o build/temp.linux-x86_64-cpython-37/../src/image.o build/temp.linux-x86_64-cpython-37/../src/utils.o build/temp.linux-x86_64-cpython-37/pyaos.o -L/usr/lib32 -lglfw -lassimp -o "/home/nidhoeggr/JKU/UE_CV/AOS/AOS for Drone Swarms/LFR/python/pyaos.cpython-37m-x86_64-linux-gnu.so"
/usr/bin/ld: skipping incompatible /usr/lib32/libglfw.so when searching for -lglfw
/usr/bin/ld: skipping incompatible /usr/lib32/libassimp.so when searching for -lassimp
/usr/bin/ld: skipping incompatible /usr/lib32/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib32/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib32/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib32/libc.a when searching for -lc

with the directory pointing directly to /usr/lib, g++ command is the only thing I get in the end of the script.
Nothing changes, the ImportError remains.
Any suggestion is highly appreciated.

@codecalypse
Copy link

Update:
I did copy the .so-files into the LFR/lib folder.
added runtime_library_dirs=["../lib"] in the setup_unix file
installd dependancy of assimp:

conda install -c conda-forge gcc=12.1.0

not it works.
Maybe i was wrong adding the libs on the host /usr/lib directory.
But now it works. Maybe this can proof useful to someone else.

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