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

Fixing the opensearch-build issue happening due to lower version of gcc. #976

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

navneet1v
Copy link
Collaborator

Description

Fixing the opensearch-build issue happening due to lower version of gcc.

Jenkins link: https://build.ci.opensearch.org/blue/organizations/jenkins/distribution-build-opensearch/detail/distribution-build-opensearch/8108/pipeline/129/

Consolidate compiler generated dependencies of target opensearchknn_common

[ 96%] Built target opensearchknn_common

[ 96%] Building CXX object CMakeFiles/opensearchknn_faiss.dir/src/org_opensearch_knn_jni_FaissService.cpp.o

/tmp/tmphvvuwegd/k-NN/jni/src/org_opensearch_knn_jni_FaissService.cpp: In function 'jlong Java_org_opensearch_knn_jni_FaissService_loadIndex(JNIEnv*, jclass, jstring)':

/tmp/tmphvvuwegd/k-NN/jni/src/org_opensearch_knn_jni_FaissService.cpp:75:12: warning: converting to non-pointer type 'long int' from NULL [-Wconversion-null]

     return NULL;

            ^

[100%] Building CXX object CMakeFiles/opensearchknn_faiss.dir/src/faiss_wrapper.cpp.o

/tmp/tmphvvuwegd/k-NN/jni/src/faiss_wrapper.cpp: In function 'std::unique_ptr<faiss::SearchParameters> buildSearchParams(const IndexIDMap*, faiss::IDSelector*)':

/tmp/tmphvvuwegd/k-NN/jni/src/faiss_wrapper.cpp:495:16: error: cannot bind 'std::unique_ptr<faiss::SearchParametersHNSW>' lvalue to 'std::unique_ptr<faiss::SearchParametersHNSW>&&'

         return hnswParams;

                ^

In file included from /usr/include/c++/4.8.2/memory:81:0,

                 from /tmp/tmphvvuwegd/k-NN/jni/external/faiss/faiss/IndexIVF.h:14,

                 from /tmp/tmphvvuwegd/k-NN/jni/external/faiss/faiss/IndexScalarQuantizer.h:17,

                 from /tmp/tmphvvuwegd/k-NN/jni/external/faiss/faiss/IndexHNSW.h:16,

                 from /tmp/tmphvvuwegd/k-NN/jni/src/faiss_wrapper.cpp:18:

/usr/include/c++/4.8.2/bits/unique_ptr.h:169:2: error:   initializing argument 1 of 'std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Up = faiss::SearchParametersHNSW; _Ep = std::default_delete<faiss::SearchParametersHNSW>; <template-parameter-2-3> = void; _Tp = faiss::SearchParameters; _Dp = std::default_delete<faiss::SearchParameters>]'

  unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept

  ^

/tmp/tmphvvuwegd/k-NN/jni/src/faiss_wrapper.cpp:504:16: error: cannot bind 'std::unique_ptr<faiss::SearchParametersIVF>' lvalue to 'std::unique_ptr<faiss::SearchParametersIVF>&&'

         return ivfParams;

                ^

In file included from /usr/include/c++/4.8.2/memory:81:0,

                 from /tmp/tmphvvuwegd/k-NN/jni/external/faiss/faiss/IndexIVF.h:14,

                 from /tmp/tmphvvuwegd/k-NN/jni/external/faiss/faiss/IndexScalarQuantizer.h:17,

                 from /tmp/tmphvvuwegd/k-NN/jni/external/faiss/faiss/IndexHNSW.h:16,

                 from /tmp/tmphvvuwegd/k-NN/jni/src/faiss_wrapper.cpp:18:

/usr/include/c++/4.8.2/bits/unique_ptr.h:169:2: error:   initializing argument 1 of 'std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Up = faiss::SearchParametersIVF; _Ep = std::default_delete<faiss::SearchParametersIVF>; <template-parameter-2-3> = void; _Tp = faiss::SearchParameters; _Dp = std::default_delete<faiss::SearchParameters>]'

  unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept

  ^

make[3]: *** [CMakeFiles/opensearchknn_faiss.dir/src/faiss_wrapper.cpp.o] Error 1

make[2]: *** [CMakeFiles/opensearchknn_faiss.dir/all] Error 2

make[1]: *** [CMakeFiles/opensearchknn_faiss.dir/rule] Error 2

make: *** [opensearchknn_faiss] Error 2


Issues Resolved

#975

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed as per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@navneet1v navneet1v merged commit 54a75c1 into opensearch-project:main Jul 12, 2023
11 of 38 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 12, 2023
…cc. (#976)

Signed-off-by: Navneet Verma <[email protected]>
(cherry picked from commit 54a75c1)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 12, 2023
…cc. (#976)

Signed-off-by: Navneet Verma <[email protected]>
(cherry picked from commit 54a75c1)
navneet1v added a commit that referenced this pull request Jul 12, 2023
…cc. (#976) (#978)

Signed-off-by: Navneet Verma <[email protected]>
(cherry picked from commit 54a75c1)

Co-authored-by: Navneet Verma <[email protected]>
navneet1v added a commit that referenced this pull request Jul 12, 2023
…cc. (#976) (#977)

Signed-off-by: Navneet Verma <[email protected]>
(cherry picked from commit 54a75c1)

Co-authored-by: Navneet Verma <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants