forked from facebookresearch/fastText
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
I get the following error when the C++ is being built by pip:
c++ -pthread -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -fPIC -fPIC -I/tmp/pip-build-env-wp2xuhpq/overlay/lib/python3.13/site-packages/pybind11/include -I/tmp/pip-build-env-wp2xuhpq/overlay/lib/python3.13/site-packages/pybind11/include -Isrc -I/tmp/venv2/include -I/home/dvisser/.local/share/uv/python/cpython-3.13.5-linux-x86_64-gnu/include/python3.13 -c src/args.cc -o build/temp.linux-x86_64-cpython-313/src/args.o -DVERSION_INFO=\"0.10.5\" -std=c++11 -fvisibility=hidden
src/args.cc: In member function ‘void fasttext::Args::parseArgs(const std::vector<std::__cxx11::basic_string<char> >&)’:
src/args.cc:132:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string<char> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
132 | for (int ai = 2; ai < args.size(); ai += 2) {
| ~~~^~~~~~~~~~~~~
src/args.cc:250:19: warning: catching polymorphic type ‘class std::out_of_range’ by value [-Wcatch-value=]
250 | } catch (std::out_of_range) {
| ^~~~~~~~~~~~
src/args.cc: In member function ‘int64_t fasttext::Args::getAutotuneModelSize() const’:
src/args.cc:512:3: error: ‘uint64_t’ was not declared in this scope
512 | uint64_t multiplier = 1;
| ^~~~~~~~
src/args.cc:17:1: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
16 | #include <unordered_map>
+++ |+#include <cstdint>
17 |
src/args.cc:515:5: error: ‘multiplier’ was not declared in this scope
515 | multiplier = units[lastCharacter];
| ^~~~~~~~~~
src/args.cc:518:11: error: expected ‘;’ before ‘size’
518 | uint64_t size = 0;
| ^~~~~
| ;
src/args.cc:522:5: error: ‘size’ was not declared in this scope
522 | size = std::stol(modelSize, &nonNumericCharacter);
| ^~~~
src/args.cc:534:10: error: ‘size’ was not declared in this scope
534 | return size * multiplier;
| ^~~~
src/args.cc:534:17: error: ‘multiplier’ was not declared in this scope
534 | return size * multiplier;
| ^~~~~~~~~~
error: command '/usr/bin/c++' 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 floret
Failed to build floret
ERROR: Failed to build installable wheels for some pyproject.toml based projects (floret)
The #include <cstdint>
suggestion seems legitimate. I don't see how args.cc would compile without it.
Also, I see in the following line in CMakeLists.txt, which references a folder that isn't even in the source tarball:
include_directories(fasttext)
4lfredoSH
Metadata
Metadata
Assignees
Labels
No labels