Building Couchbase code in Windows

Hello,
I am building the Couchbase code in the following environment :

  1. Windows server 2012 R2.
  2. VS 2015
  3. MinGW (msys)
    Downloaded the code from branch-master.

I am getting following error:
Administrator@WIN-938CC1MC9KC ~/couchbase
$ cmake -DCMAKE_C_COMPILER=/c/MinGW/bin/gcc.exe -DCMAKE_CXX_COMPILER=/c/MinGW/bin/g++.exe
– Building for: Visual Studio 14 2015
– Third-party dependencies will be cached in C:///cbdepscache
– *** Installing binary dependencies ***
– Set platform to windows_msvc2015 for dependency downloads
– Set arch to amd64 for dependency downloads


– Reading global third-party dependencies manifest…
– Checking exploded version 20160926-cb1 against 20160926-cb1
– Dependency ‘breakpad (20160926-cb1)’ already downloaded
– Checking exploded version 7.49.1-cb1 against 7.49.1-cb1
– Dependency ‘curl (7.49.1-cb1)’ already downloaded
– Checking exploded version R16B03-1-couchbase-cb1 against R16B03-1-couchbase-cb1
– Dependency ‘erlang (R16B03-1-couchbase-cb1)’ already downloaded
– Dependency erlang (R16B03-couchbase-cb2) not declared for platform windows_msvc2015, skipping…
– Checking exploded version 1.2.0-cb1 against 1.2.0-cb1
– Dependency ‘flatbuffers (1.2.0-cb1)’ already downloaded
– Checking exploded version 54.1.0 against 54.1.0
– Dependency ‘icu4c (54.1.0)’ already downloaded
– Dependency icu4c (54.1-cb10) not declared for platform windows_msvc2015, skipping…
– Checking exploded version 4.1.0-cb2 against 4.1.0-cb2
– Dependency ‘jemalloc (4.1.0-cb2)’ already downloaded
– Dependency jemalloc (4.0.4-cb2) not declared for platform windows_msvc2015, skipping…
– Dependency jemalloc (4.1.1-couchbase-cb2) not declared for platform windows_msvc2015, skipping…
– Checking exploded version 1.1.0-cb1 against 1.1.0-cb1
– Dependency ‘json (1.1.0-cb1)’ already downloaded
– Checking exploded version 2.1.4-alpha-dev against 2.1.4-alpha-dev
– Dependency ‘libevent (2.1.4-alpha-dev)’ already downloaded
– Dependency libevent (2.0.22-cb2) not declared for platform windows_msvc2015, skipping…
– Checking exploded version 1.0.1h against 1.0.1h
– Dependency ‘openssl (1.0.1h)’ already downloaded
– Dependency pysqlite2 (0ff6e32-cb1) not declared for platform windows_msvc2015, skipping…
– Checking exploded version c97d633 against c97d633
– Dependency ‘python-snappy (c97d633)’ already downloaded
– Dependency python-snappy (c97d633-cb1) not declared for platform windows_msvc2015, skipping…
– Checking exploded version 1.1.1 against 1.1.1
– Dependency ‘snappy (1.1.1)’ already downloaded
– Dependency snappy (1.1.1-cb2) not declared for platform windows_msvc2015, skipping…
– Dependency v8 (4.8-cb4) not declared for platform windows_msvc2015, skipping…
– Checking exploded version 5.2-cb1 against 5.2-cb1
– Dependency ‘v8 (5.2-cb1)’ already downloaded
– Dependency v8 (4.8-cb5) not declared for platform windows_msvc2015, skipping…
– Global third-party dependencies manifest complete


– Using cmake version: 3.6.3
– Installing to C:/MinGW/msys/1.0/home/Administrator/couchbase/install
– Build type: RelWithDebInfo (Community Edition)
– Looking for je_malloc
– Looking for je_malloc - not found
– Found jemalloc in C:/MinGW/msys/1.0/home/Administrator/couchbase/install/lib/jemalloc.lib, but was built without ‘je_’ prefix on symbols so cannot be used.
(Consider installing pre-built package from cbdeps, by adding ‘EXTRA_CMAKE_OPTIONS=-DCB_DOWNLOAD_DEPS=1’ to make arguments).
– Using system-supplied malloc
– Found openssl in C:/MinGW/msys/1.0/home/Administrator/couchbase/install/include : C:/MinGW/msys/1.0/home/Administrator/couchbase/install/lib/ssleay32.lib;C:/MinGW
/msys/1.0/home/Administrator/couchbase/install/lib/libeay32.lib
– Found libevent headers in: C:/MinGW/msys/1.0/home/Administrator/couchbase/install/include
– core: C:/MinGW/msys/1.0/home/Administrator/couchbase/install/lib/event_core.lib
– thread: LIBEVENT_THREAD_LIB-NOTFOUND
– extra: C:/MinGW/msys/1.0/home/Administrator/couchbase/install/lib/event_extra.lib
– Found cURL in C:/MinGW/msys/1.0/home/Administrator/couchbase/tlm/deps/curl.exploded/include : C:/MinGW/msys/1.0/home/Administrator/couchbase/install/lib/libcurl.l
ib
– Found ICU headers in C:/MinGW/msys/1.0/home/Administrator/couchbase/tlm/deps/icu4c.exploded/include
– Using ICU libraries: C:/MinGW/msys/1.0/home/Administrator/couchbase/install/lib/icuuc.lib;C:/MinGW/msys/1.0/home/Administrator/couchbase/install/lib/icuin.lib
– Found snappy in C:/MinGW/msys/1.0/home/Administrator/couchbase/install/include : C:/MinGW/msys/1.0/home/Administrator/couchbase/install/lib/snappy.lib
– Found PythonInterp: C:/Python27/python.exe (found version “2.7.10”)
– Erlang runtime and compiler found in C:/MinGW/msys/1.0/home/Administrator/couchbase/install/bin/erl.exe and C:/MinGW/msys/1.0/home/Administrator/couchbase/install
/bin/erlc.exe
– Erlang dialyzer in C:/MinGW/msys/1.0/home/Administrator/couchbase/install/bin/dialyzer.exe
– Escript interpreter found in C:/MinGW/msys/1.0/home/Administrator/couchbase/install/bin/escript.exe
– Erlang nif header in C:/MinGW/msys/1.0/home/Administrator/couchbase/install/usr/include
– Multi-Go mode enabled; all desired Go compiler versions will be downloaded for the build
– Third-party dependencies will be cached in C:///cbdepscache
– Found breakpad in C:/MinGW/msys/1.0/home/Administrator/couchbase/tlm/deps/breakpad.exploded/include/breakpad : C:/MinGW/msys/1.0/home/Administrator/couchbase/tlm/
deps/breakpad.exploded/lib/Release/exception_handler.lib;C:/MinGW/msys/1.0/home/Administrator/couchbase/tlm/deps/breakpad.exploded/lib/Release/crash_generation_clien
t.lib;C:/MinGW/msys/1.0/home/Administrator/couchbase/tlm/deps/breakpad.exploded/lib/Release/common.lib
– Found Google Flatbuffers in C:/MinGW/msys/1.0/home/Administrator/couchbase/tlm/deps/flatbuffers.exploded/include : C:/MinGW/msys/1.0/home/Administrator/couchbase/
tlm/deps/flatbuffers.exploded/bin/flatc.exe
CMake Warning (dev) at tlm/cmake/Modules/CouchbaseCompilerOptions.cmake:35 (IF):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run “cmake --help-policy CMP0054” for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

Quoted variables like “MSVC” will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
CMakeLists.txt:111 (INCLUDE)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at tlm/cmake/Modules/CouchbaseCompilerOptions.cmake:37 (ELSEIF):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run “cmake --help-policy CMP0054” for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

Quoted variables like “MSVC” will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
CMakeLists.txt:111 (INCLUDE)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at tlm/cmake/Modules/CouchbaseCompilerOptions.cmake:39 (ELSEIF):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run “cmake --help-policy CMP0054” for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

Quoted variables like “MSVC” will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
CMakeLists.txt:111 (INCLUDE)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at tlm/cmake/Modules/CouchbaseCompilerOptions.cmake:48 (IF):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run “cmake --help-policy CMP0054” for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

Quoted variables like “MSVC” will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
CMakeLists.txt:111 (INCLUDE)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at tlm/cmake/Modules/CouchbaseCompilerOptions.cmake:50 (ELSEIF):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run “cmake --help-policy CMP0054” for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

Quoted variables like “MSVC” will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
CMakeLists.txt:111 (INCLUDE)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at tlm/cmake/Modules/CouchbaseCompilerOptions.cmake:52 (ELSEIF):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run “cmake --help-policy CMP0054” for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

Quoted variables like “MSVC” will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
CMakeLists.txt:111 (INCLUDE)
This warning is for project developers. Use -Wno-dev to suppress it.

