automl / automl/random_forest_run

Build fails: error: cannot assign to non-static data member 'length' with const-qualified type 'const SizeType' (aka 'const unsigned int')

Open
#81 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
39
Forks
23
PR merge metrics
No merged PRs in 30d

Description

```
cc -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC -I./include -I/usr/local/include/python3.11 -c pyrfr/regression_wrap.cpp -o build/temp.freebsd-14.3-STABLE-amd64-cpython-311/pyrfr/regression_wrap.o -O2 -std=c++11
In file included from pyrfr/regression_wrap.cpp:3367:
In file included from ./include/rfr/trees/k_ary_tree.hpp:26:
In file included from ./include/rfr/forests/regression_forest.hpp:21:
In file included from ./include/cereal/archives/json.hpp:56:
./include/cereal/external/rapidjson/document.h:319:82: error: cannot assign to non-static data member 'length' with const-qualified type 'const SizeType' (aka 'const unsigned int')
319 | GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
| ~~~~~~ ^
./include/cereal/external/rapidjson/document.h:325:20: note: non-static data member 'length' declared const here
325 | const SizeType length; //!< length of the string (excluding the trailing NULL terminator)
| ~~~~~~~~~~~~~~~^~~~~~
In file included from pyrfr/regression_wrap.cpp:3367:
In file included from ./include/rfr/trees/k_ary_tree.hpp:22:
./include/rfr/nodes/k_ary_node.hpp:209:29: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [-Wsign-compare]
209 | for (auto i=0; i, double, double>::print_info' requested here
253 | class k_ary_node_full: public k_ary_node_minimal{
| ^
1 warning and 1 error generated.
error: command '/usr/local/libexec/ccache/cc' failed with exit code 1

ERROR Backend subprocess exited when trying to invoke build_wheel
*** Error code 1
```

Version: 0.9.0
clang-19
FreeBSD 14.3

Contributor guide

No contributing guide indexed for this repository

Research direction

Inspect include/cereal/external/rapidjson/document.h around lines 319-325, then reproduce the reported wheel build with clang-19 on FreeBSD 14.3 using the command shown in the issue. Done means the build completes without the const-qualified member error; the k_ary_node.hpp sign-comparison warning is also noted in the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.