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
After installing the required GCC build tools on Windows, I run the following command to compile the fastBPE code:
g++ -std=c++11 -pthread -O3 fastBPE/main.cc -IfastBPE -o fast
Here's the output:
In file included from fastBPE/main.cc:1:
fastBPE/fastBPE.hpp:15:10: fatal error: sys/mman.h: No such file or directory
15 |#include <sys/mman.h>| ^~~~~~~~~~~~
compilation terminated.
On trying other alternatives, I get the same error (see below).
Using setup.py
A pre-requisite to run this command (I believe) is we need Cython installed on our system. (ref #27)
Run the following command:
python setup.py install
Here's the output:
running install
C:\Users\rawatsid\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
C:\Users\rawatsid\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running bdist_egg
running egg_info
writing fastBPE.egg-info\PKG-INFO
writing dependency_links to fastBPE.egg-info\dependency_links.txt
writing top-level names to fastBPE.egg-info\top_level.txt
reading manifest file 'fastBPE.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'fastBPE.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
building 'fastBPE' extension
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IfastBPE -IC:\Users\rawatsid\AppData\Local\Programs\Python\Python310\include -IC:\Users\rawatsid\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /TpfastBPE/fastBPE.cpp /Fobuild\temp.win-amd64-cpython-310\Release\fastBPE/fastBPE.obj -std=c++11 -Ofast -pthread
cl : Command line warning D9025 : overriding '/Os' with '/Ot'
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
cl : Command line warning D9002 : ignoring unknown option '-Of'
cl : Command line warning D9002 : ignoring unknown option '-Oa'
cl : Command line warning D9002 : ignoring unknown option '-pthread'
fastBPE.cpp
C:\Users\rawatsid\fastBPE\fastBPE\fastBPE.hpp(15): fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory
error: command'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
The <sys/mman.h> is a Unix header and not available on Windows as the headers under sys are all traditional Unix APIs.
This doesn't seem to work even after using Cygwin for Windows, which actually provides an implementation of mman.h. See here.
After trying to install all dependencies on a basic Docker Ubuntu image, I finally got things to work.
This definitely is an OS issue, and it looks like the fastBPE was not built to support Windows.
Build failure using
g++
compilerAfter installing the required GCC build tools on Windows, I run the following command to compile the fastBPE code:
Here's the output:
On trying other alternatives, I get the same error (see below).
Using
setup.py
A pre-requisite to run this command (I believe) is we need
Cython
installed on our system. (ref #27)Run the following command:
Here's the output:
This looks almost similar to the error here.
But after trying out the suggested solution from the comments from this issue, there are still compilation errors. (ref #43)
Similar errors faced by others: #33 #40 #42
I guess there is no support for windows based systems?
The text was updated successfully, but these errors were encountered: