nokiatech / heif

High Efficiency Image File Format
Other
1.75k stars 248 forks source link

Build issues using GCC4.8 on Ubuntu14.04 #52

Closed jimuzhou closed 6 years ago

jimuzhou commented 6 years ago

I use these commands to build the project: cmake ../srcs make and I got below error, somebody help me please?

  1. cmake log cmake ../srcs -- The CXX compiler identification is GNU 4.8.4 -- The C compiler identification is GNU 4.8.4 -- 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 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done Allocator test failed, enable fix fatal: Not a git repository (or any parent up to mount point /home) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). Could not get version information from git -- System name : Linux -- Project Name : heif -- Project directory : ~/opensource/heif-3.2/srcs -- Build called from : ~/opensource/heif-3.2/build -- Executables in : ~/opensource/heif-3.2/build/bin -- Libraries in : -- Configuring done -- Generating done -- Build files have been written to: ~/opensource/heif-3.2/build

  2. build log /usr/local/bin/cmake -H~/opensource/heif-3.2/srcs -B~/opensource/heif-3.2/build --check-build-system CMakeFiles/Makefile.cmake 0 /usr/local/bin/cmake -E cmake_progress_start ~/opensource/heif-3.2/build/CMakeFiles ~/opensource/heif-3.2/build/CMakeFiles/progress.marks make -f CMakeFiles/Makefile2 all make[1]: Entering directory ~/opensource/heif-3.2/build' make -f common/CMakeFiles/common.dir/build.make common/CMakeFiles/common.dir/depend make[2]: Entering directory~/opensource/heif-3.2/build' cd ~/opensource/heif-3.2/build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" ~/opensource/heif-3.2/srcs ~/opensource/heif-3.2/srcs/common ~/opensource/heif-3.2/build ~/opensource/heif-3.2/build/common ~/opensource/heif-3.2/build/common/CMakeFiles/common.dir/DependInfo.cmake --color= make[2]: Leaving directory ~/opensource/heif-3.2/build' make -f common/CMakeFiles/common.dir/build.make common/CMakeFiles/common.dir/build make[2]: Entering directory~/opensource/heif-3.2/build' [ 0%] Building CXX object common/CMakeFiles/common.dir/audiosampleentrybox.cpp.o cd ~/opensource/heif-3.2/build/common && /usr/bin/c++ -I~/opensource/heif-3.2/build -DHEIF_GCC_ALLOCATOR_FIX=1 -g -W -Wall -Wall -Wextra -Wcast-align -Wcast-qual -Wdisabled-optimization -Winit-self -Wmissing-declarations -Wmissing-include-dirs -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wlogical-op -Wnoexcept -Wstrict-null-sentinel -fvisibility=hidden -fPIC -std=c++11 -o CMakeFiles/common.dir/audiosampleentrybox.cpp.o -c ~/opensource/heif-3.2/srcs/common/audiosampleentrybox.cpp In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/stdexcept:39, from /usr/include/c++/4.8/array:38, from /usr/include/c++/4.8/tuple:39, from /usr/include/c++/4.8/bits/stl_map.h:63, from /usr/include/c++/4.8/map:61, from ~/opensource/heif-3.2/srcs/common/customallocator.hpp:16, from ~/opensource/heif-3.2/srcs/common/bitstream.hpp:16, from ~/opensource/heif-3.2/srcs/common/audiosampleentrybox.hpp:15, from ~/opensource/heif-3.2/srcs/common/audiosampleentrybox.cpp:14: /usr/include/c++/4.8/bits/basic_string.h: In instantiation of ‘class std::basic_string<char, std::char_traits, Allocator >’: ~/opensource/heif-3.2/srcs/common/customallocator.hpp:226:24: required from here /usr/include/c++/4.8/bits/basic_string.h:122:61: error: no type named ‘difference_type’ in ‘std::basic_string<char, std::char_traits, Allocator >::_CharT_alloc_type {aka class Allocator}’ typedef typename _CharT_alloc_type::difference_type difference_type; ^ make[2]: [common/CMakeFiles/common.dir/audiosampleentrybox.cpp.o] Error 1 make[2]: Leaving directory `~/opensource/heif-3.2/build' make[1]: [common/CMakeFiles/common.dir/all] Error 2 make[1]: Leaving directory `~/opensource/heif-3.2/build' make: *** [all] Error 2

crb912 commented 6 years ago

https://stackoverflow.com/questions/13345392/difference-type-not-found Maybe this could help you.

caijimin commented 6 years ago

Maybe https://github.com/nokiatech/heif/pull/53/commits/9ed38bfb6ea27014a1523167a15202509e64e0ec can help you.

jimuzhou commented 6 years ago

"Maybe 9ed38bf can help you.", it works. Thanks to both of you.