You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/29 01:52:31 UTC

[GitHub] [pulsar-client-cpp] merlimat opened a new pull request, #2: PIP-209: Build C++ client in standalone repo

merlimat opened a new pull request, #2:
URL: https://github.com/apache/pulsar-client-cpp/pull/2

   Changs to build C++ client in the new standalone repo


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-cpp] BewareMyPower commented on pull request #2: PIP-209: Build C++ client in standalone repo

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on PR #2:
URL: https://github.com/apache/pulsar-client-cpp/pull/2#issuecomment-1261796086

   It still doesn't work.
   
   ```
   -- Pulsar Client version: 3.0.0-pre
   Traceback (most recent call last):
     File "/Users/xuyunze/github.com/BewareMyPower/pulsar-client-cpp/build-support/gen-pulsar-version-macro.py", line 23, in <module>
       version = open("version.txt").read()
   FileNotFoundError: [Errno 2] No such file or directory: 'version.txt'
   -- Pulsar Client version macro: 
   ```


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-cpp] Demogorgon314 commented on a diff in pull request #2: PIP-209: Build C++ client in standalone repo

Posted by GitBox <gi...@apache.org>.
Demogorgon314 commented on code in PR #2:
URL: https://github.com/apache/pulsar-client-cpp/pull/2#discussion_r983090148


##########
build-support/gen-pulsar-version-macro.py:
##########
@@ -0,0 +1,29 @@
+#!/usr/bin/env python3
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+import re, sys
+
+version = open("version.txt").read()

Review Comment:
   ```suggestion
   from os.path import dirname, realpath, join
   
   TOP_LEVEL_PATH = dirname(dirname(realpath(__file__)))
   version = open(join(TOP_LEVEL_PATH, 'version.txt')).read()
   ```
   



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-cpp] Demogorgon314 commented on pull request #2: PIP-209: Build C++ client in standalone repo

Posted by GitBox <gi...@apache.org>.
Demogorgon314 commented on PR #2:
URL: https://github.com/apache/pulsar-client-cpp/pull/2#issuecomment-1261748642

   Look like the build still failed:
   
   ```
   Could not make proto path relative: /Users/wangkai/Developer/github/pulsar-client-cpp/tests/proto/ExternalTest.proto: No such file or directory
   gmake[2]: *** [tests/CMakeFiles/main.dir/build.make:74: generated/tests/Test.pb.cc] Error 1
   gmake[2]: *** Waiting for unfinished jobs....
   gmake[1]: *** [CMakeFiles/Makefile2:565: tests/CMakeFiles/main.dir/all] Error 2
   gmake[1]: *** Waiting for unfinished jobs....
   [ 67%] Building CXX object python/CMakeFiles/_pulsar.dir/src/message.cc.o
   [ 68%] Building CXX object python/CMakeFiles/_pulsar.dir/src/authentication.cc.o
   [ 68%] Building CXX object python/CMakeFiles/_pulsar.dir/src/reader.cc.o
   [ 69%] Building CXX object python/CMakeFiles/_pulsar.dir/src/schema.cc.o
   [ 69%] Building CXX object python/CMakeFiles/_pulsar.dir/src/cryptoKeyReader.cc.o
   [ 70%] Building CXX object python/CMakeFiles/_pulsar.dir/src/exceptions.cc.o
   [ 70%] Building CXX object python/CMakeFiles/_pulsar.dir/src/utils.cc.o
   [ 71%] Linking CXX shared library _pulsar.so
   ld: warning: -undefined dynamic_lookup may not work with chained fixups
   [ 71%] Built target _pulsar
   gmake: *** [Makefile:136: all] Error 2
   ```


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-cpp] Demogorgon314 commented on pull request #2: PIP-209: Build C++ client in standalone repo

Posted by GitBox <gi...@apache.org>.
Demogorgon314 commented on PR #2:
URL: https://github.com/apache/pulsar-client-cpp/pull/2#issuecomment-1261763183

   In my local env, the `Version.h` is not generated into `include` dir, so its builds failed.
   
   ```
   [ 69%] Building CXX object tests/CMakeFiles/main.dir/VersionTest.cc.o
   /Users/wangkai/Developer/github/pulsar-client-cpp/tests/VersionTest.cc:24:5: error: expected expression
       ASSERT_GE(PULSAR_VERSION, 2000000);
       ^
   /usr/local/include/gtest/gtest.h:2096:32: note: expanded from macro 'ASSERT_GE'
   # define ASSERT_GE(val1, val2) GTEST_ASSERT_GE(val1, val2)
                                  ^
   /usr/local/include/gtest/gtest.h:2072:3: note: expanded from macro 'GTEST_ASSERT_GE'
     ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)
   ```


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-cpp] BewareMyPower commented on a diff in pull request #2: PIP-209: Build C++ client in standalone repo

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on code in PR #2:
URL: https://github.com/apache/pulsar-client-cpp/pull/2#discussion_r983090290


