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

[Bug Report] Bug Report: Missing .so File in Build Output #33

Closed
pedrobiqua opened this issue Jan 5, 2025 · 0 comments · Fixed by #34
Closed

[Bug Report] Bug Report: Missing .so File in Build Output #33

pedrobiqua opened this issue Jan 5, 2025 · 0 comments · Fixed by #34
Assignees
Labels
bug Something isn't working

Comments

@pedrobiqua
Copy link
Collaborator

Description

The library is installed without issues, but running the code results in an error due to the shared object file (libsearch_engine.so) not being copied during the build process. This causes an ImportError when attempting to use the library.

Expected Behavior: The .so file should be included in the installation process so the library functions properly.
Actual Behavior: The .so file is missing, leading to runtime errors.


Steps to Reproduce

  1. Clone the repository and install the library using pip install . or a similar command.
  2. Run a script that imports the library, e.g., from search_engine_cpp.crawler import Crawler.
  3. Observe the ImportError caused by the missing .so file.

Expected Behavior

The shared object file (libsearch_engine.so) should be copied to the appropriate directory during the build process, allowing the library to function without manual intervention.


Actual Behavior

The following error is encountered when running the library:

Traceback (most recent call last):
  File "/home/pedro/projects/teste_search_engine/main.py", line 3, in <module>
    from search_engine_cpp.crawler import Crawler
  File "/home/pedro/projects/teste_search_engine/venv/lib/python3.13/site-packages/search_engine_cpp/crawler.py", line 2, in <module>
    from _page_rank import PyGraph
ImportError: libsearch_engine.so: cannot open shared object file: No such file or directory

Manually copying the .so file resolves the issue temporarily.


Environment

  • Compiler: GCC
  • Compiler Version: 11.3.0
  • Operating System: Ubuntu 22.04
  • C++ Standard: C++20

Logs or Screenshots

Error message:

ImportError: libsearch_engine.so: cannot open shared object file: No such file or directory

Additional Information

The build process should be updated to ensure the .so file is included in the installation directory automatically. This could involve modifying the setup.py file or the relevant build scripts.

@pedrobiqua pedrobiqua added the bug Something isn't working label Jan 5, 2025
@pedrobiqua pedrobiqua self-assigned this Jan 5, 2025
@pedrobiqua pedrobiqua linked a pull request Jan 6, 2025 that will close this issue
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant