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

Fail to install using pip (gcc compile time error) #10

Open
inarighas opened this issue Jul 1, 2023 · 0 comments
Open

Fail to install using pip (gcc compile time error) #10

inarighas opened this issue Jul 1, 2023 · 0 comments

Comments

@inarighas
Copy link

When installing fastwer-0-13 using pip, building wheels for the package breaks because of a subprocess-exited-with-error.

Full error:

>> $ pip install pybind11 fastwer

Requirement already satisfied: pybind11 in ./.venv/lib64/python3.11/site-packages (2.10.4)
Collecting fastwer
  Using cached fastwer-0.1.3.tar.gz (4.6 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: fastwer
  Building wheel for fastwer (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [107 lines of output]
      running bdist_wheel
      running build
      running build_py
      running build_ext
      creating tmp
      gcc -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/home/inarighas/Projects/voice-transcript/.venv/include -I/usr/include/python3.11 -c /tmp/tmp7ny4ljxj.cpp -o tmp/tmp7ny4ljxj.o -std=c++17
      gcc -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/home/inarighas/Projects/voice-transcript/.venv/include -I/usr/include/python3.11 -c /tmp/tmprbaqr7r2.cpp -o tmp/tmprbaqr7r2.o -fvisibility=hidden
      building 'fastwer' extension
      creating build
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/src
      gcc -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/home/inarighas/Projects/voice-transcript/.venv/lib64/python3.11/site-packages/pybind11/include -I/home/inarighas/Projects/voice-transcript/.venv/lib64/python3.11/site-packages/pybind11/include -I/home/inarighas/Projects/voice-transcript/.venv/include -I/usr/include/python3.11 -c src/bindings.cpp -o build/temp.linux-x86_64-cpython-311/src/bindings.o -DVERSION_INFO=\"0.1.3\" -std=c++17 -fvisibility=hidden
      gcc -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/home/inarighas/Projects/voice-transcript/.venv/lib64/python3.11/site-packages/pybind11/include -I/home/inarighas/Projects/voice-transcript/.venv/lib64/python3.11/site-packages/pybind11/include -I/home/inarighas/Projects/voice-transcript/.venv/include -I/usr/include/python3.11 -c src/fastwer.cpp -o build/temp.linux-x86_64-cpython-311/src/fastwer.o -DVERSION_INFO=\"0.1.3\" -std=c++17 -fvisibility=hidden
      In file included from src/fastwer.cpp:1:
      src/fastwer.hpp:19:38: error: ‘uint8_t’ has not been declared
         19 |     double round_to_digits(double d, uint8_t digits = 4);
            |                                      ^~~~~~~
      src/fastwer.hpp:21:10: error: ‘uint32_t’ was not declared in this scope
         21 |     pair<uint32_t, uint32_t> compute(string &hypo, string &ref, bool char_level = false);
            |          ^~~~~~~~
      src/fastwer.hpp:9:1: note: ‘uint32_t’ is defined in header ‘<cstdint>; did you forget to ‘#include <cstdint>’?
          8 | #include <cassert>
        +++ |+#include <cstdint>
          9 |
      src/fastwer.hpp:21:20: error: ‘uint32_t’ was not declared in this scope
         21 |     pair<uint32_t, uint32_t> compute(string &hypo, string &ref, bool char_level = false);
            |                    ^~~~~~~~
      src/fastwer.hpp:21:20: note: ‘uint32_t’ is defined in header ‘<cstdint>; did you forget to ‘#include <cstdint>’?
      src/fastwer.hpp:21:28: error: template argument 1 is invalid
         21 |     pair<uint32_t, uint32_t> compute(string &hypo, string &ref, bool char_level = false);
            |                            ^
      src/fastwer.hpp:21:28: error: template argument 2 is invalid
      src/fastwer.cpp:14:43: error: ‘uint8_t’ has not been declared
         14 | double fastwer::round_to_digits(double d, uint8_t digits) {
            |                                           ^~~~~~~
      src/fastwer.cpp:20:7: error: ‘uint32_t’ was not declared in this scope
         20 | pair <uint32_t, uint32_t> fastwer::compute(string &hypo, string &ref, bool char_level) {
            |       ^~~~~~~~
      src/fastwer.cpp:2:1: note: ‘uint32_t’ is defined in header ‘<cstdint>; did you forget to ‘#include <cstdint>’?
          1 | #include "fastwer.hpp"
        +++ |+#include <cstdint>
          2 |
      src/fastwer.cpp:20:17: error: ‘uint32_t’ was not declared in this scope
         20 | pair <uint32_t, uint32_t> fastwer::compute(string &hypo, string &ref, bool char_level) {
            |                 ^~~~~~~~
      src/fastwer.cpp:20:17: note: ‘uint32_t’ is defined in header ‘<cstdint>; did you forget to ‘#include <cstdint>’?
      src/fastwer.cpp:20:25: error: template argument 1 is invalid
         20 | pair <uint32_t, uint32_t> fastwer::compute(string &hypo, string &ref, bool char_level) {
            |                         ^
      src/fastwer.cpp:20:25: error: template argument 2 is invalid
      src/fastwer.cpp: In function ‘int fastwer::compute(std::string&, std::string&, bool)’:
      src/fastwer.cpp:25:5: error: ‘uint32_t’ was not declared in this scope
         25 |     uint32_t m = hypo_tokens.size() + 1, n = ref_tokens.size() + 1;
            |     ^~~~~~~~
      src/fastwer.cpp:25:5: note: ‘uint32_t’ is defined in header ‘<cstdint>; did you forget to ‘#include <cstdint>’?
      src/fastwer.cpp:26:20: error: template argument 2 is invalid
         26 |     vector<uint32_t> f(m * n);
            |                    ^
      src/fastwer.cpp:26:24: error: ‘m’ was not declared in this scope
         26 |     vector<uint32_t> f(m * n);
            |                        ^
      src/fastwer.cpp:26:28: error: ‘n’ was not declared in this scope
         26 |     vector<uint32_t> f(m * n);
            |                            ^
      src/fastwer.cpp:32:21: error: expected ‘;’ before ‘matching_case’
         32 |             uint32_t matching_case = f[(i - 1) * n + (j - 1)] + (hypo_tokens[i - 1] == ref_tokens[j - 1] ? 0 : 1);
            |                     ^~~~~~~~~~~~~~
            |                     ;
      src/fastwer.cpp:33:46: error: ‘matching_case’ was not declared in this scope
         33 |             f[i * n + j] = min(f[i * n + j], matching_case);
            |                                              ^~~~~~~~~~~~~
      src/fastwer.cpp: In function ‘double fastwer::score_sent(std::string&, std::string&, bool)’:
      src/fastwer.cpp:40:10: error: ‘uint32_t’ was not declared in this scope
         40 |     pair<uint32_t, uint32_t> stats = fastwer::compute(hypo, ref, char_level);
            |          ^~~~~~~~
      src/fastwer.cpp:40:10: note: ‘uint32_t’ is defined in header ‘<cstdint>; did you forget to ‘#include <cstdint>’?
      src/fastwer.cpp:40:28: error: template argument 1 is invalid
         40 |     pair<uint32_t, uint32_t> stats = fastwer::compute(hypo, ref, char_level);
            |                            ^
      src/fastwer.cpp:41:56: error: request for member ‘first’ in ‘stats’, which is of non-class type ‘int’
         41 |     return fastwer::round_to_digits(100 * double(stats.first) / stats.second, 4);
            |                                                        ^~~~~
      src/fastwer.cpp:41:71: error: request for member ‘second’ in ‘stats’, which is of non-class type ‘int’
         41 |     return fastwer::round_to_digits(100 * double(stats.first) / stats.second, 4);
            |                                                                       ^~~~~~
      src/fastwer.cpp: In function ‘double fastwer::score(std::vector<std::__cxx11::basic_string<char> >&, std::vector<std::__cxx11::basic_string<char> >&, bool)’:
      src/fastwer.cpp:47:17: error: ‘uint32_t’ was not declared in this scope
         47 |     vector<pair<uint32_t, uint32_t>> stats(n_examples);
            |                 ^~~~~~~~
      src/fastwer.cpp:47:17: note: ‘uint32_t’ is defined in header ‘<cstdint>; did you forget to ‘#include <cstdint>’?
      src/fastwer.cpp:47:27: error: template argument 1 is invalid
         47 |     vector<pair<uint32_t, uint32_t>> stats(n_examples);
            |                           ^~~~~~~~
      src/fastwer.cpp:47:35: error: template argument 1 is invalid
         47 |     vector<pair<uint32_t, uint32_t>> stats(n_examples);
            |                                   ^~
      src/fastwer.cpp:47:35: error: template argument 2 is invalid
      src/fastwer.cpp:50:15: error: request for member ‘push_back’ in ‘stats’, which is of non-class type ‘int’
         50 |         stats.push_back(fastwer::compute(hypo[i], ref[i], char_level));
            |               ^~~~~~~~~
      src/fastwer.cpp:51:30: error: request for member ‘back’ in ‘stats’, which is of non-class type ‘int’
         51 |         total_edits += stats.back().first;
            |                              ^~~~
      src/fastwer.cpp:52:32: error: request for member ‘back’ in ‘stats’, which is of non-class type ‘int’
         52 |         total_lengths += stats.back().second;
            |                                ^~~~
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for fastwer
  Running setup.py clean for fastwer
Failed to build fastwer
ERROR: Could not build wheels for fastwer, which is required to install pyproject.toml-based projects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant