big-r81 commented on PR #4814:
URL: https://github.com/apache/couchdb/pull/4814#issuecomment-1800788556

   First compile run:
   
   ```
   ==> fast_pbkdf2 (compile)
   Compiling 
c:/Users/couchdb/Documents/couchdb/src/fast_pbkdf2/c_src/fast_pbkdf2.c
   ERROR: compile failed while processing 
c:/Users/couchdb/Documents/couchdb/src/fast_pbkdf2: rebar_abort
   Microsoft (R) C/C++ Optimizing Compiler Version 19.37.32825 for x64
   Copyright (C) Microsoft Corporation.  All rights reserved.
   
   cl : Command line error D8021 : invalid numeric argument '/Wextra'
   make: *** [Makefile.win:118: couch] Error 1
   ```
   So I patched `rebar.config` of `fast_pbkdf2` to:
   
   ```diff
   diff --git a/src/fast_pbkdf2/rebar.config b/src/fast_pbkdf2/rebar.config
   index a0ef529ca..871f8a74f 100644
   --- a/src/fast_pbkdf2/rebar.config
   +++ b/src/fast_pbkdf2/rebar.config
   @@ -39,7 +39,8 @@
            % From files
            ["c_src/*.c"],
            % Using options
   -        [ {env, [{"CFLAGS", "$CFLAGS -std=c99 -O3 -g -Wall -Wextra -fPIC"},
   +        [ {env, [{"(linux|solaris|darwin|freebsd)", "CFLAGS", "$CFLAGS 
-std=c99 -O3 -g -Wall -Wextra -fPIC"},       
   +                 {"win32", "CFLAGS", "$CFLAGS /O2 /DNDEBUG /Wall"},
                     {"LDLIBS", "$LDLIBS -lcrypto"},
                     {"DRV_LINK_TEMPLATE", "$DRV_LINK_TEMPLATE $LDLIBS"}]}]
         }
   ```
   
   Second compile run:
   
   ```
   ==> fast_pbkdf2 (compile)
   Compiling 
c:/Users/couchdb/Documents/couchdb/src/fast_pbkdf2/c_src/fast_pbkdf2.c
   Microsoft (R) C/C++ Optimizing Compiler Version 19.37.32825 for x64
   Copyright (C) Microsoft Corporation.  All rights reserved.
   
   fast_pbkdf2.c
   c:\tools\erl-24.3.4.10\erts-12.3.2.10\include\erl_drv_nif.h(40): warning 
C4820: '<unnamed-tag>': '4' bytes padding added after data member 
'dirty_scheduler_support'
   c:\tools\erl-24.3.4.10\erts-12.3.2.10\include\erl_drv_nif.h(156): warning 
C4820: '_SysIOVec': '4' bytes padding added after data member 'iov_len'
   c:\tools\erl-24.3.4.10\erts-12.3.2.10\include\erl_nif.h(123): warning C4820: 
'enif_func_t': '4' bytes padding added after data member 'arity'
   c:\tools\erl-24.3.4.10\erts-12.3.2.10\include\erl_nif.h(125): warning C4820: 
'enif_func_t': '4' bytes padding added after data member 'flags'
   c:\tools\erl-24.3.4.10\erts-12.3.2.10\include\erl_nif.h(134): warning C4820: 
'enif_entry_t': '4' bytes padding added after data member 'num_of_funcs'
   c:\tools\erl-24.3.4.10\erts-12.3.2.10\include\erl_nif.h(147): warning C4820: 
'enif_entry_t': '4' bytes padding added after data member 'options'
   c:\tools\erl-24.3.4.10\erts-12.3.2.10\include\erl_nif.h(215): warning C4820: 
'<unnamed-tag>': '4' bytes padding added after data member 'members'
   c:\tools\erl-24.3.4.10\erts-12.3.2.10\include\erl_nif.h(279): warning C4820: 
'erl_nif_io_vec': '4' bytes padding added after data member 'iovcnt'
   c:\tools\erl-24.3.4.10\erts-12.3.2.10\include\erl_nif.h(287): warning C4820: 
'erl_nif_io_vec': '4' bytes padding added after data member 'flags'
   c:/Users/couchdb/Documents/couchdb/src/fast_pbkdf2/c_src/fast_pbkdf2.c(35): 
fatal error C1083: Cannot open include file: 'openssl/sha.h': No such file or 
directory
   ERROR: compile failed while processing 
c:/Users/couchdb/Documents/couchdb/src/fast_pbkdf2: rebar_abort
   make: *** [Makefile.win:118: couch] Error 1
   ```
   
   Windows has problems with OpenSSL too. OpenSSL is installed via `vcpkg` and 
should be automatically available (header files etc...). Need some more 
investigations.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to