– C++ compiler version: 19.0.23026.0
– C++ language version: C++11
– Performing Test HAVE_ATTR_WARN_UNUSED_RESULT
– Performing Test HAVE_ATTR_WARN_UNUSED_RESULT - Failed
– Performing Test HAVE_ATTR_FORMAT
– Performing Test HAVE_ATTR_FORMAT - Failed
– Performing Test HAVE_ATTR_NORETURN
– Performing Test HAVE_ATTR_NORETURN - Failed
– Performing Test HAVE_ATTR_NONNULL
– Performing Test HAVE_ATTR_NONNULL - Failed
– Performing Test HAVE_ATTR_DEPRECATED
– Performing Test HAVE_ATTR_DEPRECATED - Failed
– Found v8 in C:/MinGW/msys/1.0/home/Administrator/couchbase/tlm/deps/v8.exploded : C:/MinGW/msys/1.0/home/Administrator/couchbase/tlm/deps/v8.exploded/lib/Release/
v8.dll.lib;C:/MinGW/msys/1.0/home/Administrator/couchbase/tlm/deps/v8.exploded/archive/Release/v8_libplatform.lib;C:/MinGW/msys/1.0/home/Administrator/couchbase/tlm/
deps/v8.exploded/archive/Release/v8_libbase.lib;winmm
– Linking with network libraries: Ws2_32
– Check if the system is big endian
– Searching 16 bit integer
– Looking for sys/types.h
– Looking for sys/types.h - found
– Looking for stdint.h
– Looking for stdint.h - found
– Looking for stddef.h
– Looking for stddef.h - found
– Check size of unsigned short
– Check size of unsigned short - done
– Using unsigned short
– Check if the system is big endian - little endian
– Looking for pthread.h
– Looking for pthread.h - not found
– Found Threads: TRUE
– Found Git: C:/Program Files/Git/cmd/git.exe (found version “2.10.1.windows.1”)
– git Version: v0.0.0
– Version: 0.0.0
– Performing Test HAVE_STD_REGEX
– Performing Test HAVE_STD_REGEX – success
– Performing Test HAVE_GNU_POSIX_REGEX
– Performing Test HAVE_GNU_POSIX_REGEX – failed to compile
– Performing Test HAVE_POSIX_REGEX
– Performing Test HAVE_POSIX_REGEX – failed to compile
– Performing Test HAVE_STEADY_CLOCK
– Performing Test HAVE_STEADY_CLOCK – success
– Performing Test BENCHMARK_HAS_CXX03_FLAG
– Performing Test BENCHMARK_HAS_CXX03_FLAG - Failed
– Looking for backtrace
– Looking for backtrace - not found
– Looking for dladdr
– Looking for dladdr - not found
– Looking for pthread_setname_np
– Looking for pthread_setname_np - not found
– Looking for pthread_getname_np
– Looking for pthread_getname_np - not found
– Looking for sched_getaffinity
– Looking for sched_getaffinity - not found
– Performing Test HAVE_NOEXCEPT
– Performing Test HAVE_NOEXCEPT - Success
– Looking for gethrtime
– Looking for gethrtime - not found
– Looking for htonll
– Looking for htonll - not found
– ENV{PROGRAMW6432} : C:\Program Files
– ENV{PROGRAMFILES} : C:\Program Files
– DbgHelp arch: amd64 paths: C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/Remote Debugger/x64
– Found Dbghelp in C:/Program Files (x86)/Windows Kits/10/Debuggers/lib/x64 : C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/Remote Debugger/x64/db
ghelp.dll
– Looking for C++ include chrono
– Looking for C++ include chrono - found
– Performing Test COMPILER_HAS_DEPRECATED_ATTR
– Performing Test COMPILER_HAS_DEPRECATED_ATTR - Failed
– Performing Test COMPILER_HAS_DEPRECATED
– Performing Test COMPILER_HAS_DEPRECATED - Success
– Performing Test HAVE_PKCS5_PBKDF2_HMAC_SHA1
– Performing Test HAVE_PKCS5_PBKDF2_HMAC_SHA1 - Failed
– Performing Test HAVE_PKCS5_PBKDF2_HMAC
– Performing Test HAVE_PKCS5_PBKDF2_HMAC - Failed
– Performing Test HAVE_SSL_OP_NO_TLSv1_1
– Performing Test HAVE_SSL_OP_NO_TLSv1_1 - Success
– Performing Test HAVE_FUNC
– Performing Test HAVE_FUNC - Success
– Performing Test HAVE_FUNCTION
– Performing Test HAVE_FUNCTION - Success
– Looking for memalign
– Looking for memalign - not found
– Looking for include file numa.h
– Looking for include file numa.h - not found
– Looking for include file netinet/in.h
– Looking for include file netinet/in.h - not found
– Looking for include file inttypes.h
– Looking for include file inttypes.h - found
– Looking for include file unistd.h
– Looking for include file unistd.h - not found
– Looking for fdatasync
– Looking for fdatasync - not found
– Looking for qsort_r
– Looking for qsort_r - not found
– Performing Test COMPILER_SUPPORTS_CXX0X
– Performing Test COMPILER_SUPPORTS_CXX0X - Failed
– Looking for include file sched.h
– Looking for include file sched.h - not found
– Found jemalloc in C:/MinGW/msys/1.0/home/Administrator/couchbase/install/lib/jemalloc.lib, but was built without ‘je_’ prefix on symbols so cannot be used.
(Consider installing pre-built package from cbdeps, by adding ‘EXTRA_CMAKE_OPTIONS=-DCB_DOWNLOAD_DEPS=1’ to make arguments).
CMake Error at tlm/cmake/Modules/CouchbaseMemoryAllocator.cmake:12 (MESSAGE):
Could not find JEMalloc
Call Stack (most recent call first):
forestdb/CMakeLists.txt:62 (include)

I did try to add the ‘EXTRA_CMAKE_OPTIONS=-DCB_DOWNLOAD_DEPS=1’ however still the error persists.
Can some please help?

We currently build Couchbase with MSVC 2013 - if you use that it should build successfully.

Also, I doubt that you’ll be able to build with Mingw - or at least if you do you’ll have to download all of our 3rd party dependancies (cbdeps) from source.

Thanks Dave, I will give it a try with VS 2013.
I think with Mingw, it automatically downloaded the cbdeps for me as you mentioned.

Hi Dave,
I have installed VS 2013, however the issue still persists related to jemalloc.
I also tried to build with nmake on the VS command prompt, however the issue remains the same.
Can you please help me in finding out what am i missing here ?

Please find the output of nmake below:
C:\MinGW\msys\1.0\home\Administrator\couchbase>nmake

Microsoft ® Program Maintenance Utility Version 12.00.21005.1
Copyright © Microsoft Corporation. All rights reserved.

A subdirectory or file build already exists.
(cd build && cmake -G “NMake Makefiles” -D PRODUCT_VERSION= -D BUILD_ENTERPRISE= -DCB_DOW
NLOAD_DEPS=1 …)
– Third-party dependencies will be cached in C://Users/Administrator/cbdepscache
– *** Installing binary dependencies ***
– Set platform to windows_msvc for dependency downloads
– Set arch to amd64 for dependency downloads


– Reading global third-party dependencies manifest…
– Checking exploded version against 20160926-cb1
– Dependency ‘breakpad-windows_msvc-amd64-20160926-cb1.tgz’ found in cache
– Installing dependency: breakpad-20160926-cb1…
– Checking exploded version against 7.49.1-cb1
– Dependency ‘curl-windows_msvc-amd64-7.49.1-cb1.tgz’ found in cache
– Installing dependency: curl-7.49.1-cb1…
– Checking exploded version against R16B03-1-couchbase-cb1
– Dependency ‘erlang-windows_msvc-amd64-R16B03-1-couchbase-cb1.tgz’ found in cache
– Installing dependency: erlang-R16B03-1-couchbase-cb1…
– Dependency erlang (R16B03-couchbase-cb2) not declared for platform windows_msvc, skipping…
– Checking exploded version against 1.2.0-cb1
– Dependency ‘flatbuffers-windows_msvc-amd64-1.2.0-cb1.tgz’ found in cache
– Installing dependency: flatbuffers-1.2.0-cb1…
– Checking exploded version against 54.1.0
– Dependency ‘icu4c-windows_msvc-amd64-54.1.0.tgz’ found in cache
– Installing dependency: icu4c-54.1.0…
– Dependency icu4c (54.1-cb10) not declared for platform windows_msvc, skipping…
– Checking exploded version against 4.1.0-cb2
– Dependency ‘jemalloc-windows_msvc-amd64-4.1.0-cb2.tgz’ found in cache
– Installing dependency: jemalloc-4.1.0-cb2…
– Dependency jemalloc (4.0.4-cb2) not declared for platform windows_msvc, skipping…
– Dependency jemalloc (4.1.1-couchbase-cb2) not declared for platform windows_msvc, skipping…
– Checking exploded version against 1.1.0-cb1
– Dependency ‘json-windows_msvc-amd64-1.1.0-cb1.tgz’ found in cache
– Installing dependency: json-1.1.0-cb1…
– Checking exploded version against 2.1.4-alpha-dev
– Dependency ‘libevent-windows_msvc-amd64-2.1.4-alpha-dev.tgz’ found in cache
– Installing dependency: libevent-2.1.4-alpha-dev…
– Dependency libevent (2.0.22-cb2) not declared for platform windows_msvc, skipping…
– Checking exploded version against 1.0.1h
– Dependency ‘openssl-windows_msvc-amd64-1.0.1h.tgz’ found in cache
– Installing dependency: openssl-1.0.1h…
– Dependency pysqlite2 (0ff6e32-cb1) not declared for platform windows_msvc, skipping…
– Checking exploded version against c97d633
– Dependency ‘python-snappy-windows_msvc-amd64-c97d633.tgz’ found in cache
– Installing dependency: python-snappy-c97d633…
– Dependency python-snappy (c97d633-cb1) not declared for platform windows_msvc, skipping…
– Checking exploded version against 1.1.1
– Dependency ‘snappy-windows_msvc-amd64-1.1.1.tgz’ found in cache
– Installing dependency: snappy-1.1.1…
– Dependency snappy (1.1.1-cb2) not declared for platform windows_msvc, skipping…
– Checking exploded version against 4.8-cb4
– Dependency ‘v8-windows_msvc-amd64-4.8-cb4.tgz’ found in cache
– Installing dependency: v8-4.8-cb4…
– Dependency v8 (5.2-cb1) not declared for platform windows_msvc, skipping…
– Dependency v8 (4.8-cb5) not declared for platform windows_msvc, skipping…
– Global third-party dependencies manifest complete


– Using cmake version: 3.6.3
– Installing to C:/MinGW/msys/1.0/home/Administrator/couchbase/install
– Build type: RelWithDebInfo (Community Edition)
– Looking for je_malloc
– Looking for je_malloc - not found
– Found jemalloc in C:/MinGW/msys/1.0/home/Administrator/couchbase/install/lib/jemalloc.lib, but wa
s built without ‘je_’ prefix on symbols so cannot be used.
(Consider installing pre-built package from cbdeps, by adding ‘EXTRA_CMAKE_OPTIONS=-DCB_DOWNLOAD_
DEPS=1’ to make arguments).
– Using system-supplied malloc
– Found openssl in C:/MinGW/msys/1.0/home/Administrator/couchbase/install/include : C:/MinGW/msys/1
.0/home/Administrator/couchbase/install/lib/ssleay32.lib;C:/MinGW/msys/1.0/home/Administrator/couchb
ase/install/lib/libeay32.lib
– Found libevent headers in: C:/MinGW/msys/1.0/home/Administrator/couchbase/install/include
– core: C:/MinGW/msys/1.0/home/Administrator/couchbase/install/lib/event_core.
lib
– thread: LIBEVENT_THREAD_LIB-NOTFOUND
– extra: C:/MinGW/msys/1.0/home/Administrator/couchbase/install/lib/event_extra
.lib
– Found cURL in C:/MinGW/msys/1.0/home/Administrator/couchbase/build/tlm/deps/curl.exploded/include
: C:/MinGW/msys/1.0/home/Administrator/couchbase/install/lib/libcurl.lib
– Found ICU headers in C:/MinGW/msys/1.0/home/Administrator/couchbase/build/tlm/deps/icu4c.exploded
/include
– Using ICU libraries: C:/MinGW/msys/1.0/home/Administrator/couchbase/install/lib/icuuc.lib;C:/MinG
W/msys/1.0/home/Administrator/couchbase/install/lib/icuin.lib
– Found snappy in C:/MinGW/msys/1.0/home/Administrator/couchbase/install/include : C:/MinGW/msys/1.
0/home/Administrator/couchbase/install/lib/snappy.lib
– Found PythonInterp: C:/Python27/python.exe (found version “2.7.10”)
– Erlang runtime and compiler found in C:/MinGW/msys/1.0/home/Administrator/couchbase/install/bin/e
rl.exe and C:/MinGW/msys/1.0/home/Administrator/couchbase/install/bin/erlc.exe
– Erlang dialyzer in C:/MinGW/msys/1.0/home/Administrator/couchbase/install/bin/dialyzer.exe
– prove testdriver not found - erlang testing unavailable
– Escript interpreter found in C:/MinGW/msys/1.0/home/Administrator/couchbase/install/bin/escript.e
xe
– Erlang nif header in C:/MinGW/msys/1.0/home/Administrator/couchbase/install/usr/include
– Multi-Go mode enabled; all desired Go compiler versions will be downloaded for the build
– Third-party dependencies will be cached in C://Users/Administrator/cbdepscache
– Found breakpad in C:/MinGW/msys/1.0/home/Administrator/couchbase/build/tlm/deps/breakpad.exploded
/include/breakpad : C:/MinGW/msys/1.0/home/Administrator/couchbase/build/tlm/deps/breakpad.exploded/
lib/Release/exception_handler.lib;C:/MinGW/msys/1.0/home/Administrator/couchbase/build/tlm/deps/brea
kpad.exploded/lib/Release/crash_generation_client.lib;C:/MinGW/msys/1.0/home/Administrator/couchbase
/build/tlm/deps/breakpad.exploded/lib/Release/common.lib
– Found Google Flatbuffers in C:/MinGW/msys/1.0/home/Administrator/couchbase/build/tlm/deps/flatbuf
fers.exploded/include : C:/MinGW/msys/1.0/home/Administrator/couchbase/build/tlm/deps/flatbuffers.ex
ploded/bin/flatc.exe
CMake Warning (dev) at tlm/cmake/Modules/CouchbaseCompilerOptions.cmake:35 (IF):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run “cmake --help-policy CMP0054” for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

Quoted variables like “MSVC” will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
CMakeLists.txt:111 (INCLUDE)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at tlm/cmake/Modules/CouchbaseCompilerOptions.cmake:37 (ELSEIF):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run “cmake --help-policy CMP0054” for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

Quoted variables like “MSVC” will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
CMakeLists.txt:111 (INCLUDE)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at tlm/cmake/Modules/CouchbaseCompilerOptions.cmake:39 (ELSEIF):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run “cmake --help-policy CMP0054” for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

Quoted variables like “MSVC” will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
CMakeLists.txt:111 (INCLUDE)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at tlm/cmake/Modules/CouchbaseCompilerOptions.cmake:48 (IF):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run “cmake --help-policy CMP0054” for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

Quoted variables like “MSVC” will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
CMakeLists.txt:111 (INCLUDE)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at tlm/cmake/Modules/CouchbaseCompilerOptions.cmake:50 (ELSEIF):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run “cmake --help-policy CMP0054” for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

Quoted variables like “MSVC” will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
CMakeLists.txt:111 (INCLUDE)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at tlm/cmake/Modules/CouchbaseCompilerOptions.cmake:52 (ELSEIF):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run “cmake --help-policy CMP0054” for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

Quoted variables like “MSVC” will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
CMakeLists.txt:111 (INCLUDE)
This warning is for project developers. Use -Wno-dev to suppress it.

