You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/06/21 09:16:11 UTC

[GitHub] [rocketmq-client-cpp] gloriousknight edited a comment on issue #354: Build failed in Apple Silicon M1

gloriousknight edited a comment on issue #354:
URL: https://github.com/apache/rocketmq-client-cpp/issues/354#issuecomment-864873292


   hi, I set libevent and jsoncpp path to CMake command and cmake command run successfully.
   When I try command `make rocketmq_shared -j 4`, error occured
   `/Downloads/rocketmq-client-cpp-re_dev/project/../src/protocol/heartbeat/SubscriptionData.hpp:25:10: fatal error: 'json/json.h' file not found
   #include <json/json.h>
            ^~~~~~~~~~~~~
   In file included from /Downloads/rocketmq-client-cpp-re_dev/src/MQAdminImpl.cpp:17:
   In file included from /Downloads/rocketmq-client-cpp-re_dev/project/../src/MQAdminImpl.h:23:
   In file included from //Downloads/rocketmq-client-cpp-re_dev/project/../src/MQClientInstance.h:27:
   In file included from //Downloads/rocketmq-client-cpp-re_dev/project/../src/consumer/MQConsumerInner.h:25:`
   pls   @ifplusor 
   **PS:
   My cmake command:**
   `sudo cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local \ -DLibevent_USE_STATIC_LIBS=ON -DJSONCPP_USE_STATIC_LIBS=OFF \ -DBUILD_ROCKETMQ_STATIC=OFF -DBUILD_ROCKETMQ_SHARED=ON \ -DRUN_UNIT_TEST=OFF -DLIBEVENT_EVENT_CONFIG_DIR=/opt/homebrew/Cellar/libevent/2.1.12/include -DLIBEVENT_EVENT_LIBRARY=/opt/homebrew/Cellar/libevent/2.1.12/lib -DLIBEVENT_CORE_LIBRARY=/opt/homebrew/Cellar/libevent/2.1.12/lib -DLIBEVENT_EXTRA_LIBRARY=/opt/homebrew/Cellar/libevent/2.1.12/lib -DLIBEVENT_PTHREADS_LIBRARY=/opt/homebrew/Cellar/libevent/2.1.12/lib -DJSONCPP_JSON_DIR=/opt/homebrew/Cellar/jsoncpp/1.9.4_1/include/json -DJSONCPP_JSONCPP_LIBRARY=/opt/homebrew/Cellar/jsoncpp/1.9.4_1/lib ..`
   **My Cmake command log:**
   `CMake` Deprecation Warning at CMakeLists.txt:16 (cmake_minimum_required):
     Compatibility with CMake < 2.8.12 will be removed from a future version of
     CMake.
   
     Update the VERSION argument <min> value or use a ...<max> suffix to tell
     CMake that the project does not need compatibility with older versions.
   
   
   -- ** libevent components: event;core;extra;pthreads
   -- ** find event in /Downloads/rocketmq-client-cpp-re_dev/bin/lib;/usr/local/lib;/usr/lib
   -- ** find event_core in /Downloads/rocketmq-client-cpp-re_dev/bin/lib;/usr/local/lib;/usr/lib
   -- ** find event_extra in /Downloads/rocketmq-client-cpp-re_dev/bin/lib;/usr/local/lib;/usr/lib
   -- ** find event_pthreads in /Downloads/rocketmq-client-cpp-re_dev/bin/lib;/usr/local/lib;/usr/lib
   -- ** LIBEVENT_INCLUDE_DIRS: /opt/homebrew/Cellar/libevent/2.1.12/include
   -- ** LIBEVENT_LIBRARIES: /opt/homebrew/Cellar/libevent/2.1.12/lib;/opt/homebrew/Cellar/libevent/2.1.12/lib;/opt/homebrew/Cellar/libevent/2.1.12/lib;/opt/homebrew/Cellar/libevent/2.1.12/lib
   -- Found Jsoncpp: /opt/homebrew/Cellar/jsoncpp/1.9.4_1/include/json (Required is at least version "0.10.6")
   -- ** JSONCPP_INCLUDE_DIRS: /opt/homebrew/Cellar/jsoncpp/1.9.4_1/include/json
   -- ** JSONCPP_LIBRARIES: /opt/homebrew/Cellar/jsoncpp/1.9.4_1/lib
   -- Performing Test COMPILER_SUPPORTS_C99
   -- Performing Test COMPILER_SUPPORTS_C99 - Success
   -- Performing Test COMPILER_SUPPORTS_CXX11
   -- Performing Test COMPILER_SUPPORTS_CXX11 - Success
   -- ** set CMAKE_C_STANDARD to 99
   -- ** set CMAKE_CXX_STANDARD to 11
   -- Configuring done
   WARNING: Target "rocketmq_shared" requests linking to directory "/opt/homebrew/Cellar/jsoncpp/1.9.4_1/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "rocketmq_shared" requests linking to directory "/opt/homebrew/Cellar/libevent/2.1.12/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "rocketmq_shared" requests linking to directory "/opt/homebrew/Cellar/libevent/2.1.12/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "rocketmq_shared" requests linking to directory "/opt/homebrew/Cellar/libevent/2.1.12/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "rocketmq_shared" requests linking to directory "/opt/homebrew/Cellar/libevent/2.1.12/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "SyncProducer" requests linking to directory "/opt/homebrew/Cellar/jsoncpp/1.9.4_1/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "SyncProducer" requests linking to directory "/opt/homebrew/Cellar/libevent/2.1.12/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "RequestReply" requests linking to directory "/opt/homebrew/Cellar/jsoncpp/1.9.4_1/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "RequestReply" requests linking to directory "/opt/homebrew/Cellar/libevent/2.1.12/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "PushConsumerOrderly" requests linking to directory "/opt/homebrew/Cellar/jsoncpp/1.9.4_1/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "PushConsumerOrderly" requests linking to directory "/opt/homebrew/Cellar/libevent/2.1.12/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "COrderlyAsyncProducer" requests linking to directory "/opt/homebrew/Cellar/jsoncpp/1.9.4_1/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "COrderlyAsyncProducer" requests linking to directory "/opt/homebrew/Cellar/libevent/2.1.12/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "Producer" requests linking to directory "/opt/homebrew/Cellar/jsoncpp/1.9.4_1/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "Producer" requests linking to directory "/opt/homebrew/Cellar/libevent/2.1.12/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "SendDelayMsg" requests linking to directory "/opt/homebrew/Cellar/jsoncpp/1.9.4_1/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "SendDelayMsg" requests linking to directory "/opt/homebrew/Cellar/libevent/2.1.12/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "AsyncProducer" requests linking to directory "/opt/homebrew/Cellar/jsoncpp/1.9.4_1/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "AsyncProducer" requests linking to directory "/opt/homebrew/Cellar/libevent/2.1.12/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "OrderlyPushConsumer" requests linking to directory "/opt/homebrew/Cellar/jsoncpp/1.9.4_1/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "OrderlyPushConsumer" requests linking to directory "/opt/homebrew/Cellar/libevent/2.1.12/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "PushConsumeMessage" requests linking to directory "/opt/homebrew/Cellar/jsoncpp/1.9.4_1/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "PushConsumeMessage" requests linking to directory "/opt/homebrew/Cellar/libevent/2.1.12/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "CBatchProducer" requests linking to directory "/opt/homebrew/Cellar/jsoncpp/1.9.4_1/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "CBatchProducer" requests linking to directory "/opt/homebrew/Cellar/libevent/2.1.12/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "CAsyncProducer" requests linking to directory "/opt/homebrew/Cellar/jsoncpp/1.9.4_1/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "CAsyncProducer" requests linking to directory "/opt/homebrew/Cellar/libevent/2.1.12/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "PushConsumer" requests linking to directory "/opt/homebrew/Cellar/jsoncpp/1.9.4_1/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "PushConsumer" requests linking to directory "/opt/homebrew/Cellar/libevent/2.1.12/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "TransactionProducer" requests linking to directory "/opt/homebrew/Cellar/jsoncpp/1.9.4_1/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "TransactionProducer" requests linking to directory "/opt/homebrew/Cellar/libevent/2.1.12/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "OrderlyProducer" requests linking to directory "/opt/homebrew/Cellar/jsoncpp/1.9.4_1/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "OrderlyProducer" requests linking to directory "/opt/homebrew/Cellar/libevent/2.1.12/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "BatchProducer" requests linking to directory "/opt/homebrew/Cellar/jsoncpp/1.9.4_1/lib".  Targets may link only to libraries.  CMake is dropping the item.
   WARNING: Target "BatchProducer" requests linking to directory "/opt/homebrew/Cellar/libevent/2.1.12/lib".  Targets may link only to libraries.  CMake is dropping the item.
   -- Generating done`


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

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