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: compilation error on test.cpp #512

Open
3 tasks done
adolfogc opened this issue Oct 27, 2024 · 3 comments
Open
3 tasks done

Bug: compilation error on test.cpp #512

adolfogc opened this issue Oct 27, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@adolfogc
Copy link
Contributor

Describe the bug

1.251 FAILED: cpp/CMakeFiles/test_cpp.dir/test.cpp.o 
1.251 /usr/local/bin/clang++ -DUSEARCH_USE_FP16LIB=0 -DUSEARCH_USE_OPENMP=1 -DUSEARCH_USE_SIMSIMD=1 -I/usearch/include -I/usearch/fp16/include -I/usearch/simsimd/include -I/usearch/cpp/../stringzilla/include --target=aarch64-amazon-linux -march=armv8.2-a+crypto -mtune=neoverse-n1 -mcpu=neoverse-n1+crypto -O3 -DNDEBUG -std=gnu++17 -O3 -ffast-math -fPIC -pedantic -Wfatal-errors -fcolor-diagnostics -Wno-vla -Wno-unused-function -Wno-cast-function-type -fopenmp=libomp -MD -MT cpp/CMakeFiles/test_cpp.dir/test.cpp.o -MF cpp/CMakeFiles/test_cpp.dir/test.cpp.o.d -o cpp/CMakeFiles/test_cpp.dir/test.cpp.o -c /usearch/cpp/test.cpp
1.251 In file included from /usearch/cpp/test.cpp:23:
1.251 /usearch/cpp/../stringzilla/include/stringzilla/stringzilla.hpp:1029:9: fatal error: cannot assign to non-static data member within const member function 'operator++'
1.251  1029 |         --ptr_;
1.251       |         ^ ~~~~
1.251 /usearch/cpp/../stringzilla/include/stringzilla/stringzilla.hpp:1027:27: note: member function 'ashvardanian::stringzilla::reversed_iterator_for::operator++' is declared const here
1.251  1027 |     reversed_iterator_for operator++(int) const noexcept {
1.251       |     ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.251 1 error generated.
1.251 ninja: build stopped: subcommand failed.

Steps to reproduce

RUN git clone --depth 1 --branch v2.15.3 https://github.com/unum-cloud/usearch.git
RUN cd usearch && git submodule update --init --recursive

RUN cd usearch && \
    mkdir build && \
    cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_EXE_LINKER_FLAGS="${LD_FLAGS}" \
        -DCMAKE_C_FLAGS="${C_FLAGS}" \
        -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" \
        -DUSEARCH_INSTALL=ON \
        -DUSEARCH_USE_OPENMP=ON \
        -DUSEARCH_USE_SIMSIMD=ON \
        -DUSEARCH_USE_FP16LIB=OFF \
        -USEARCH_BUILD_TEST_CPP=OFF \
        -DUSEARCH_BUILD_BENCH_CPP=OFF && \
    ninja -C build -j10 && \
    ninja -C build install

Expected behavior

Compiles without errors.

USearch version

2.15.3

Operating System

arm64v8/amazonlinux:2023

Hardware architecture

Arm

Which interface are you using?

C++ implementation

Contact Details

No response

Are you open to being tagged as a contributor?

  • I am open to being mentioned in the project .git history as a contributor

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct
@adolfogc adolfogc added the bug Something isn't working label Oct 27, 2024
@adolfogc
Copy link
Contributor Author

Using Clang 19.1.2.

@adolfogc
Copy link
Contributor Author

The issue resolves by checking out a newer version of Stringzilla (i.e. 0f762add5dc3da13dbe650fb46533777f0821f4a). Is there a reason for using 91d0a1a02faae90a41c60a30855d5935eb3eaef1 instead of a newer release?

@ashvardanian
Copy link
Contributor

This is quite weird, will check! Thank you, @adolfogc!

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

No branches or pull requests

2 participants