##########
CMakeLists.txt:
##########
@@ -22,7 +22,14 @@ cmake_minimum_required(VERSION 3.4)
 project (pulsar-cpp)
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake_modules")
 
-execute_process(COMMAND ${CMAKE_SOURCE_DIR}/../src/gen-pulsar-version-macro.py OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE PVM)
+execute_process(COMMAND cat ${CMAKE_SOURCE_DIR}/version.txt OUTPUT_STRIP_TRAILING_WHITESPACE
+            OUTPUT_VARIABLE PULSAR_CLIENT_VERSION)
+message(STATUS "Pulsar Client version: ${PULSAR_CLIENT_VERSION}")
+
+execute_process(COMMAND ${CMAKE_SOURCE_DIR}/build-support/gen-pulsar-version-macro.py OUTPUT_STRIP_TRAILING_WHITESPACE
+        OUTPUT_VARIABLE PULSAR_CLIENT_VERSION_MACRO)

Review Comment:
   ```suggestion
   execute_process(COMMAND ${CMAKE_SOURCE_DIR}/build-support/gen-pulsar-version-macro.py OUTPUT_STRIP_TRAILING_WHITESPACE
           OUTPUT_VARIABLE PULSAR_CLIENT_VERSION_MACRO
           WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
   ```
   
   Support running `cmake` command in another directory like:
   
   ```
   mkdir -p _builds
   cd _builds
   cmake ..
   ```
   
   (Though we can use `-B` option for the current code)



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-cpp] merlimat commented on pull request #2: PIP-209: Build C++ client in standalone repo

Posted by GitBox <gi...@apache.org>.
merlimat commented on PR #2:
URL: https://github.com/apache/pulsar-client-cpp/pull/2#issuecomment-1261755663

   > Look like the build still failed. The `ExternalTest.proto` file is missing.
   
   Yes, the build should be fixed now


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-cpp] merlimat commented on pull request #2: PIP-209: Build C++ client in standalone repo

Posted by GitBox <gi...@apache.org>.
merlimat commented on PR #2:
URL: https://github.com/apache/pulsar-client-cpp/pull/2#issuecomment-1261769252

   > In my local env, the `Version.h` is not generated into `include` dir, so its builds failed.
   
   I had one more change that I missed to include in the commit. fixed now.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-cpp] BewareMyPower merged pull request #2: PIP-209: Build C++ client in standalone repo

Posted by GitBox <gi...@apache.org>.
BewareMyPower merged PR #2:
URL: https://github.com/apache/pulsar-client-cpp/pull/2


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-cpp] merlimat commented on a diff in pull request #2: PIP-209: Build C++ client in standalone repo

Posted by GitBox <gi...@apache.org>.
merlimat commented on code in PR #2:
URL: https://github.com/apache/pulsar-client-cpp/pull/2#discussion_r983092182


##########
build-support/gen-pulsar-version-macro.py:
##########
@@ -0,0 +1,29 @@
+#!/usr/bin/env python3
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+import re, sys
+
+version = open("version.txt").read()

Review Comment:
   +1 I was doing very similar thing :) 



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-cpp] BewareMyPower commented on a diff in pull request #2: PIP-209: Build C++ client in standalone repo

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on code in PR #2:
URL: https://github.com/apache/pulsar-client-cpp/pull/2#discussion_r983091706


##########
CMakeLists.txt:
##########
@@ -22,7 +22,14 @@ cmake_minimum_required(VERSION 3.4)
 project (pulsar-cpp)
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake_modules")
 
-execute_process(COMMAND ${CMAKE_SOURCE_DIR}/../src/gen-pulsar-version-macro.py OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE PVM)
+execute_process(COMMAND cat ${CMAKE_SOURCE_DIR}/version.txt OUTPUT_STRIP_TRAILING_WHITESPACE
+            OUTPUT_VARIABLE PULSAR_CLIENT_VERSION)
+message(STATUS "Pulsar Client version: ${PULSAR_CLIENT_VERSION}")
+
+execute_process(COMMAND ${CMAKE_SOURCE_DIR}/build-support/gen-pulsar-version-macro.py OUTPUT_STRIP_TRAILING_WHITESPACE
+        OUTPUT_VARIABLE PULSAR_CLIENT_VERSION_MACRO)

Review Comment:
   Yes, we can also change the Python script. Mark it as resolved.



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org