lpereira / lwan

Experimental, scalable, high performance HTTP server
https://lwan.ws
GNU General Public License v2.0
5.92k stars 549 forks source link

Can we use MSYS2 to build or is not supported? #292

Closed KenthJohan closed 3 years ago

KenthJohan commented 4 years ago

Both cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release and cmake .. -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release does not work.

https://github.com/nanomsg/nng works with MSYS2.

MINGW64 /c/Users/Johan/Documents/lwan/build
$ cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is GNU 10.1.0
-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe
-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Running CMake for lwan (Scalable, high performance, experimental web server)
-- Found PkgConfig: C:/msys64/mingw64/bin/pkg-config.exe (found version "0.29.2")
-- Found ZLIB: C:/msys64/mingw64/lib/libz.dll.a (found version "1.2.11")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Checking for modules 'luajit>=2.0;luajit<=2.0.999'
--   No package 'luajit' found
--   No package 'luajit' found
-- Checking for modules 'lua>=5.1.0;lua<=5.1.999'
--   No package 'lua' found
--   No package 'lua' found
-- Checking for modules 'lua51>=5.1.0;lua51<=5.1.999'
--   No package 'lua51' found
--   No package 'lua51' found
-- Checking for modules 'lua5.1>=5.1.0;lua5.1<=5.1.999'
--   No package 'lua5.1' found
--   No package 'lua5.1' found
-- Checking for modules 'lua-5.1>=5.1.0;lua-5.1<=5.1.999'
--   No package 'lua-5.1' found
--   No package 'lua-5.1' found
-- Disabling Lua support
-- Checking for modules 'libbrotlienc;libbrotlidec;libbrotlicommon'
--   Found libbrotlienc, version 1.0.7
--   Found libbrotlidec, version 1.0.7
--   Found libbrotlicommon, version 1.0.7
-- Checking for module 'libzstd'
--   Found libzstd, version 1.4.4
-- Using built-in context switching routines for AMD64 processors
-- Looking for linux/capability.h
-- Looking for linux/capability.h - not found
-- Looking for sys/auxv.h
-- Looking for sys/auxv.h - not found
-- Looking for sys/epoll.h
-- Looking for sys/epoll.h - not found
-- Looking for 3 include files sys/time.h, ..., sys/event.h
-- Looking for 3 include files sys/time.h, ..., sys/event.h - not found
-- Looking for alloca.h
-- Looking for alloca.h - not found
-- Looking for get_current_dir_name
-- Looking for get_current_dir_name - not found
-- Looking for reallocarray
-- Looking for reallocarray - not found
-- Looking for mempcpy
-- Looking for mempcpy - found
-- Looking for memrchr
-- Looking for memrchr - not found
-- Looking for pipe2
-- Looking for pipe2 - not found
-- Looking for accept4
-- Looking for accept4 - not found
-- Looking for readahead
-- Looking for readahead - not found
-- Looking for mkostemp
-- Looking for mkostemp - not found
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- Looking for pthread_barrier_init
-- Looking for pthread_barrier_init - found
-- Looking for pthread_set_name_np
-- Looking for pthread_set_name_np - not found
-- Looking for eventfd
-- Looking for eventfd - not found
-- Looking for posix_fadvise
-- Looking for posix_fadvise - not found
-- Looking for getentropy
-- Looking for getentropy - not found
-- Looking for fwrite_unlocked
-- Looking for fwrite_unlocked - not found
-- Looking for gettid
-- Looking for gettid - not found
-- Looking for secure_getenv
-- Looking for secure_getenv - not found
-- Looking for dladdr
-- Looking for dladdr - not found
-- Performing Test HAVE_STD_GNU99
-- Performing Test HAVE_STD_GNU99 - Success
-- Performing Test HAVE_BUILTIN_CPU_INIT
-- Performing Test HAVE_BUILTIN_CPU_INIT - Success
-- Performing Test HAVE_BUILTIN_CLZLL
-- Performing Test HAVE_BUILTIN_CLZLL - Success
-- Performing Test HAVE_BUILTIN_FPCLASSIFY
-- Performing Test HAVE_BUILTIN_FPCLASSIFY - Success
-- Performing Test HAVE_BUILTIN_MUL_OVERFLOW
-- Performing Test HAVE_BUILTIN_MUL_OVERFLOW - Success
-- Performing Test HAVE_BUILTIN_ADD_OVERFLOW
-- Performing Test HAVE_BUILTIN_ADD_OVERFLOW - Success
-- Performing Test HAVE_STATIC_ASSERT
-- Performing Test HAVE_STATIC_ASSERT - Success
-- Valgrind headers not found -- disabling valgrind support
-- Performing Test HAVE_MTUNE_NATIVE
-- Performing Test HAVE_MTUNE_NATIVE - Success
-- Performing Test HAVE_MARCH_NATIVE
-- Performing Test HAVE_MARCH_NATIVE - Success
-- Performing Test HAVE_STACK_PROTECTOR_EXPLICIT
-- Performing Test HAVE_STACK_PROTECTOR_EXPLICIT - Success
-- Performing Test HAVE_IMMEDIATE_BINDING
-- Performing Test HAVE_IMMEDIATE_BINDING - Success
-- Performing Test HAVE_READ_ONLY_GOT
-- Performing Test HAVE_READ_ONLY_GOT - Success
-- Performing Test HAVE_NO_PLT
-- Performing Test HAVE_NO_PLT - Success
-- Performing Test HAVE_NOEXEC_STACK
-- Performing Test HAVE_NOEXEC_STACK - Success
-- Performing Test HAVE_ALIGN_FNS
-- Performing Test HAVE_ALIGN_FNS - Success
-- Performing Test HAVE_NO_SEMANTIC_INTERPOSITION
-- Performing Test HAVE_NO_SEMANTIC_INTERPOSITION - Success
-- Performing Test HAVE_ALIGN_DATA
-- Performing Test HAVE_ALIGN_DATA - Success
-- Performing Test HAVE_NO_ASYNC_UNWIND_TABLES
-- Performing Test HAVE_NO_ASYNC_UNWIND_TABLES - Success
-- Performing Test HAVE_LTO_JOBSERVER
-- Performing Test HAVE_LTO_JOBSERVER - Success
-- Performing Test HAVE_LTO_FAT_OBJS
-- Performing Test HAVE_LTO_FAT_OBJS - Success
-- Performing Test HAVE_BUILTIN_IA32_CRC32
-- Performing Test HAVE_BUILTIN_IA32_CRC32 - Success
-- Performing Test supports -Wduplicated-cond
-- Performing Test supports -Wduplicated-cond - Success
-- Performing Test supports -Wduplicated-branches
-- Performing Test supports -Wduplicated-branches - Success
-- Performing Test supports -Wlogical-op
-- Performing Test supports -Wlogical-op - Success
-- Performing Test supports -Wrestrict
-- Performing Test supports -Wrestrict - Success
-- Performing Test supports -Wdouble-promotion
-- Performing Test supports -Wdouble-promotion - Success
-- Performing Test supports -Wno-unused-parameter
-- Performing Test supports -Wno-unused-parameter - Success
-- Performing Test supports -Wstringop-truncation
-- Performing Test supports -Wstringop-truncation - Success
-- Performing Test supports -Wvla
-- Performing Test supports -Wvla - Success
-- Performing Test supports -Wunsequenced
-- Performing Test supports -Wunsequenced - Failed
-- Performing Test supports -Wno-free-nonheap-object
-- Performing Test supports -Wno-free-nonheap-object - Success
-- Found PythonInterp: C:/msys64/mingw64/bin/python3.exe (found suitable version "3.8.2", minimum required is "3")
-- Using Brotli for mimegen
-- Checking for module 'sqlite3>=3.6.20'
--   Found sqlite3, version 3.31.1
-- Not building benchmark suite: database libraries not found.
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Johan/Documents/lwan/build

MINGW64 /c/Users/Johan/Documents/lwan/build
$ mingw32-make.exe
Scanning dependencies of target bin2hex
[  1%] Building C object src/bin/tools/CMakeFiles/bin2hex.dir/bin2hex.c.obj
In file included from C:\Users\Johan\Documents\lwan\src\bin\tools\bin2hex.c:24:
C:/Users/Johan/Documents/lwan/src/lib/missing/sys/mman.h:21:15: fatal error: sys/mman.h: No such file or directory
   21 | #include_next <sys/mman.h>
      |               ^~~~~~~~~~~~
compilation terminated.
mingw32-make[2]: *** [src\bin\tools\CMakeFiles\bin2hex.dir\build.make:83: src/bin/tools/CMakeFiles/bin2hex.dir/bin2hex.c.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:521: src/bin/tools/CMakeFiles/bin2hex.dir/all] Error 2
mingw32-make: *** [Makefile:149: all] Error 2

MINGW64 /c/Users/Johan/Documents/lwan/build
lpereira commented 4 years ago

I don't know anything about Windows, so this isn't supported. Lwan was initially Linux-only but I added support for BSD systems as that's still in the same ballpark as far as familiarity goes.

If you need such support, feel free to add it (I would also welcome a buildbot worker instance).

Alternatively, if you want to use Lwan on Windows, even WSL1 is sufficient.

On Mon, Sep 28, 2020, 11:57 Johan Söderlind Åström notifications@github.com wrote:

Both cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release and cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release does not work.

https://github.com/nanomsg/nng works with MSYS2.

MINGW64 /c/Users/Johan/Documents/lwan/build $ cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -- The C compiler identification is GNU 10.1.0 -- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe -- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe - works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Running CMake for lwan (Scalable, high performance, experimental web server) -- Found PkgConfig: C:/msys64/mingw64/bin/pkg-config.exe (found version "0.29.2") -- Found ZLIB: C:/msys64/mingw64/lib/libz.dll.a (found version "1.2.11") -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Checking for modules 'luajit>=2.0;luajit<=2.0.999' -- No package 'luajit' found -- No package 'luajit' found -- Checking for modules 'lua>=5.1.0;lua<=5.1.999' -- No package 'lua' found -- No package 'lua' found -- Checking for modules 'lua51>=5.1.0;lua51<=5.1.999' -- No package 'lua51' found -- No package 'lua51' found -- Checking for modules 'lua5.1>=5.1.0;lua5.1<=5.1.999' -- No package 'lua5.1' found -- No package 'lua5.1' found -- Checking for modules 'lua-5.1>=5.1.0;lua-5.1<=5.1.999' -- No package 'lua-5.1' found -- No package 'lua-5.1' found -- Disabling Lua support -- Checking for modules 'libbrotlienc;libbrotlidec;libbrotlicommon' -- Found libbrotlienc, version 1.0.7 -- Found libbrotlidec, version 1.0.7 -- Found libbrotlicommon, version 1.0.7 -- Checking for module 'libzstd' -- Found libzstd, version 1.4.4 -- Using built-in context switching routines for AMD64 processors -- Looking for linux/capability.h -- Looking for linux/capability.h - not found -- Looking for sys/auxv.h -- Looking for sys/auxv.h - not found -- Looking for sys/epoll.h -- Looking for sys/epoll.h - not found -- Looking for 3 include files sys/time.h, ..., sys/event.h -- Looking for 3 include files sys/time.h, ..., sys/event.h - not found -- Looking for alloca.h -- Looking for alloca.h - not found -- Looking for get_current_dir_name -- Looking for get_current_dir_name - not found -- Looking for reallocarray -- Looking for reallocarray - not found -- Looking for mempcpy -- Looking for mempcpy - found -- Looking for memrchr -- Looking for memrchr - not found -- Looking for pipe2 -- Looking for pipe2 - not found -- Looking for accept4 -- Looking for accept4 - not found -- Looking for readahead -- Looking for readahead - not found -- Looking for mkostemp -- Looking for mkostemp - not found -- Looking for clock_gettime -- Looking for clock_gettime - found -- Looking for pthread_barrier_init -- Looking for pthread_barrier_init - found -- Looking for pthread_set_name_np -- Looking for pthread_set_name_np - not found -- Looking for eventfd -- Looking for eventfd - not found -- Looking for posix_fadvise -- Looking for posix_fadvise - not found -- Looking for getentropy -- Looking for getentropy - not found -- Looking for fwrite_unlocked -- Looking for fwrite_unlocked - not found -- Looking for gettid -- Looking for gettid - not found -- Looking for secure_getenv -- Looking for secure_getenv - not found -- Looking for dladdr -- Looking for dladdr - not found -- Performing Test HAVE_STD_GNU99 -- Performing Test HAVE_STD_GNU99 - Success -- Performing Test HAVE_BUILTIN_CPU_INIT -- Performing Test HAVE_BUILTIN_CPU_INIT - Success -- Performing Test HAVE_BUILTIN_CLZLL -- Performing Test HAVE_BUILTIN_CLZLL - Success -- Performing Test HAVE_BUILTIN_FPCLASSIFY -- Performing Test HAVE_BUILTIN_FPCLASSIFY - Success -- Performing Test HAVE_BUILTIN_MUL_OVERFLOW -- Performing Test HAVE_BUILTIN_MUL_OVERFLOW - Success -- Performing Test HAVE_BUILTIN_ADD_OVERFLOW -- Performing Test HAVE_BUILTIN_ADD_OVERFLOW - Success -- Performing Test HAVE_STATIC_ASSERT -- Performing Test HAVE_STATIC_ASSERT - Success -- Valgrind headers not found -- disabling valgrind support -- Performing Test HAVE_MTUNE_NATIVE -- Performing Test HAVE_MTUNE_NATIVE - Success -- Performing Test HAVE_MARCH_NATIVE -- Performing Test HAVE_MARCH_NATIVE - Success -- Performing Test HAVE_STACK_PROTECTOR_EXPLICIT -- Performing Test HAVE_STACK_PROTECTOR_EXPLICIT - Success -- Performing Test HAVE_IMMEDIATE_BINDING -- Performing Test HAVE_IMMEDIATE_BINDING - Success -- Performing Test HAVE_READ_ONLY_GOT -- Performing Test HAVE_READ_ONLY_GOT - Success -- Performing Test HAVE_NO_PLT -- Performing Test HAVE_NO_PLT - Success -- Performing Test HAVE_NOEXEC_STACK -- Performing Test HAVE_NOEXEC_STACK - Success -- Performing Test HAVE_ALIGN_FNS -- Performing Test HAVE_ALIGN_FNS - Success -- Performing Test HAVE_NO_SEMANTIC_INTERPOSITION -- Performing Test HAVE_NO_SEMANTIC_INTERPOSITION - Success -- Performing Test HAVE_ALIGN_DATA -- Performing Test HAVE_ALIGN_DATA - Success -- Performing Test HAVE_NO_ASYNC_UNWIND_TABLES -- Performing Test HAVE_NO_ASYNC_UNWIND_TABLES - Success -- Performing Test HAVE_LTO_JOBSERVER -- Performing Test HAVE_LTO_JOBSERVER - Success -- Performing Test HAVE_LTO_FAT_OBJS -- Performing Test HAVE_LTO_FAT_OBJS - Success -- Performing Test HAVE_BUILTIN_IA32_CRC32 -- Performing Test HAVE_BUILTIN_IA32_CRC32 - Success -- Performing Test supports -Wduplicated-cond -- Performing Test supports -Wduplicated-cond - Success -- Performing Test supports -Wduplicated-branches -- Performing Test supports -Wduplicated-branches - Success -- Performing Test supports -Wlogical-op -- Performing Test supports -Wlogical-op - Success -- Performing Test supports -Wrestrict -- Performing Test supports -Wrestrict - Success -- Performing Test supports -Wdouble-promotion -- Performing Test supports -Wdouble-promotion - Success -- Performing Test supports -Wno-unused-parameter -- Performing Test supports -Wno-unused-parameter - Success -- Performing Test supports -Wstringop-truncation -- Performing Test supports -Wstringop-truncation - Success -- Performing Test supports -Wvla -- Performing Test supports -Wvla - Success -- Performing Test supports -Wunsequenced -- Performing Test supports -Wunsequenced - Failed -- Performing Test supports -Wno-free-nonheap-object -- Performing Test supports -Wno-free-nonheap-object - Success -- Found PythonInterp: C:/msys64/mingw64/bin/python3.exe (found suitable version "3.8.2", minimum required is "3") -- Using Brotli for mimegen -- Checking for module 'sqlite3>=3.6.20' -- Found sqlite3, version 3.31.1 -- Not building benchmark suite: database libraries not found. -- Configuring done -- Generating done -- Build files have been written to: C:/Users/Johan/Documents/lwan/build

MINGW64 /c/Users/Johan/Documents/lwan/build $ mingw32-make.exe Scanning dependencies of target bin2hex [ 1%] Building C object src/bin/tools/CMakeFiles/bin2hex.dir/bin2hex.c.obj In file included from C:\Users\Johan\Documents\lwan\src\bin\tools\bin2hex.c:24: C:/Users/Johan/Documents/lwan/src/lib/missing/sys/mman.h:21:15: fatal error: sys/mman.h: No such file or directory 21 | #include_next <sys/mman.h> | ^~~~ compilation terminated. mingw32-make[2]: [src\bin\tools\CMakeFiles\bin2hex.dir\build.make:83: src/bin/tools/CMakeFiles/bin2hex.dir/bin2hex.c.obj] Error 1 mingw32-make[1]: [CMakeFiles\Makefile2:521: src/bin/tools/CMakeFiles/bin2hex.dir/all] Error 2 mingw32-make: *** [Makefile:149: all] Error 2

MINGW64 /c/Users/Johan/Documents/lwan/build

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lpereira/lwan/issues/292, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAADVGIPSG7YLJC52MVC46TSIDMAJANCNFSM4R43SCMA .

lpereira commented 3 years ago

Closing the issue -- feel free to reopen if you have more questions about this subject