• 编译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]# 
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35

    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]#
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
  • 相关阅读:
    BSV 中的零开销私人时间戳
    Guitar Pro8最新2023中文免费吉他乐谱作曲练习工具
    Swagger的简单介绍,集成,以及如何在生产环境中关闭swagger,在测试和开发环境中自动打开
    C# 中NHibernate使用及配置映射
    2023最新Nmap安装和使用详解,超详细教程
    前端好用API之getBoundingClientRect
    【中秋】ijoc论文20230929
    webpack基础配置及使用
    基于SpringBoot的社团管理系统的设计与实现
    linux高级编程(网络)(www,http,URL)
  • 原文地址:https://blog.csdn.net/weixin_44328568/article/details/133044481