Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows server support needed! #2461

Closed
guzuomuse opened this issue Aug 28, 2018 · 8 comments · Fixed by #4071
Closed

windows server support needed! #2461

guzuomuse opened this issue Aug 28, 2018 · 8 comments · Fixed by #4071
Labels
deprecated/question Questions should happened in GitHub Discussions type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Comments

@guzuomuse
Copy link

guzuomuse commented Aug 28, 2018

for some reason,we must stay windows platform.
compiling pulsar-cpp always give errors.
any plan offering support for windows? thanks!

@sijie sijie added the deprecated/question Questions should happened in GitHub Discussions label Aug 28, 2018
@sijie
Copy link
Member

sijie commented Aug 28, 2018

@guzuomuse thank you for reporting. we'd love to support windows, however most of the committers are more familiar with linux/macos. if you can share some of your build errors, we might have some ideas on how to help you better.

@guzuomuse
Copy link
Author

guzuomuse commented Aug 28, 2018

@sijie ,thanks your reply,here is error log when i compile the c++ client with cmake gui:

BUILD_TESTS:  ON
LINK_STATIC:  OFF
USE_LOG4CXX:  OFF
CMAKE_BUILD_TYPE:  
Found ZLIB: F:/en_folder_for_testing/zlib-1.2.11/cmake/Release (found version "1.2.11") 
Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR) 
PYTHON: 3.7.0
DETECTED Python 3
CMake Warning at D:/Program Files/CMake/share/cmake-3.12/Modules/FindBoost.cmake:1723 (message):
  No header defined for python3-mt; skipping header check
Call Stack (most recent call first):
  CMakeLists.txt:120 (find_package)


CMake Warning at D:/Program Files/CMake/share/cmake-3.12/Modules/FindBoost.cmake:1723 (message):
  No header defined for python-py37; skipping header check
Call Stack (most recent call first):
  CMakeLists.txt:120 (find_package)


CMake Warning at D:/Program Files/CMake/share/cmake-3.12/Modules/FindBoost.cmake:1723 (message):
  No header defined for python37-mt; skipping header check
Call Stack (most recent call first):
  CMakeLists.txt:120 (find_package)


Boost version: 1.68.0
Found the following Boost libraries:
  program_options
  filesystem
  regex
  thread
  system
  python37
  chrono
  date_time
  atomic
CMake Error at lib/CMakeLists.txt:42 (set_target_properties):
  set_target_properties called with incorrect number of arguments.


CMake Error at lib/CMakeLists.txt:43 (set_target_properties):
  set_target_properties called with incorrect number of arguments.


CMake Warning (dev) at python/CMakeLists.txt:34 (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.
This warning is for project developers.  Use -Wno-dev to suppress it.

Using Boost Python libs: optimized;D:/programs/boost_1_68_0/lib64-msvc-14.1/boost_python37-vc141-mt-x64-1_68.lib;debug;D:/programs/boost_1_68_0/lib64-msvc-14.1/boost_python37-vc141-mt-gd-x64-1_68.lib
clang-tidy not found
clang-format not found
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CURL_LIBRARY_PATH
    linked by target "pulsarStatic" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/lib
    linked by target "pulsarShared" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/lib
    linked by target "perfProducer" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/perf
    linked by target "perfConsumer" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/perf
    linked by target "SampleReaderCApi" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleAsyncProducer" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleConsumerListener" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleConsumer" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleProducer" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleProducerCApi" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleConsumerListenerCApi" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleConsumerCApi" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "main" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/tests
GMOCK_INCLUDE_PATH
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/lib
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/lib
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/perf
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/perf
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/tests
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/python
GMOCK_LIBRARY_PATH
    linked by target "main" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/tests
GTEST_INCLUDE_PATH
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/lib
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/lib
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/perf
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/perf
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/tests
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/python
JSON_INCLUDE_PATH
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/lib
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/lib
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/perf
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/perf
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/tests
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/python
LIB_JSON
    linked by target "pulsarStatic" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/lib
    linked by target "pulsarShared" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/lib
    linked by target "perfProducer" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/perf
    linked by target "perfConsumer" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/perf
    linked by target "SampleReaderCApi" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleAsyncProducer" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleConsumerListener" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleConsumer" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleProducer" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleProducerCApi" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleConsumerListenerCApi" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleConsumerCApi" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "main" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/tests
PROTOBUF_LIBRARIES
    linked by target "pulsarStatic" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/lib
    linked by target "pulsarShared" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/lib
    linked by target "perfProducer" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/perf
    linked by target "perfConsumer" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/perf
    linked by target "SampleReaderCApi" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleAsyncProducer" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleConsumerListener" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleConsumer" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleProducer" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleProducerCApi" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleConsumerListenerCApi" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "SampleConsumerCApi" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
    linked by target "main" in directory F:/en_folder_for_testing/pulsar-client-cpp/source/tests
Protobuf_INCLUDE_DIR (ADVANCED)
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/lib
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/lib
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/perf
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/perf
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/examples
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/tests
   used as include directory in directory F:/en_folder_for_testing/pulsar-client-cpp/source/python

Configuring incomplete, errors occurred!
See also "F:/en_folder_for_testing/pulsar-client-cpp/cmake/CMakeFiles/CMakeOutput.log".
See also "F:/en_folder_for_testing/pulsar-client-cpp/cmake/CMakeFiles/CMakeError.log".

@merlimat
Copy link
Contributor

@guzuomuse

You're missing some of the dependencies. For tests, you can disable by passing -DBUILD_TESTS=OFF to cmake.

For the rest, you need to install:

@merlimat
Copy link
Contributor

Anyway, the deps for tests are :

@guzuomuse
Copy link
Author

@merlimat ,thank you very much ,i will try and then give my feedback

@guzuomuse
Copy link
Author

guzuomuse commented Aug 29, 2018

@merlimat @sijie
unfortunately.after struggling for hours. too many dependencies drive me crazy.
i will look back.but i have to give up for now.

@ivankelly ivankelly added type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages triage/week-35 labels Aug 30, 2018
@cbornet
Copy link
Contributor

cbornet commented Nov 15, 2018

A conan.io support would make all this much simpler

@soroshsabz
Copy link

A vcpkg support would make all this much simpler :)

sijie pushed a commit that referenced this issue Apr 26, 2019
…able compilation on Windows (#4071)

Fixes #2461

### Motivation


My motivation was to be able to use the pulsar cpp client on Windows systems. 

### Modifications

There are a number of modifications I needed to make to enable Windows compilation
* Extensive rework of multiple CMakeLists.txt files
* The creation of a PULSAR_PUBLIC define to define symbol visibility in lieue of #pragma GCC visibility push(default). This is because Windows requires specifying __declspec(dllexport) and __declspec(import) explicitly and does not have a #pragma GCC visibility push(default) analogue.
* all calls to usleep or sleep have been replaced with calls to boost::this_thread::sleep()



### Verifying this change

This change is a trivial rework / code cleanup without any test coverage. However, it does introduce a new platform to test on. It is likely that CI checks will have to be created.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecated/question Questions should happened in GitHub Discussions type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
6 participants