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

factored_vocab.cpp: error: variable 'v' set but not used [-Werror,-Wunused-but-set-variable] #393

Open
AmitMY opened this issue Jul 29, 2022 · 1 comment
Labels

Comments

@AmitMY
Copy link

AmitMY commented Jul 29, 2022

Bug description

make fails out of the box, says

/bergamot-translator/3rd_party/marian-dev/src/data/factored_vocab.cpp:133:20: error: variable 'v' set but not used [-Werror,-Wunused-but-set-variable]
    for (WordIndex v = 0; io::getline(in, line); v++) {
                   ^

How to reproduce

Minimal reproduction in Docker, should take 3-5 minutes to get to the error /emsdk/upstream/emscripten/emmake make -j2

# python required by emcmake
FROM python:3.9.13

RUN apt-get update
RUN apt-get install -y git git-lfs cmake

# WASM prerequisites
RUN git clone https://github.com/emscripten-core/emsdk.git
WORKDIR emsdk
RUN ./emsdk install 3.1.8
RUN ./emsdk activate 3.1.8

# Compile
WORKDIR /
RUN git clone https://github.com/browsermt/bergamot-translator.git
WORKDIR bergamot-translator
RUN mkdir build-wasm

WORKDIR build-wasm
RUN /emsdk/upstream/emscripten/emcmake cmake -DCOMPILE_WASM=on -DWORMHOLE=off ../
RUN /emsdk/upstream/emscripten/emmake make -j2
RUN bash ../wasm/patch-artifacts-import-gemm-module.sh

ENTRYPOINT ["/bin/bash"]
@AmitMY
Copy link
Author

AmitMY commented Aug 5, 2022

More information: This only happens on an arm based macbook. using --platform linux/amd64 the build is substantially slower, but does not fail.

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

No branches or pull requests

1 participant