nongcundeshifu opened a new issue #13527:
URL: https://github.com/apache/pulsar/issues/13527


   **Describe the bug**
   
   When compiling Pulsar C++ client library on windows10,If your computer is 
installed [Win32/Win64 
OpenSSL](http://slproweb.com/products/Win32OpenSSL.html),The following build 
command will fail when run:
   
   ```bash
   cmake -B ./build -A x64  -DBUILD_PYTHON_WRAPPER=OFF -DBUILD_TESTS=OFF  
-DVCPKG_TRIPLET=x64-windows -DCMAKE_BUILD_TYPE=Release  -S .
   ```
   
   output:
   
   ```bash
   -- Use vcpkg, triplet is x64-windows
   -- Use CMAKE_PREFIX_PATH: 
D:/temp/pulsar/pulsar-client-cpp/vcpkg_installed/x64-windows
   -- Use protoc: 
D:/temp/pulsar/pulsar-client-cpp/vcpkg_installed/x64-windows/tools/protobuf/protoc
   -- Using CCache
   -- ARCHITECTURE: AMD64
   -- BUILD_DYNAMIC_LIB:  ON
   -- BUILD_STATIC_LIB:  ON
   -- BUILD_TESTS:  OFF
   -- BUILD_PYTHON_WRAPPER:  OFF
   -- BUILD_PERF_TOOLS:  OFF
   -- LINK_STATIC:  OFF
   -- USE_LOG4CXX:  OFF
   -- CMAKE_BUILD_TYPE:  Release
   -- Threads library:
   Found Protobuf in config mode
   -- Protobuf_LITE_LIBRARIES: 
optimized;D:/temp/pulsar/pulsar-client-cpp/vcpkg_installed/x64-windows/bin/libprotobuf-lite.dll;debug;D:/temp/pulsar/pulsar-client-cpp/vcpkg_installed/x64-windows/debug/bin/libprotobuf-lited.dll
   -- Protobuf_INCLUDE_DIRS: 
D:/temp/pulsar/pulsar-client-cpp/vcpkg_installed/x64-windows/include
   -- Found Boost: 
D:/temp/pulsar/pulsar-client-cpp/vcpkg_installed/x64-windows/include (found 
version "1.75.0")
   -- Using std::regex
   -- Found Boost: 
D:/temp/pulsar/pulsar-client-cpp/vcpkg_installed/x64-windows/include (found 
version "1.75.0") found components: date_time
   -- HAS_ZSTD: 1
   -- HAS_SNAPPY: 1
   CMake Error at lib/CMakeLists.txt:76 (if):
     if given arguments:
   
       "NOT" "optimized" 
"D:/temp/pulsar/pulsar-client-cpp/vcpkg_installed/x64-windows/lib/libssl.lib" 
"debug" "C:/Program Files/OpenSSL-Win64/lib/VC/libssl64MDd.lib" "MATCHES" 
".+\\.a\$"
   
     Unknown arguments specified
   
   
   -- Configuring incomplete, errors occurred!
   See also "D:/temp/pulsar/pulsar-client-cpp/build/CMakeFiles/CMakeOutput.log".
   See also "D:/temp/pulsar/pulsar-client-cpp/build/CMakeFiles/CMakeError.log".
   ```
   
   
![image](https://user-images.githubusercontent.com/29112325/147466960-d235e3ad-bd4b-41ee-ba53-c0c830d8c5cc.png)
   
   If I uninstall the `Win32/Win64 OpenSSL` program, I can follow the 
documented steps to build successfully on windows10
   
   **Expected behavior**
   I hope there is no such influence between them.
   
   
   **Desktop (please complete the following information):**
    - OS: windows10
   
   **Additional context**
   
   locate to `lib/CMakeLists.txt:76`,add message method print 
`${RECORD_OPENSSL_SSL_LIBRARY}`,output:
   
   uninstall:`Win32/Win64 OpenSSL`,compile successfully.output:
   
![image](https://user-images.githubusercontent.com/29112325/147467818-35d8ad7b-cba3-4e98-ab3f-04c6ea0b0c0e.png)
   
   install:`Win32/Win64 OpenSSL`compile failure.output:
   
![image](https://user-images.githubusercontent.com/29112325/147467905-fb089444-d0b6-412d-ad0a-3f41978f4f23.png)
   
   hope this helps.
   


-- 
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