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

Internal compiler error on Arch Linux's gcc-7.3.1 #195

Closed
vutiqibyl opened this issue May 4, 2018 · 5 comments · Fixed by #196
Closed

Internal compiler error on Arch Linux's gcc-7.3.1 #195

vutiqibyl opened this issue May 4, 2018 · 5 comments · Fixed by #196

Comments

@vutiqibyl
Copy link

Trying to compile eos with the following commands (from the eos folder root) :

mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=../install/ -DEOS_GENERATE_PYTHON_BINDINGS=on
make & make install

Fails with an internal compiler error: unexpected expression
pip install eos-py leads to the same error.

What could cause this issue ?

Here is the full output of
cmake :

-- The CXX compiler identification is GNU 7.3.1
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Options:
-- EOS_BUILD_EXAMPLES: ON
-- EOS_BUILD_CERES_EXAMPLE: OFF
-- EOS_BUILD_UTILS: OFF
-- EOS_BUILD_DOCUMENTATION: OFF
-- EOS_GENERATE_PYTHON_BINDINGS: on
-- EOS_GENERATE_MATLAB_BINDINGS: OFF
-- Eigen3 found: TRUE, version: 3.3.4
-- Eigen3 include dir found at /home/black/Software/eos/3rdparty/eigen
-- Found OpenCV: /usr/local (found version "3.3.1") found components:  core 
-- OpenCV 3.x detected - including imgcodecs for compatibility
-- Found OpenCV: /usr/local (found suitable version "3.3.1", minimum required is "3") found components:  core imgproc imgcodecs 
-- Boost version: 1.66.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   program_options
-- Boost found at /usr/include
-- Found PythonInterp: /usr/bin/python3.6 (found version "3.6.4") 
-- Found PythonLibs: /usr/lib/libpython3.6m.so
-- pybind11 v2.3.dev0
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /home/black/Software/eos/build

make :

[1] 22709
Scanning dependencies of target fit-model
Scanning dependencies of target fit-model
[ 10%] Building CXX object examples/CMakeFiles/fit-model.dir/fit-model.cpp.o
[ 10%] Building CXX object examples/CMakeFiles/fit-model.dir/fit-model.cpp.o
In file included from /home/black/Software/eos/3rdparty/toml11/toml.hpp:39:0,
                 from /home/black/Software/eos/include/eos/core/LandmarkMapper.hpp:27,
                 from /home/black/Software/eos/examples/fit-model.cpp:23:
/home/black/Software/eos/3rdparty/toml11/toml/get.hpp: In substitution of ‘template<class T, toml::value_t vT, typename std::enable_if<((vT == Unknown) && toml::detail::is_map<T>::value), std::nullptr_t>::type <anonymous> > T toml::get(const toml::value&) [with T = std::unordered_map<std::__cxx11::basic_string<char>, toml::value>; toml::value_t vT = <missing>; typename std::enable_if<((vT == Unknown) && toml::detail::is_map<T>::value), std::nullptr_t>::type <anonymous> = <missing>]’:
/home/black/Software/eos/include/eos/core/LandmarkMapper.hpp:77:88:   required from here
/home/black/Software/eos/3rdparty/toml11/toml/get.hpp:44:69: internal compiler error: unexpected expression ‘check_type<std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, toml::value, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, toml::value> > > >’ of kind template_id_expr
 template<typename T, toml::value_t vT = toml::detail::check_type<T>(),
                                                                     ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
make[2]: *** [examples/CMakeFiles/fit-model.dir/build.make:63: examples/CMakeFiles/fit-model.dir/fit-model.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:124: examples/CMakeFiles/fit-model.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
In file included from /home/black/Software/eos/3rdparty/toml11/toml.hpp:39:0,
                 from /home/black/Software/eos/include/eos/core/LandmarkMapper.hpp:27,
                 from /home/black/Software/eos/examples/fit-model.cpp:23:
/home/black/Software/eos/3rdparty/toml11/toml/get.hpp: In substitution of ‘template<class T, toml::value_t vT, typename std::enable_if<((vT == Unknown) && toml::detail::is_map<T>::value), std::nullptr_t>::type <anonymous> > T toml::get(const toml::value&) [with T = std::unordered_map<std::__cxx11::basic_string<char>, toml::value>; toml::value_t vT = <missing>; typename std::enable_if<((vT == Unknown) && toml::detail::is_map<T>::value), std::nullptr_t>::type <anonymous> = <missing>]’:
/home/black/Software/eos/include/eos/core/LandmarkMapper.hpp:77:88:   required from here
/home/black/Software/eos/3rdparty/toml11/toml/get.hpp:44:69: internal compiler error: unexpected expression ‘check_type<std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, toml::value, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, toml::value> > > >’ of kind template_id_expr
 template<typename T, toml::value_t vT = toml::detail::check_type<T>(),
                                                                     ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
make[2]: *** [examples/CMakeFiles/fit-model.dir/build.make:63: examples/CMakeFiles/fit-model.dir/fit-model.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:124: examples/CMakeFiles/fit-model.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
[1]  + 22709 exit 2     make
@patrikhuber
Copy link
Owner

I've encountered this a few days ago too - unfortunately Arch Linux/gcc-7.3.1 seem to have a bug/regression that causes this. I would advise to report this bug to Arch/gcc so that it gets fixed.
In the meantime the only thing I can suggest is using a slightly earlier version of gcc (or maybe clang?).

@patrikhuber patrikhuber changed the title Compilation error : internal compiler error: unexpected expression Internal compiler error on Arch's gcc-7.3.1 May 4, 2018
@patrikhuber patrikhuber changed the title Internal compiler error on Arch's gcc-7.3.1 Internal compiler error on Arch Linux's gcc-7.3.1 May 4, 2018
@patrikhuber
Copy link
Owner

patrikhuber commented May 5, 2018

@vutiqibyl: The author of toml11 just had a stab at working around the ICE - I can't currently test it locally, but if you pull in the latest upstream master changes for the 3rdparty/toml11 submodule, it should presumably work again!
If you could try it and report back whether it works?

@vutiqibyl
Copy link
Author

vutiqibyl commented May 5, 2018

Thank you for your quick answer.
After doing a git checkout master and git pull from 3rdparty/toml11, the error no longer occurs, although I now get undefined reference to "Imf_2_2:: errors.
The same happens with clang-5.0.1.

gcc-7.3.1 :

Scanning dependencies of target fit-model
[ 10%] Building CXX object examples/CMakeFiles/fit-model.dir/fit-model.cpp.o
[ 20%] Linking CXX executable fit-model
/usr/bin/ld: warning: libImath-2_2.so.12, needed by /usr/local/lib64/libopencv_imgcodecs.so.3.3.1, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libIlmImf-2_2.so.22, needed by /usr/local/lib64/libopencv_imgcodecs.so.3.3.1, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libIex-2_2.so.12, needed by /usr/local/lib64/libopencv_imgcodecs.so.3.3.1, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libHalf.so.12, needed by /usr/local/lib64/libopencv_imgcodecs.so.3.3.1, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libIlmThread-2_2.so.12, needed by /usr/local/lib64/libopencv_imgcodecs.so.3.3.1, not found (try using -rpath or -rpath-link)
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::globalThreadCount()'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::ChannelList::insert(char const*, Imf_2_2::Channel const&)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::InputFile::header() const'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::hasChromaticities(Imf_2_2::Header const&)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::OutputFile::writePixels(int)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::InputFile::setFrameBuffer(Imf_2_2::FrameBuffer const&)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::InputFile::readPixels(int, int)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::Channel::Channel(Imf_2_2::PixelType, int, int, bool)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::Slice::Slice(Imf_2_2::PixelType, char*, unsigned long, unsigned long, int, int, double, bool, bool)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::OutputFile::setFrameBuffer(Imf_2_2::FrameBuffer const&)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::Header::dataWindow() const'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::Header::channels()'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `half::_eLut'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::Header::channels() const'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::Header::~Header()'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::Header::Header(int, int, float, Imath_2_2::Vec2<float> const&, float, Imf_2_2::LineOrder, Imf_2_2::Compression)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::InputFile::InputFile(char const*, int)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::OutputFile::OutputFile(char const*, Imf_2_2::Header const&, int)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::FrameBuffer::insert(char const*, Imf_2_2::Slice const&)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::ChannelList::findChannel(char const*) const'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::chromaticities(Imf_2_2::Header const&)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `half::convert(int)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::Chromaticities::Chromaticities(Imath_2_2::Vec2<float> const&, Imath_2_2::Vec2<float> const&, Imath_2_2::Vec2<float> const&, Imath_2_2::Vec2<float> const&)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::OutputFile::~OutputFile()'
collect2: error: ld returned 1 exit status
make[2]: *** [examples/CMakeFiles/fit-model.dir/build.make:101: examples/fit-model] Error 1
make[1]: *** [CMakeFiles/Makefile2:124: examples/CMakeFiles/fit-model.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

clang-5.0.1 :

Scanning dependencies of target fit-model
[ 10%] Building CXX object examples/CMakeFiles/fit-model.dir/fit-model.cpp.o
In file included from /home/black/Software/eos/examples/fit-model.cpp:25:
In file included from /home/black/Software/eos/include/eos/fitting/fitting.hpp:30:
In file included from /home/black/Software/eos/include/eos/morphablemodel/EdgeTopology.hpp:28:
In file included from /home/black/Software/eos/3rdparty/cereal/include/cereal/archives/json.hpp:62:
/home/black/Software/eos/3rdparty/cereal/include/cereal/external/rapidjson/document.h:597:9: warning: 'GenericValue' has
      a non-throwing exception specification but can still throw [-Wexceptions]
        CEREAL_RAPIDJSON_ASSERT(type <= kNumberType);
        ^
/home/black/Software/eos/3rdparty/cereal/include/cereal/archives/json.hpp:46:3: note: expanded from macro
      'CEREAL_RAPIDJSON_ASSERT'
  throw ::cereal::RapidJSONException("rapidjson internal assertion failure: " #x); }
  ^
/home/black/Software/eos/3rdparty/cereal/include/cereal/external/rapidjson/document.h:2357:66: note: in instantiation of
      member function 'rapidjson::GenericValue<rapidjson::UTF8<char>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::GenericValue' requested here
    bool StartObject() { new (stack_.template Push<ValueType>()) ValueType(kObjectType); return true; }
                                                                 ^
/home/black/Software/eos/3rdparty/cereal/include/cereal/external/rapidjson/reader.h:1671:77: note: in instantiation of
      member function 'rapidjson::GenericDocument<rapidjson::UTF8<char>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>::StartObject' requested here
            bool hr = (dst == IterativeParsingObjectInitialState) ? handler.StartObject() : handler.StartArray();
                                                                            ^
/home/black/Software/eos/3rdparty/cereal/include/cereal/external/rapidjson/reader.h:1832:39: note: in instantiation of
      function template specialization 'rapidjson::GenericReader<rapidjson::UTF8<char>, rapidjson::UTF8<char>,
      rapidjson::CrtAllocator>::Transit<272, rapidjson::BasicIStreamWrapper<std::basic_istream<char> >,
      rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,
      rapidjson::CrtAllocator> >' requested here
            IterativeParsingState d = Transit<parseFlags>(state, t, n, is, handler);
                                      ^
/home/black/Software/eos/3rdparty/cereal/include/cereal/external/rapidjson/reader.h:487:20: note: in instantiation of
      function template specialization 'rapidjson::GenericReader<rapidjson::UTF8<char>, rapidjson::UTF8<char>,
      rapidjson::CrtAllocator>::IterativeParse<272, rapidjson::BasicIStreamWrapper<std::basic_istream<char> >,
      rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,
      rapidjson::CrtAllocator> >' requested here
            return IterativeParse<parseFlags>(is, handler);
                   ^
/home/black/Software/eos/3rdparty/cereal/include/cereal/external/rapidjson/document.h:2159:40: note: in instantiation of
      function template specialization 'rapidjson::GenericReader<rapidjson::UTF8<char>, rapidjson::UTF8<char>,
      rapidjson::CrtAllocator>::Parse<272, rapidjson::BasicIStreamWrapper<std::basic_istream<char> >,
      rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,
      rapidjson::CrtAllocator> >' requested here
        parseResult_ = reader.template Parse<parseFlags>(is, *this);
                                       ^
/home/black/Software/eos/3rdparty/cereal/include/cereal/external/rapidjson/document.h:2185:16: note: in instantiation of
      function template specialization 'rapidjson::GenericDocument<rapidjson::UTF8<char>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>::ParseStream<272,
      rapidjson::UTF8<char>, rapidjson::BasicIStreamWrapper<std::basic_istream<char> > >' requested here
        return ParseStream<kParseDefaultFlags, Encoding, InputStream>(is);
               ^
/home/black/Software/eos/3rdparty/cereal/include/cereal/archives/json.hpp:438:21: note: in instantiation of function
      template specialization 'rapidjson::GenericDocument<rapidjson::UTF8<char>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,
      rapidjson::CrtAllocator>::ParseStream<rapidjson::BasicIStreamWrapper<std::basic_istream<char> > >' requested here
        itsDocument.ParseStream<>(itsReadStream);
                    ^
/home/black/Software/eos/3rdparty/cereal/include/cereal/external/rapidjson/document.h:592:14: note: function declared
      non-throwing here
    explicit GenericValue(Type type) CEREAL_RAPIDJSON_NOEXCEPT : data_() {
             ^                       ~~~~~~~~~~~~~~~~~~~~~~~~~
/home/black/Software/eos/3rdparty/cereal/include/cereal/external/rapidjson/document.h:756:9: warning: 'operator=' has a
      non-throwing exception specification but can still throw [-Wexceptions]
        CEREAL_RAPIDJSON_ASSERT(this != &rhs);
        ^
/home/black/Software/eos/3rdparty/cereal/include/cereal/archives/json.hpp:46:3: note: expanded from macro
      'CEREAL_RAPIDJSON_ASSERT'
  throw ::cereal::RapidJSONException("rapidjson internal assertion failure: " #x); }
  ^
/home/black/Software/eos/3rdparty/cereal/include/cereal/external/rapidjson/document.h:2162:24: note: in instantiation of
      member function 'rapidjson::GenericValue<rapidjson::UTF8<char>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::operator=' requested here
            ValueType::operator=(*stack_.template Pop<ValueType>(1));// Move value from stack to document
                       ^
/home/black/Software/eos/3rdparty/cereal/include/cereal/external/rapidjson/document.h:2185:16: note: in instantiation of
      function template specialization 'rapidjson::GenericDocument<rapidjson::UTF8<char>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>::ParseStream<272,
      rapidjson::UTF8<char>, rapidjson::BasicIStreamWrapper<std::basic_istream<char> > >' requested here
        return ParseStream<kParseDefaultFlags, Encoding, InputStream>(is);
               ^
/home/black/Software/eos/3rdparty/cereal/include/cereal/archives/json.hpp:438:21: note: in instantiation of function
      template specialization 'rapidjson::GenericDocument<rapidjson::UTF8<char>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,
      rapidjson::CrtAllocator>::ParseStream<rapidjson::BasicIStreamWrapper<std::basic_istream<char> > >' requested here
        itsDocument.ParseStream<>(itsReadStream);
                    ^
/home/black/Software/eos/3rdparty/cereal/include/cereal/external/rapidjson/document.h:755:19: note: function declared
      non-throwing here
    GenericValue& operator=(GenericValue& rhs) CEREAL_RAPIDJSON_NOEXCEPT {
                  ^                            ~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
[ 20%] Linking CXX executable fit-model
/usr/bin/ld: warning: libImath-2_2.so.12, needed by /usr/local/lib64/libopencv_imgcodecs.so.3.3.1, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libIlmImf-2_2.so.22, needed by /usr/local/lib64/libopencv_imgcodecs.so.3.3.1, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libIex-2_2.so.12, needed by /usr/local/lib64/libopencv_imgcodecs.so.3.3.1, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libHalf.so.12, needed by /usr/local/lib64/libopencv_imgcodecs.so.3.3.1, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libIlmThread-2_2.so.12, needed by /usr/local/lib64/libopencv_imgcodecs.so.3.3.1, not found (try using -rpath or -rpath-link)
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::globalThreadCount()'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::ChannelList::insert(char const*, Imf_2_2::Channel const&)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::InputFile::header() const'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::hasChromaticities(Imf_2_2::Header const&)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::OutputFile::writePixels(int)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::InputFile::setFrameBuffer(Imf_2_2::FrameBuffer const&)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::InputFile::readPixels(int, int)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::Channel::Channel(Imf_2_2::PixelType, int, int, bool)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::Slice::Slice(Imf_2_2::PixelType, char*, unsigned long, unsigned long, int, int, double, bool, bool)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::OutputFile::setFrameBuffer(Imf_2_2::FrameBuffer const&)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::Header::dataWindow() const'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::Header::channels()'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `half::_eLut'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::Header::channels() const'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::Header::~Header()'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::Header::Header(int, int, float, Imath_2_2::Vec2<float> const&, float, Imf_2_2::LineOrder, Imf_2_2::Compression)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::InputFile::InputFile(char const*, int)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::OutputFile::OutputFile(char const*, Imf_2_2::Header const&, int)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::FrameBuffer::insert(char const*, Imf_2_2::Slice const&)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::ChannelList::findChannel(char const*) const'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::chromaticities(Imf_2_2::Header const&)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `half::convert(int)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::Chromaticities::Chromaticities(Imath_2_2::Vec2<float> const&, Imath_2_2::Vec2<float> const&, Imath_2_2::Vec2<float> const&, Imath_2_2::Vec2<float> const&)'
/usr/local/lib64/libopencv_imgcodecs.so.3.3.1: undefined reference to `Imf_2_2::OutputFile::~OutputFile()'
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [examples/CMakeFiles/fit-model.dir/build.make:101: examples/fit-model] Error 1
make[1]: *** [CMakeFiles/Makefile2:124: examples/CMakeFiles/fit-model.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

@patrikhuber
Copy link
Owner

patrikhuber commented May 5, 2018

Hey that's awesome, great!

The error you're getting now seems only related to OpenCV and has nothing to do with eos.
I have no idea what Imf_* is, but maybe installing libImath, libIlmImf, etc. and the rest of the stuff that it's complaining about helps? OpenCV shouldn't need these though so I strongly suspect this is specific to your system or to Arch/Manjaro. This would probably be something for the Arch/Manjaro forums.

Btw: eos doesn't need OpenCV - you only need OpenCV for the example programs, if you want to run them. The eos library doesn't need it.

@vutiqibyl
Copy link
Author

Thank you, I switched EOS_BUILD_EXAMPLES to OFF with ccmake, and it now compiles without problem.
The undefined reference errors were due to a mismatch between the .so files (looking for .so.12 while they end with .so.23), and making soft links to the correct files solves the issue and allows the compilation with EOS_BUILD_EXAMPLES=ON as well.

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

Successfully merging a pull request may close this issue.

2 participants