– C++ compiler version: 18.0.31101.0
– C++ language version: C++11
– Performing Test HAVE_ATTR_WARN_UNUSED_RESULT
– Performing Test HAVE_ATTR_WARN_UNUSED_RESULT - Failed
– Performing Test HAVE_ATTR_FORMAT
– Performing Test HAVE_ATTR_FORMAT - Failed
– Performing Test HAVE_ATTR_NORETURN
– Performing Test HAVE_ATTR_NORETURN - Failed
– Performing Test HAVE_ATTR_NONNULL
– Performing Test HAVE_ATTR_NONNULL - Failed
– Performing Test HAVE_ATTR_DEPRECATED
– Performing Test HAVE_ATTR_DEPRECATED - Failed
– Found v8 in C:/MinGW/msys/1.0/home/Administrator/couchbase/build/tlm/deps/v8.exploded : C:/MinGW/
msys/1.0/home/Administrator/couchbase/build/tlm/deps/v8.exploded/lib/Release/v8.dll.lib;C:/MinGW/msy
s/1.0/home/Administrator/couchbase/build/tlm/deps/v8.exploded/archive/Release/v8_libplatform.lib;C:/
MinGW/msys/1.0/home/Administrator/couchbase/build/tlm/deps/v8.exploded/archive/Release/v8_libbase.li
b;winmm
– Linking with network libraries: Ws2_32
– Check if the system is big endian
– Searching 16 bit integer
– Looking for sys/types.h
– Looking for sys/types.h - found
– Looking for stdint.h
– Looking for stdint.h - found
– Looking for stddef.h
– Looking for stddef.h - found
– Check size of unsigned short
– Check size of unsigned short - done
– Using unsigned short
– Check if the system is big endian - little endian
– Looking for pthread.h
– Looking for pthread.h - not found
– Found Threads: TRUE
– Found Git: C:/Program Files/Git/cmd/git.exe (found version “2.10.1.windows.1”)
– git Version: v0.0.0
– Version: 0.0.0
– Performing Test HAVE_STD_REGEX
– Performing Test HAVE_STD_REGEX – success
– Performing Test HAVE_GNU_POSIX_REGEX
– Performing Test HAVE_GNU_POSIX_REGEX – failed to compile
– Performing Test HAVE_POSIX_REGEX
– Performing Test HAVE_POSIX_REGEX – failed to compile
– Performing Test HAVE_STEADY_CLOCK
– Performing Test HAVE_STEADY_CLOCK – success
– Performing Test BENCHMARK_HAS_CXX03_FLAG
– Performing Test BENCHMARK_HAS_CXX03_FLAG - Failed
– Looking for backtrace
– Looking for backtrace - not found
– Looking for dladdr
– Looking for dladdr - not found
– Looking for pthread_setname_np
– Looking for pthread_setname_np - not found
– Looking for pthread_getname_np
– Looking for pthread_getname_np - not found
– Looking for sched_getaffinity
– Looking for sched_getaffinity - not found
– Performing Test HAVE_NOEXCEPT
– Performing Test HAVE_NOEXCEPT - Failed
– Looking for gethrtime
– Looking for gethrtime - not found
– Looking for htonll
– Looking for htonll - not found
– ENV{PROGRAMW6432} : C:\Program Files
– ENV{PROGRAMFILES} : C:\Program Files
– DbgHelp arch: amd64 paths: C:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/Remote
Debugger/x64
– Found Dbghelp in C:/Program Files (x86)/Windows Kits/10/Debuggers/lib/x64 : C:/Program Files (x86
)/Microsoft Visual Studio 12.0/Common7/IDE/Remote Debugger/x64/dbghelp.dll
– Looking for C++ include chrono
– Looking for C++ include chrono - found
– Performing Test COMPILER_HAS_DEPRECATED_ATTR
– Performing Test COMPILER_HAS_DEPRECATED_ATTR - Failed
– Performing Test COMPILER_HAS_DEPRECATED
– Performing Test COMPILER_HAS_DEPRECATED - Success
– Performing Test HAVE_PKCS5_PBKDF2_HMAC_SHA1
– Performing Test HAVE_PKCS5_PBKDF2_HMAC_SHA1 - Success
– Performing Test HAVE_PKCS5_PBKDF2_HMAC
– Performing Test HAVE_PKCS5_PBKDF2_HMAC - Success
– Performing Test HAVE_SSL_OP_NO_TLSv1_1
– Performing Test HAVE_SSL_OP_NO_TLSv1_1 - Success
– Performing Test HAVE_FUNC
– Performing Test HAVE_FUNC - Failed
– Performing Test HAVE_FUNCTION
– Performing Test HAVE_FUNCTION - Success
– Looking for memalign
– Looking for memalign - not found
– Looking for include file numa.h
– Looking for include file numa.h - not found
– Looking for include file netinet/in.h
– Looking for include file netinet/in.h - not found
– Looking for include file inttypes.h
– Looking for include file inttypes.h - found
– Looking for include file unistd.h
– Looking for include file unistd.h - not found
– Looking for fdatasync
– Looking for fdatasync - not found
– Looking for qsort_r
– Looking for qsort_r - not found
– Performing Test COMPILER_SUPPORTS_CXX0X
– Performing Test COMPILER_SUPPORTS_CXX0X - Failed
– Looking for include file sched.h
– Looking for include file sched.h - not found
– Found jemalloc in C:/MinGW/msys/1.0/home/Administrator/couchbase/install/lib/jemalloc.lib, but wa
s built without ‘je_’ prefix on symbols so cannot be used.
(Consider installing pre-built package from cbdeps, by adding ‘EXTRA_CMAKE_OPTIONS=-DCB_DOWNLOAD_
DEPS=1’ to make arguments).
CMake Error at tlm/cmake/Modules/CouchbaseMemoryAllocator.cmake:12 (MESSAGE):
Could not find JEMalloc
Call Stack (most recent call first):
forestdb/CMakeLists.txt:62 (include)

