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

Build fails on i386 and armv7: non-constant-expression cannot be narrowed from type 'unsigned long long' to 'size_t' #8489

Closed
yurivict opened this issue Nov 27, 2022 · 1 comment

Comments

@yurivict
Copy link

[ 76% 55/71] /usr/bin/c++ -DDMLC_LOG_CUSTOMIZE=1 -DXGBOOST_BUILTIN_PREFETCH_PRESENT=1 -DXGBOOST_MM_PREFETCH_PRESENT=1 -D_MWAITXINTRIN_H_INCLUDED -I/wrkdirs/usr/ports/misc/xgboost/work/xgboost-1.7.1/include -I/wrkdirs/usr/ports/misc/xgboost/work/xgboost-1.7.1/dmlc-core/include -I/wrkdirs/usr/ports/misc/xgboost/work/xgboost-1.7.1/rabit/include -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -DNDEBUG -fPIC -funroll-loops -pthread -std=gnu++14 -MD -MT src/CMakeFiles/objxgboost.dir/predictor/cpu_predictor.cc.o -MF src/CMakeFiles/objxgboost.dir/predictor/cpu_predictor.cc.o.d -o src/CMakeFiles/objxgboost.dir/predictor/cpu_predictor.cc.o -c /wrkdirs/usr/ports/misc/xgboost/work/xgboost-1.7.1/src/predictor/cpu_predictor.cc
FAILED: src/CMakeFiles/objxgboost.dir/predictor/cpu_predictor.cc.o
/usr/bin/c++ -DDMLC_LOG_CUSTOMIZE=1 -DXGBOOST_BUILTIN_PREFETCH_PRESENT=1 -DXGBOOST_MM_PREFETCH_PRESENT=1 -D_MWAITXINTRIN_H_INCLUDED -I/wrkdirs/usr/ports/misc/xgboost/work/xgboost-1.7.1/include -I/wrkdirs/usr/ports/misc/xgboost/work/xgboost-1.7.1/dmlc-core/include -I/wrkdirs/usr/ports/misc/xgboost/work/xgboost-1.7.1/rabit/include -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -DNDEBUG -fPIC -funroll-loops -pthread -std=gnu++14 -MD -MT src/CMakeFiles/objxgboost.dir/predictor/cpu_predictor.cc.o -MF src/CMakeFiles/objxgboost.dir/predictor/cpu_predictor.cc.o.d -o src/CMakeFiles/objxgboost.dir/predictor/cpu_predictor.cc.o -c /wrkdirs/usr/ports/misc/xgboost/work/xgboost-1.7.1/src/predictor/cpu_predictor.cc
/wrkdirs/usr/ports/misc/xgboost/work/xgboost-1.7.1/src/predictor/cpu_predictor.cc:167:24: error: non-constant-expression cannot be narrowed from type 'unsigned long long' to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
    size_t non_missing{beg};
                       ^~~
/wrkdirs/usr/ports/misc/xgboost/work/xgboost-1.7.1/src/predictor/cpu_predictor.cc:167:24: note: insert an explicit cast to silence this issue
    size_t non_missing{beg};
                       ^~~
                       static_cast<size_t>( )
1 error generated.

Version: 1.7.1
clang-14
FreeBSD 13.1

@yurivict yurivict changed the title Build fails on i386: non-constant-expression cannot be narrowed from type 'unsigned long long' to 'size_t' Build fails on i386 and armv7: non-constant-expression cannot be narrowed from type 'unsigned long long' to 'size_t' Nov 27, 2022
@hcho3
Copy link
Collaborator

hcho3 commented Jun 6, 2023

See #9035 (comment). We (core maintainers of XGBoost project) decided that XGBoost 2.0+ will not support 32-bit systems.

@hcho3 hcho3 closed this as completed Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants