首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法构建surround360_render - CMake问题

无法构建surround360_render - CMake问题
EN

Stack Overflow用户
提问于 2018-06-16 14:21:02
回答 1查看 436关注 0票数 0

后台我正在Kubuntu16.04.04LTS上运行,这是一个新的安装。我试图基于以下代码和说明构建surround360_render:render

  • 除了python,numpy,pip之外,我遵循了说明。我不需要蟒蛇。
  • 根据这里的说明安装here,而不是在ceres git页面上安装。
  • 安装llvm,Halide使用加速ISP

在制作...360_render时,我得到了以下错误:

代码语言:javascript
复制
[ 92%] Linking CXX executable bin/Unpacker
//usr/local/lib/libfolly.a(Conv.cpp.o): In function `folly::Expected<float, folly::ConversionCode> folly::detail::str_to_floating<float>(folly::Range<char const*>*)':
/home/rinka/bin/fb-lib/folly/folly/folly/Conv.cpp:354: undefined reference to `double_conversion::StringToDoubleConverter::StringToDouble(char const*, int, int*) const'
//usr/local/lib/libfolly.a(Conv.cpp.o): In function `folly::Expected<double, folly::ConversionCode> folly::detail::str_to_floating<double>(folly::Range<char const*>*)':
/home/rinka/bin/fb-lib/folly/folly/folly/Conv.cpp:354: undefined reference to `double_conversion::StringToDoubleConverter::StringToDouble(char const*, int, int*) const'
//usr/local/lib/libfolly.a(dynamic.cpp.o): In function `double_conversion::DoubleToStringConverter::ToShortest(double, double_conversion::StringBuilder*) const':
/usr/local/include/double-conversion/double-conversion.h:158: undefined reference to `double_conversion::DoubleToStringConverter::ToShortestIeeeNumber(double, double_conversion::StringBuilder*, double_conversion::DoubleToStringConverter::DtoaMode) const'
//usr/local/lib/libfolly.a(dynamic.cpp.o): In function `std::enable_if<std::is_floating_point<double>::value&&folly::IsSomeString<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::value, void>::type folly::toAppend<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, double>(double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, double_conversion::DoubleToStringConverter::DtoaMode, unsigned int)':
/home/rinka/bin/fb-lib/folly/folly/folly/Conv.h:704: undefined reference to `double_conversion::DoubleToStringConverter::ToFixed(double, int, double_conversion::StringBuilder*) const'
/home/rinka/bin/fb-lib/folly/folly/folly/Conv.h:708: undefined reference to `double_conversion::DoubleToStringConverter::ToPrecision(double, int, double_conversion::StringBuilder*) const'
//usr/local/lib/libfolly.a(Format.cpp.o): In function `folly::FormatValue<double, void>::formatHelper(folly::basic_fbstring<char, std::char_traits<char>, std::allocator<char>, folly::fbstring_core<char> >&, int&, folly::FormatArg&) const':
/home/rinka/bin/fb-lib/folly/folly/folly/Format.cpp:162: undefined reference to `double_conversion::DoubleToStringConverter::ToFixed(double, int, double_conversion::StringBuilder*) const'
/home/rinka/bin/fb-lib/folly/folly/folly/Format.cpp:181: undefined reference to `double_conversion::DoubleToStringConverter::ToExponential(double, int, double_conversion::StringBuilder*) const'
collect2: error: ld returned 1 exit status
CMakeFiles/TestRenderStereoPanorama.dir/build.make:112: recipe for target 'bin/TestRenderStereoPanorama' failed
make[2]: *** [bin/TestRenderStereoPanorama] Error 1
CMakeFiles/Makefile2:556: recipe for target 'CMakeFiles/TestRenderStereoPanorama.dir/all' failed
make[1]: *** [CMakeFiles/TestRenderStereoPanorama.dir/all] Error 2
[ 96%] Built target Unpacker
[ 96%] Built target GeometricCalibration
Makefile:83: recipe for target 'all' failed

我到目前为止尝试过的

  • 我试图实现https://github.com/facebook/Surround360/issues/253失败。我收到以下信息: 98%生成目标folly_dep.cpp扫描依赖关系,98%生成CXX对象CMakeFiles/folly.dir/ folly _dep.cpp.o 99%链接CXX共享库libfolly.so /usr/bin/ld:在创建共享对象时不能使用针对`.rodata的libfolly.so重新定位R_X86_64_32‘;使用CMakeFiles/folly_base.dir/folly/ClockGettimeWrappers.cpp.o:错误重新编译,添加符号:坏值collect2:错误: ld返回1个退出状态CMakeFiles/folly.dir/build.make:514:目标' libfolly.so‘失败make2的配方:*libfolly.so错误1 CMakeFiles/Makefile2:180:目标' CMakeFiles/folly.dir/all’failed make1:*CMakeFiles/folly.dir/all Error 2 Makefile 2 Makefile:127
  • 假设apt安装的标准双转换-dev库存在问题,我使用以下说明卸载该库,重新编译双转换: git克隆https://github.com/google/double-conversion.git cd双转换cmake -DBUILD_SHARED_LIBS=ON .使-j $(nproc) sudo
  • 重建的愚蠢之处如下: $ cmake配置..。$ make -j $(nproc)

没起作用。重做cmake & make

代码语言:javascript
复制
    $ cmake configure "-DCMAKE_INCLUDE_PATH=$HOME/bin/fb-lib/double-conversion/build/include" "-DCMAKE_LIBRARY_PATH=$HOME/bin/fb-lib/double-conversion/build//lib" ..
    $ make -j $(nproc)

我得到以下错误:

代码语言:javascript
复制
    CMake Error at CMakeLists.txt:201 (find_package):
        Could not find a package configuration file provided by "double-conversion"
        with any of the following names:

        double-conversionConfig.cmake
        double-conversion-config.cmake

    Add the installation prefix of "double-conversion" to CMAKE_PREFIX_PATH or
    set "double-conversion_DIR" to a directory containing one of the above
    files.  If "double-conversion" provides a separate development package or
    SDK, be sure it has been installed.
EN

回答 1

Stack Overflow用户

发布于 2018-06-19 06:28:23

这些问题是因为“双转换”没有作为一个库包括在surround360_render的各个模块中。要解决这个问题,在目录CMakeLists.txt下修改surround360_render,如下所示:

添加:

双转换

到失败的各个模块的TARGET_LINK_LIBRARIES部分。在我的例子中,失败的模块是: TestRenderStereoPanorama、TestHyperPreview、TestPoleRemoval、TestColorCalibration、TestVignettingCalibration、TestVignettingDataAcquisition和GeometricCalibration。

我列出这些的原因是,有比这些模块更多的模块,这就是为什么我们不需要添加双转换作为默认库来链接。

把这个放在这里以防别人遇到类似的问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50888726

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档