-
Notifications
You must be signed in to change notification settings - Fork 11
Description
I am trying to build a windows docker container where php is compiled along with couchbase extension. To do the compilation, I am following this resource.
My Environment:
OS: Windows servercore 2022 (On docker)
Php: 8.4.3 NTS, Debug
Arch: x64
VS: 17
Issue description:
As a first step, I was able to build and compile plain php-src from scratch using the php-sdk. Now, I am having issues adding the couchbase extension. Initially, I tried adding the precompiled DLLs to the extension directory but whatever, I have tried I got the error:
Warning: PHP Startup: Unable to load dynamic library 'couchbase' (tried: C:\php\Debug\couchbase (The specified module could not be found), C:\php\Debug\php_couchbase.dll (The specified module could not be found)) in Unknown on line 0
Since, I could not resolve this error, I tried compiling the extension from source code. For compilation, I have downloaded the source code from pecl website for 4.2.5 version. The configure (with --enable-couchbase
flag) command is working fine. After that when nmake command is being executed, I am seeing the following error:
cl : Command line error D8016 : '/O2' and '/RTC1' command-line options are incompatible
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.42.34433\bin\Hostx64\x64\cl.exe" @C:\Users\ContainerAdministrator\AppData\Local\Temp\nmC99.tmp' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.42.34433\bin\HostX64\x64\nmake.exe" -f CMakeFiles\couchbase.dir\build.make /nologo -L CMakeFiles\couchbase.dir\build' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.42.34433\bin\HostX64\x64\nmake.exe" -f CMakeFiles\Makefile2 /nologo -L all' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe" --build "C:\php\Debug\cmake-build" --verbose' : return code '0x2'
Stop.
Please let me know if there is any fix for this issue? Thanks in advance.