Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with folly & double-conversion: Unable to build surround360_render #263 #867

Closed
rinka-meltiron opened this issue Jun 13, 2018 · 2 comments

Comments

@rinka-meltiron
Copy link

I have opened an issue with surround360 but the issue is really with folly and double-conversion. Looks like the fix will really have to be done by folly.

The following are the details of the issue facebookarchive/Surround360#263 filed :
Background
I am running this on Kubuntu 16.04.04 LTS, a fresh install.
The error I get while linking surround360_render is:
[ 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
Using instructions at: https://github.com/facebook/Surround360/tree/master/surround360_render

  • I followed the instructions except for the ones for the python, numpy, pip. gooey, pil installs (I don't need python).
  • Installed ceres as described here, not on the ceres git page.
  • installed llvm, Halide to use accelerated ISP

and I get the error above while make'ing ...360_render

What I've tried so far

[ 98%] Generating folly_dep.cpp
Scanning dependencies of target folly
[ 98%] Building CXX object CMakeFiles/folly.dir/folly_dep.cpp.o
[ 99%] Linking CXX shared library libfolly.so
/usr/bin/ld: CMakeFiles/folly_base.dir/folly/ClockGettimeWrappers.cpp.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
CMakeFiles/folly_base.dir/folly/ClockGettimeWrappers.cpp.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
CMakeFiles/folly.dir/build.make:514: recipe for target 'libfolly.so' failed
make[2]: *** [libfolly.so] Error 1
CMakeFiles/Makefile2:180: recipe for target 'CMakeFiles/folly.dir/all' failed
make[1]: *** [CMakeFiles/folly.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
  • assuming it is a problem with the standard double-conversion-dev library installed by apt, I uninstalled that, recompiled double-conversion:
    git clone https://github.com/google/double-conversion.git
    cd double-conversion
    cmake -DBUILD_SHARED_LIBS=ON .
    make -j $(nproc)
    sudo make install
  • and rebuilt folly as follows:
    $ cmake configure ..

didn't work. redid cmake & make

    $ cmake configure "-DCMAKE_INCLUDE_PATH=$HOME/bin/fb-lib/double-conversion/build/include" "-DCMAKE_LIBRARY_PATH=$HOME/bin/fb-lib/double-conversion/build//lib" ..

error:

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.

:-(

@rinka-meltiron
Copy link
Author

rinka-meltiron commented Jun 17, 2018

OK. I fixed the issue. It was in CMakeLists.txt in Surround360_render. Please refer to the original defect for more details. Please close this issue, there is no impact on folly.

@snowattitude
Copy link

snowattitude commented Jul 24, 2023

did u means putting
INCLUDE_DIRECTORIES(/home/libolin/usr/local/include/double-conversion)

in the cmakelist.txt?
but when i put them ,The problem hasn't been solved, I don't know what I should do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants