编译rabbitmq-c报错,切换cmake版本就可以了【resolved】

cmake编译rabbitmq-c报错,版本为8.8.12.2

-- The C compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- CMAKE_BUILD_TYPE not specified. Creating Release build
-- Found C inline keyword: inline
-- Looking for getaddrinfo
-- Looking for getaddrinfo - found
-- Looking for socket
-- Looking for socket - found
-- Looking for poll
-- Looking for poll - found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Looking for posix_spawnp in rt
-- Looking for posix_spawnp in rt - found
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
  system variable OPENSSL_ROOT_DIR (missing: OPENSSL_INCLUDE_DIR) (Required
  is at least version "0.9.8")
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindOpenSSL.cmake:313 (find_package_handle_standard_args)
  CMakeLists.txt:122 (find_package)


-- Configuring incomplete, errors occurred!
See also "/usr/local/3rdParty/3rdPartyLibs/rabbitmq-c-master/CMakeFiles/CMakeOutput.log".
gmake: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.
config:cmake -DCMAKE_INSTALL_PREFIX=/usr/local/3rdParty/x86_64_linux/rabbitmq-c         -DOPENSSL_INCLUDE_DIR=/usr/local/3rdParty/x86_64_linux/openssl/include         -DOPENSSL_SSL_LIBRARY=/usr/local/3rdParty/x86_64_linux/openssl/lib         -DOPENSSL_ROOT_DIR=/usr/local/3rdParty/x86_64_linux/openssl/         -DOPENSSL_CRYPTO_LIBRARIES=/usr/local/3rdParty/x86_64_linux/openssl/lib/libcrypto.so         -DOPENSSL_SSL_LIBRARIES=/usr/local/3rdParty/x86_64_linux/openssl/lib/libssl.so .
[root@localhost 3rdPartyLibs]# cmake --version
cmake version 2.8.12.2
[root@localhost 3rdPartyLibs]# 

yum remove cmake后,使用源码编译安装cmake 3.6版本,就不会报错了,后续需要注意

-- The C compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- CMAKE_BUILD_TYPE not specified. Creating Release build
-- Found C inline keyword: inline
-- Looking for getaddrinfo
-- Looking for getaddrinfo - found
-- Looking for socket
-- Looking for socket - found
-- Looking for poll
-- Looking for poll - found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Looking for posix_spawnp in rt
-- Looking for posix_spawnp in rt - found
-- Found OpenSSL: /usr/local/3rdParty/x86_64_linux/openssl/lib/libssl.so;/usr/local/3rdParty/x86_64_linux/openssl/lib/libcrypto.so (found suitable version "1.0.2u", minimum required is "0.9.8")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Performing Test HAVE_GNU90
-- Performing Test HAVE_GNU90 - Success
-- Could NOT find POPT (missing:  POPT_INCLUDE_DIR POPT_LIBRARY)
-- Could NOT find XMLTO (missing:  XMLTO_EXECUTABLE)
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.5")
-- Building rabbitmq as a shared library - yes
-- Building rabbitmq as a static library - yes
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/3rdParty/3rdPartyLibs/rabbitmq-c-master
Scanning dependencies of target rabbitmq-static
[  1%] Building C object librabbitmq/CMakeFiles/rabbitmq-static.dir/amqp_framing.c.o
[  2%] Building C object librabbitmq/CMakeFiles/rabbitmq-static.dir/amqp_api.c.o
[  3%] Building C object librabbitmq/CMakeFiles/rabbitmq-static.dir/amqp_connection.c.o
...
[ 95%] Built target test_tables
Scanning dependencies of target test_sasl_mechanism
[ 96%] Building C object tests/CMakeFiles/test_sasl_mechanism.dir/test_sasl_mechanism.c.o
[ 97%] Linking C executable test_sasl_mechanism
[ 97%] Built target test_sasl_mechanism
Scanning dependencies of target test_parse_url
[ 98%] Building C object tests/CMakeFiles/test_parse_url.dir/test_parse_url.c.o
[100%] Linking C executable test_parse_url
[100%] Built target test_parse_url
[ 16%] Built target rabbitmq-static
[ 33%] Built target rabbitmq
[ 38%] Built target amqp_ssl_connect
[ 42%] Built target amqp_sendstring
[ 47%] Built target amqp_rpc_sendstring_client
[ 51%] Built target amqp_bind
[ 56%] Built target amqp_listen
[ 60%] Built target amqp_connect_timeout
[ 65%] Built target amqp_listenq
[ 69%] Built target amqp_exchange_declare
[ 74%] Built target amqp_producer
[ 78%] Built target amqp_consumer
[ 83%] Built target amqp_unbind
[ 85%] Built target test_status_enum
[ 88%] Built target test_hostcheck
[ 91%] Built target test_merge_capabilities
[ 93%] Built target test_basic
[ 95%] Built target test_tables
[ 97%] Built target test_sasl_mechanism
[100%] Built target test_parse_url
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/3rdParty/x86_64_linux/rabbitmq-c/lib/cmake/rabbitmq-c/rabbitmq-c-config.cmake
-- Installing: /usr/local/3rdParty/x86_64_linux/rabbitmq-c/lib/cmake/rabbitmq-c/rabbitmq-c-config-version.cmake
-- Installing: /usr/local/3rdParty/x86_64_linux/rabbitmq-c/lib/cmake/rabbitmq-c/rabbitmq-targets.cmake
-- Installing: /usr/local/3rdParty/x86_64_linux/rabbitmq-c/lib/cmake/rabbitmq-c/rabbitmq-targets-release.cmake
-- Installing: /usr/local/3rdParty/x86_64_linux/rabbitmq-c/lib/pkgconfig/librabbitmq.pc
-- Installing: /usr/local/3rdParty/x86_64_linux/rabbitmq-c/lib/librabbitmq.so.4.4.1
-- Installing: /usr/local/3rdParty/x86_64_linux/rabbitmq-c/lib/librabbitmq.so.4
-- Installing: /usr/local/3rdParty/x86_64_linux/rabbitmq-c/lib/librabbitmq.so
-- Set runtime path of "/usr/local/3rdParty/x86_64_linux/rabbitmq-c/lib/librabbitmq.so.4.4.1" to ""
-- Installing: /usr/local/3rdParty/x86_64_linux/rabbitmq-c/lib/librabbitmq.a
-- Installing: /usr/local/3rdParty/x86_64_linux/rabbitmq-c/include/amqp.h
-- Installing: /usr/local/3rdParty/x86_64_linux/rabbitmq-c/include/amqp_framing.h
-- Installing: /usr/local/3rdParty/x86_64_linux/rabbitmq-c/include/amqp_tcp_socket.h
-- Installing: /usr/local/3rdParty/x86_64_linux/rabbitmq-c/include/amqp_ssl_socket.h
config:cmake -DCMAKE_INSTALL_PREFIX=/usr/local/3rdParty/x86_64_linux/rabbitmq-c         -DOPENSSL_INCLUDE_DIR=/usr/local/3rdParty/x86_64_linux/openssl/include         -DOPENSSL_SSL_LIBRARY=/usr/local/3rdParty/x86_64_linux/openssl/lib         -DOPENSSL_ROOT_DIR=/usr/local/3rdParty/x86_64_linux/openssl/         -DOPENSSL_CRYPTO_LIBRARIES=/usr/local/3rdParty/x86_64_linux/openssl/lib/libcrypto.so         -DOPENSSL_SSL_LIBRARIES=/usr/local/3rdParty/x86_64_linux/openssl/lib/libssl.so .
[root@localhost 3rdPartyLibs]#
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值