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

FAISS build break in AIX (PowerPC) #3945

Closed
2 tasks
KamathForAIX opened this issue Oct 14, 2024 · 3 comments
Closed
2 tasks

FAISS build break in AIX (PowerPC) #3945

KamathForAIX opened this issue Oct 14, 2024 · 3 comments

Comments

@KamathForAIX
Copy link
Contributor

Summary

The commit 847cde8 has broken FAISS build in AIX with the following message.

-lfaiss_example_external_module ../lib/libgtest_main.a ../lib/libgtest.a
ld: 0706-006 Cannot find or open library file: -l faiss_example_external_module
        ld:open(): A file or directory in the path name does not exist.
.ibm-clang: error: linker command failed with exit code 255 (use -v to see invocation)
gmake[2]: *** [tests/CMakeFiles/faiss_test.dir/build.make:552: tests/faiss_test] Error 1
gmake[2]: Leaving directory '/home/buildusr/jenkins/workspace/faiss-openxl/faiss/build'
gmake[1]: *** [CMakeFiles/Makefile2:1890: tests/CMakeFiles/faiss_test.dir/all] Error 2
gmake[1]: Leaving directory '/home/buildusr/jenkins/workspace/faiss-openxl/faiss/build'
gmake: *** [Makefile:146: all] Error 2

This happened because we do not have the swig module built in AIX, and hence the linker will not be able to find it.

Looking at the code in the commit, it seems like we use it mainly for wrapping python modules. If that is the case, can we avoid linking swig external module to faiss test when FAISS_ENABLE_PYTHON=OFF like shown in the pull request.

Platform

OS: AIX

Faiss version: Master branch

Installed from:

Faiss compilation options:
cmake . -B build -DFAISS_ENABLE_GPU=OFF -DBLA_VENDOR=OpenBLAS -DBLAS_LIBRARIES=${OPENBLAS_PATH_SYS}/lib/libopenblas.so -DLAPACK_LIBRARIES=${OPENBLAS_PATH_SYS}/lib/libopenblas.so -DFAISS_ENABLE_PYTHON=ON -DBUILD_TESTING=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${PWD}/install_dir -DCMAKE_AIX_SHARED_LIBRARY_ARCHIVE=ON

Running on: CPU

  • CPU
  • GPU

Reproduction instructions

Build on AIX with
cmake . -B build -DFAISS_ENABLE_GPU=OFF -DBLA_VENDOR=OpenBLAS -DBLAS_LIBRARIES=${OPENBLAS_PATH_SYS}/lib/libopenblas.so -DLAPACK_LIBRARIES=${OPENBLAS_PATH_SYS}/lib/libopenblas.so -DFAISS_ENABLE_PYTHON=ON -DBUILD_TESTING=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${PWD}/install_dir -DCMAKE_AIX_SHARED_LIBRARY_ARCHIVE=ON

cmake --build build

@kuarora
Copy link
Contributor

kuarora commented Oct 14, 2024

Change is already in. See #3946
Let me know if you're still seeing the issue.

@KamathForAIX
Copy link
Contributor Author

@kuarora Yes, if we merge #3946 then we are good. Thank you.

@mnorris11
Copy link

We reverted the external module change in #3954, so closing the issue.

If/when we re-add it, I will add the logic from your PR #3946.

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

Successfully merging a pull request may close this issue.

3 participants