:boosts_ok_gay:
Can anyone help with this error while compiling nix from source? I'm trying to compile Nix, the package manager and language, inside Termux. Despite every needed library being there, it still gives me this error and i couldn't find out why.
EDIT: do NOT suggest me to use nix-on-droid. it is slow because it's bound by proot.
FAILED: [code=1] src/libutil/libnixutil.so.p/file-descriptor.cc.o
c++ -Isrc/libutil/libnixutil.so.p -Isrc/libutil -I../src/libutil -Isrc/libutil/include -I../src/libutil/include -I../src/libutil/widecharwidth -Isrc/libutil/linux/include -I../src/libutil/linux/include -Isrc/libutil/unix -I../src/libutil/unix -Isrc/libutil/unix/include -I../src/libutil/unix/include -I/data/data/com.termux/files/usr/include -I/usr/local/include -fdiagnostics-color=always -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST -fpch-instantiate-templates -include-pch src/libutil/libnixutil.so.p/precompiled-headers.hh.pch -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++23 -Wdeprecated-copy -Werror=suggest-override -Werror=switch -Werror=switch-enum -Werror=undef -Werror=unused-result -Werror=sign-compare -Wignored-qualifiers -Wimplicit-fallthrough -Wno-deprecated-declarations -fpch-instantiate-templates -fPIC -DBOOST_CONTEXT_DYN_LINK=1 -DBOOST_COROUTINES_DYN_LINK=1 -DBOOST_IOSTREAMS_DYN_LINK=1 -DBOOST_ALL_NO_LIB -pthread -MD -MQ src/libutil/libnixutil.so.p/file-descriptor.cc.o -MF src/libutil/libnixutil.so.p/file-descriptor.cc.o.d -o src/libutil/libnixutil.so.p/file-descriptor.cc.o -c ../src/libutil/file-descriptor.cc
../src/libutil/file-descriptor.cc:116:11: error: no member named 'sync_file_range' in the global namespace
116 | ::sync_file_range(fd, 0, 0, SYNC_FILE_RANGE_WRITE);
| ^~~~~~~~~~~~~~~
../src/libutil/file-descriptor.cc:116:37: error: use of undeclared identifier 'SYNC_FILE_RANGE_WRITE'
116 | ::sync_file_range(fd, 0, 0, SYNC_FILE_RANGE_WRITE);
| ^~~~~~~~~~~~~~~~~~~~~#nix #termux