从源代码构建 Qpid Messaging API(C++,绑定)[Qpid C++ 1.37.0] - 缺少文件

building from source Qpid Messaging API (C++, bindings) [Qpid C++ 1.37.0] - missing files

我正在尝试从源代码构建 Qpid Messaging API (C++, bindings)。 构建在 RHEL 上触发,下面 link 上提到的所有先决条件都已安装。

https://git-wip-us.apache.org/repos/asf?p=qpid-cpp.git;a=blob_plain;f=INSTALL.txt;hb=HEAD

然而到达步骤时:使所有

我得到的是这个

错误:

Linking CXX shared library libqpidclient.so
[ 86%] Built target qpidclient
Scanning dependencies of target qpidmessaging
[ 86%] Building CXX object src/CMakeFiles/qpidmessaging.dir/qpid/messaging/amqp/AddressHelper.cpp.o
In file included from /home/m020390/qpid_cpp/qpid-cpp-1.37.0/src/qpid/messaging/amqp/AddressHelper.cpp:22:0:
/home/m020390/qpid_cpp/qpid-cpp-1.37.0/src/qpid/messaging/amqp/PnData.h:27:27: fatal error: proton/engine.h: No such file or directory
 #include <proton/engine.h>
                           ^
compilation terminated.
make[3]: *** [src/CMakeFiles/qpidmessaging.dir/qpid/messaging/amqp/AddressHelper.cpp.o] Error 1
make[2]: *** [src/CMakeFiles/qpidmessaging.dir/all] Error 2
make[1]: *** [examples/messaging/CMakeFiles/client.dir/rule] Error 2
make: *** [client] Error 2

这表明“Qpid proton-c”可能丢失但已安装....

有什么想法吗?

正如您在 INSTALL 文件中所述,您将 link 提供给:

Note: If Proton is installed in a non-standard location, there are two ways to locate it:

  1. Recommended: use proton 0.7 or later and use the same install prefix for both Proton and Qpid.
  2. Using pkg-config: set the PKG_CONFIG_PATH environment variable to /lib[64]/pkgconfig before running cmake.

我会选择方法 1 并重建 Proton,为 cmake 指定一个安装前缀,这样:

cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local

然后为 Qpid 使用相同的前缀(即再次 运行 cmake,就像上面一样)。

使用这些步骤对我有用。

$ wget http://apache.claz.org/qpid/proton/0.18.1/qpid-proton-0.18.1.tar.gz                                                 
$ tar -xf qpid-proton-0.18.1.tar.gz                                                                                        
$ cd qpid-proton-0.18.1/                                                                                                   
$ mkdir bld                                                                                                                
$ cd bld                                                                                                                   
$ cmake .. -DCMAKE_INSTALL_PREFIX=/tmp/testprefix                                                                          
$ make -j8                                                                                                                 
$ make install                                                                                                             
$ cd ../..                                                                                                                 
$ wget http://apache.claz.org/qpid/cpp/1.37.0/qpid-cpp-1.37.0.tar.gz                                                       
$ tar -xf qpid-cpp-1.37.0.tar.gz                                                                                           
$ cd qpid-cpp-1.37.0/                                                                                                      
$ mkdir bld                                                                                                                
$ cd bld                                                                                                                   
$ cmake .. -DCMAKE_INSTALL_PREFIX=/tmp/testprefix                                                                          
>>>> Here check for "Found Proton" in the cmake output <<<<                                                                                       
$ make -j8                                                                                                                 
$ make install                                                                                                             

检查 proton/engine.h 是否在您认为应该的位置。在你的情况下,它看起来像是 /usr/local/include/proton/engine.h.

您可以使用以下命令查看您的包含搜索路径是什么。

cpp -v /dev/null -o /dev/null