– Configuring incomplete, errors occurred!
See also “C:/MinGW/msys/1.0/home/Administrator/couchbase/build/CMakeFiles/CMakeOutput.log”.
See also “C:/MinGW/msys/1.0/home/Administrator/couchbase/build/CMakeFiles/CMakeError.log”.
NMAKE : fatal error U1077: ‘(cd’ : return code '0x1’
Stop.

I think you might have some remnants of the earlier MSVS2015 build attempt - i.e. I think you still have the wrong version of jemalloc installed. Try wiping out your build and install directories and re-running cmake.

Thanks Dave, it worked.
Build has started and I am getting following error.
Can you please have a look at it ?

Did you run tlm\environment\win32.bat before building (as per the Windows build instructions) ?

Yes, i did run the environment.bat file in tlm\win32 folder.
Is the build process supported on Windows Server 2012 R2 ? Can it be a problem ?

Hi Dave,
I have moved to Windows Server 2008 R2 environment.
I am able to solve the above problem after running “C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\vcvars64.bat”, i guess error was related to platform where auditd.dll was trying to link to 32bit module.
Now :slight_smile:, I am getting following error, please let me know if you know what am i missing ?

ERROR**************
[ 61%] Linking CXX executable endurance_test.exe
exception_handler.lib(exception_handler.obj) : warning LNK4099: PDB ‘vc120.pdb’
was not found with ‘exception_handler.lib(exception_handler.obj)’ or at ‘C:\User
s\Administrator\Downloads\couchbasse\build\forestdb\tests\usecase\vc120.pdb’; li
nking object as if no debug info
crash_generation_client.lib(crash_generation_client.obj) : warning LNK4099: PDB
’vc120.pdb’ was not found with ‘crash_generation_client.lib(crash_generation_cli
ent.obj)’ or at ‘C:\Users\Administrator\Downloads\couchbasse\build\forestdb\test
s\usecase\vc120.pdb’; linking object as if no debug info
common.lib(guid_string.obj) : warning LNK4099: PDB ‘vc120.pdb’ was not found wit
h ‘common.lib(guid_string.obj)’ or at ‘C:\Users\Administrator\Downloads\couchbas
se\build\forestdb\tests\usecase\vc120.pdb’; linking object as if no debug info
exception_handler.lib(exception_handler.obj) : warning LNK4099: PDB ‘vc120.pdb’
was not found with ‘exception_handler.lib(exception_handler.obj)’ or at ‘C:\User
s\Administrator\Downloads\couchbasse\build\forestdb\tests\usecase\vc120.pdb’; li
nking object as if no debug info
crash_generation_client.lib(crash_generation_client.obj) : warning LNK4099: PDB
’vc120.pdb’ was not found with ‘crash_generation_client.lib(crash_generation_cli
ent.obj)’ or at ‘C:\Users\Administrator\Downloads\couchbasse\build\forestdb\test
s\usecase\vc120.pdb’; linking object as if no debug info
common.lib(guid_string.obj) : warning LNK4099: PDB ‘vc120.pdb’ was not found wit
h ‘common.lib(guid_string.obj)’ or at ‘C:\Users\Administrator\Downloads\couchbas
se\build\forestdb\tests\usecase\vc120.pdb’; linking object as if no debug info
[ 61%] Built target endurance_test
Scanning dependencies of target ep_testsuite_basic
[ 61%] Building CXX object ep-engine/CMakeFiles/ep_testsuite_basic.dir/tests/ep_
testsuite_basic.cc.obj
ep_testsuite_basic.cc
C:\Users\Administrator\Downloads\couchbasse\platform\include\JSON_checker.h(94)
: warning C4251: ‘JSON_checker::Validator::instance’ : class ‘JSON_checker::Inst
ance’ needs to have dll-interface to be used by clients of class 'JSON_checker::
Validator’
C:\Users\Administrator\Downloads\couchbasse\platform\include\JSON_checke
r.h(31) : see declaration of ‘JSON_checker::Instance’
[ 61%] Building CXX object ep-engine/CMakeFiles/ep_testsuite_basic.dir/src/compr
ess.cc.obj
compress.cc
[ 61%] Building CXX object ep-engine/CMakeFiles/ep_testsuite_basic.dir/src/ext_m
eta_parser.cc.obj
ext_meta_parser.cc
[ 62%] Building CXX object ep-engine/CMakeFiles/ep_testsuite_basic.dir/tests/ep_
testsuite_common.cc.obj
ep_testsuite_common.cc
[ 62%] Building CXX object ep-engine/CMakeFiles/ep_testsuite_basic.dir/tests/ep_
test_apis.cc.obj
ep_test_apis.cc
C:\Users\Administrator\Downloads\couchbasse\ep-engine\tests\ep_test_apis.cc(1136
) : error C3646: ‘noexcept’ : unknown override specifier
NMAKE : fatal error U1077: ‘C:\PROGRA~2\MICROS~3.0\VC\bin\amd64\cl.exe’ : return
code '0x2’
Stop.
NMAKE : fatal error U1077: ‘“C:\Program Files (x86)\Microsoft Visual Studio 12.0
\VC\BIN\amd64\nmake.exe”’ : return code '0x2’
Stop.
NMAKE : fatal error U1077: ‘“C:\Program Files (x86)\Microsoft Visual Studio 12.0
\VC\BIN\amd64\nmake.exe”’ : return code '0x2’
Stop.
NMAKE : fatal error U1077: ‘(cd’ : return code '0x2’
Stop.

I am able to successfully build the code. Thanks a lot Dave for the help.