You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wget https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz
tar -zxf boost_1_75_0.tar.gz
cd boost_1_75_0
./bootstrap.sh --prefix=installed
# This call to b2 will perform some configuration checks including the statx syscall check which will pass successfully
./b2 install variant=debug --without-python --without-iostreams --without-mpi
Write a simple program status_test.cpp that uses a boost::filesystem call that relies on statx:
#include<boost/filesystem/operations.hpp>intmain(int argc, char** argv)
{
boost::filesystem::path FilePath("/etc/fstab");
auto Status = boost::filesystem::status(FilePath);
return0;
}
Compile and run the program (assumes status_test.cpp is in the same directory as the build of boost):
The call to boost::filesystem::status in the sample application was successful and the program returns 0 with no errors.
Actual Behavior
The actual output of the program is a thrown exception with a misleading error message:
terminate called after throwing an instance of 'boost::filesystem::filesystem_error'what(): boost::filesystem::status: Function not implemented: "/etc/fstab"
Aborted (core dumped)
If you step into the call to boost::filesystem::status you will see that the program fails when trying to call the boost::filesystem statx wrapper (boost_1_75_0\libs\filesystem\src\operations.cpp(367)):
It looks like the authors of boost::filesystem are adding a workaround to manually disable statx support if necessary (https://github.com/boostorg/filesystem/blob/develop/build/Jamfile.v2#L66) but that is not available in any released version of boost (1.75.0 or 1.76.0) yet.
Also, it would be preferable to be able to use the same boost binary on WSL and native Ubuntu distributions with performance benefits from using statx.
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Windows Build Number
Microsoft Windows [Version 10.0.19042.985]
WSL Version
Kernel Version
Linux version 4.4.0-19041-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #488-Microsoft Mon Sep 01 13:43:00 PST 2020
Distro Version
Ubuntu 18.04
Other Software
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Boost 1.75.0
Repro Steps
Download, extract and build Boost 1.75.0:
Write a simple program
status_test.cpp
that uses aboost::filesystem
call that relies on statx:Compile and run the program (assumes status_test.cpp is in the same directory as the build of boost):
Expected Behavior
The call to
boost::filesystem::status
in the sample application was successful and the program returns 0 with no errors.Actual Behavior
The actual output of the program is a thrown exception with a misleading error message:
If you step into the call to
boost::filesystem::status
you will see that the program fails when trying to call the boost::filesystem statx wrapper (boost_1_75_0\libs\filesystem\src\operations.cpp(367)):I think the problem is that the WSL kernel headers indicate that
syscall(__NR_statx, ...)
will work but the function is not actually implemented.Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: