PCL安装直接链接到提高安装目录莫名其妙 [英] PCL install links directly to boost installation directory somehow

查看:203
本文介绍了PCL安装直接链接到提高安装目录莫名其妙的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有安装PCL的一个非常奇怪的问题。基本上,我已成立PCL,升压,cmake的,FLANN等。这一切构建和正确编译。我复制并建立了<一个href=\"http://pointclouds.org/documentation/tutorials/iterative_closest_point.php#iterative-closest-point\"相对=nofollow> ICP例如和它建立就好了。

I have a very odd problem with the installation of PCL. Basically i have set up PCL, boost, cmake, flann etc.. it all builds and compiles correctly. I copied and built the ICP example and it builds just fine.

下面是会很奇怪。当我运行该应用程序我得到以下错误:

Here is where it gets weird. When I run the application I get the following error:

ldd:FATAL: Could not load library bin.v2/libs/system/build/qcc-4.4.2/
release/threading-multi/libboost_system.so.1.48.0

所以 libboost_system.so.1.48.0 存在的/ usr / local / lib目录路径和是偶数早些时候由相同的应用程序,即联。如果我运行 LDD 应用程序我碰到下面的链接库的信息:

So libboost_system.so.1.48.0 exists in the /usr/local/lib path and is even linked earlier by the same application, ie. if i run ldd on the application i get the following linked library information:

$ ldd iterative_closest_point
./iterative_closest_point:
libboost_system.so => /usr/local/lib/libboost_system.so.1.48.0 (0xb8200000)
libboost_filesystem.so => /usr/local/lib/libboost_filesystem.so.1.48.0 (0xb8209000)
libboost_thread.so => /usr/local/lib/libboost_thread.so.1.48.0 (0xb8225000)
OTHER BOOST
libpcl_common.so.1.7 => /usr/local/lib/libpcl_common.so.1.7.1 (0xb82ea000)
libpcl_octree.so.1.7 => /usr/local/lib/libpcl_octree.so.1.7.1 (0xb838c000)
OTHER PCL
libstdc++.so.6 => /usr/qnx650/target/qnx6/x86/lib/libstdc++.so.6.0.13 (0xb9285000)
libm.so.2 => /usr/qnx650/target/qnx6/x86/lib/libm.so.2 (0xb8774000)
libc.so.3 => /usr/lib/ldqnx.so.2 (0xb0300000)
ldd:FATAL: Could not load library bin.v2/libs/system/build/qcc-4.4.2/release/threading-multi/libboost_system.so.1.48.0

所以,我做了一些调查,到底PCL寻找,什么是bin.v2?它存在于升压安装目录????

So I did some investigation into what the hell PCL is looking for, what is bin.v2? It exists in the boost install directory????

现在这里是它只是变得坚果,如果我从升压绝对路径运行程序的安装目录,即。其中bin.v2文件夹存在:

Now here is where it just gets nuts, if i run the program with an absolute path from the boost install directory ie. where the bin.v2 folder exists:

qnx:/root/boost/boost_1_48_0# /root/experiments/checkPCL/iterative_closest_point

它的作品!节目输出所需要的东西。所以,我很喜欢没事,在这里让我们运行LDD:

it works!! the program outputs the desired things. So i was like alright, lets run ldd here:

qnx:/root/boost/boost_1_48_0# ldd /root/experiments/checkPCL/iterative_closest_point

和我们得到这样的:

    libboost_system.so => /usr/local/lib/libboost_system.so.1.48.0 (0xb8200000)
MORE BOOST
libpcl_common.so.1.7 => /usr/local/lib/libpcl_common.so.1.7.1 (0xb82ea000)
MORE PCL
libstdc++.so.6 => /usr/qnx650/target/qnx6/x86/lib/libstdc++.so.6.0.13 (0xb9285000)
libm.so.2 => /usr/qnx650/target/qnx6/x86/lib/libm.so.2 (0xb8774000)
libc.so.3 => /usr/lib/ldqnx.so.2 (0xb0300000)
libboost_system.so.1.48.0 => /root/SMG/extern/libs/boost/boost_1_48_0/bin.v2/libs/system/build/qcc-4.4.2/release/threading-multi/libboost_system.so.1.48.0 (0xb87a7000)
libbz2.so.1.0.4 => /usr/lib/libbz2.so.1.0.4 (0xb87b0000)
libz.so.2 => /proc/boot/libz.so.2 (0xb87c2000)

大长一个是绝对链接到升压文件路径。我不知道如何 PCL LDD 或任何可以知道这条道路。

The big long one is an absolute link into the boost filepath. I dont understand how PCL or ldd or anything could know about this path.

有没有人有关于如何可能会发生什么想法?另外我需要如何解决它的一些解决方案。

Does anyone have any ideas about how this could have happened? Also I need some solutions on how to fix it.

修改+地址:

所以最近,我不知道发生了什么变化,但我已经开始得到链接器警告的(不出错)的:

So recently, i am not sure what has changed but i have started to get the linker warning (not error):

/usr/qnx650/host/qnx6/x86/usr/bin/ntox86-ld: warning: bin.v2/libs/system/build/
qcc-4.4.2/release/threading-multi/libboost_system.so.1.48.0, needed by
/usr/local/lib/libboost_filesystem.so, not found (try using -rpath or -rpath-link)

所以不管是什么原因,这绝对是试图链接到 bin.v2 /.../...这是绝对坚果,我从来没有见过这个?现在我已经走遍了升压安装目录寻找的东西,可能会导致此。没有什么是不寻常的刺激是如何安装的。

so for whatever reason this is definitely attempting to link to bin.v2/.../... which is absolutely nuts, i have never seen this before? I have now scoured the boost install directory looking for things that might caused this. Nothing is unusual about how boost is installed.

作为进一步的说明我做了一个简单的例子,有主要的,包括和打印它的作品一个程序,它具有以下的CMakeLists.txt:

As a further note i have made a simple example, a program that has main, includes and prints "it works", it has the following CMakeLists.txt:

find_package(PCL 1.2 REQUIRED)
find_package(Boost 1.48.0 COMPONENTS system filesystem REQUIRED)
add_executable (test test.cpp)
target_link_libraries(test
   ${BOOST_FILESYSTEM}  #Works
   ${PCL_DEFINITIONS}   #Works
   ${PCL_SEARCH_LIBRARIES} #If i add this it fails!
)

因此​​,它似乎是PCL和提升的互动不好,导致一些真正疯狂的行为!

So it seems like PCL and boost are interacting badly and causing some truly crazy behavior!

推荐答案

如果它包含 bin.v2 /库/系统/建设/ QCC-4.4.2 /释放的绝对目录工作/线程的多/ 那么很可能你有

If it works from the absolute directory that contains bin.v2/libs/system/build/qcc-4.4.2/release/threading-multi/ then probably you have


  • 设置 LD_LIBRARY_PATH 设置为包含(当前工作目录)

  • 添加使用 ldconfig的不知何故当前工作目录(有几种方式)

  • set LD_LIBRARY_PATH set to include . (the current working directory)
  • added the current work directory using ldconfig somehow (there's several ways)

这是一般一个坏主意。这是特别是如果你以root身份运行(这似乎你这样做),因为它可以被利用作为一个安全漏洞是一个坏主意。

This is a bad idea in general. It's especially a bad idea if you're running as root (which it seems you do) because it can be exploited as a security hole.

真正的问题仍然显得链接器嵌入的完整路径, libboost_system 。我不知道是什么原因造成这一点,但也许

The real issue would still appear to be that the linker embeds the full path for libboost_system. I don't know what causes this, but perhaps


  • 您指定库,如 -lboost_system 代替具体源( libboost_system.so.1.48.0 在大多数的连接器/编译器)

  • 这是某种形式的连接选项(如 -rpath ?)

  • you specify the library as a concrete source (libboost_system.so.1.48.0 in stead of -lboost_system on most linkers/compilers)
  • it is some kind of linker option (like -rpath?)

希望这有助于

这篇关于PCL安装直接链接到提高安装目录莫名其妙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