timothybrooks / hdr-plus

HDR+ Implementation
MIT License
587 stars 201 forks source link

make error #62

Open roshanaz opened 4 years ago

roshanaz commented 4 years ago

I get the following error when trying to make hdr+. my cmake version is 3.17.2

build git:(master) ✗ make
[ 17%] Built target align_and_merge.generator_library
[ 24%] Built target halide_library_runtime.generator_binary
[ 24%] Built target halide_rt_host_runtime_gen
[ 44%] Built target hdrplus_pipeline.generator_library
[ 51%] Built target hdrplus_pipeline.generator_binary
[ 55%] Built target hdrplus_pipeline_lib_gen
[ 58%] Building CXX object CMakeFiles/hdrplus.dir/src/InputSource.cpp.o
In file included from /Users/Projects/IQ/hdr-plus/src/InputSource.cpp:1:
In file included from /Users/Projects/IQ/hdr-plus/src/InputSource.h:5:
In file included from /usr/local/include/libraw/libraw.h:35:
/usr/local/include/libraw/libraw_datastream.h:121:8: warning: 'auto_ptr<std::__1::basic_streambuf<char> >' is deprecated
      [-Wdeprecated-declarations]
  std::auto_ptr<std::streambuf> f;       /* will close() automatically through dtor */
       ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2080:28: note: 'auto_ptr<std::__1::basic_streambuf<char> >' has been
      explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr
                           ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__config:1101:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'
#  define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                      ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__config:1090:48: note: expanded from macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
In file included from /Users/Projects/IQ/hdr-plus/src/InputSource.cpp:1:
In file included from /Users/Projects/IQ/hdr-plus/src/InputSource.h:5:
In file included from /usr/local/include/libraw/libraw.h:35:
/usr/local/include/libraw/libraw_datastream.h:122:8: warning: 'auto_ptr<std::__1::basic_streambuf<char> >' is deprecated
      [-Wdeprecated-declarations]
  std::auto_ptr<std::streambuf> saved_f; /* when *f is a subfile, *saved_f is the master file */
       ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2080:28: note: 'auto_ptr<std::__1::basic_streambuf<char> >' has been
      explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr
                           ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__config:1101:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'
#  define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                      ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__config:1090:48: note: expanded from macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
/Users/Projects/IQ/hdr-plus/src/InputSource.cpp:58:32: error: implicit instantiation of undefined template
      'std::__1::array<float, 4>'
std::array<float, 4> RawImage::GetBlackLevel() const {
                               ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__tuple:223:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
                                                               ^
/Users/Projects/IQ/hdr-plus/src/InputSource.cpp:63:26: error: implicit instantiation of undefined template
      'std::__1::array<float, 4>'
    std::array<float, 4> black_level = {
                         ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__tuple:223:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
                                                               ^
2 warnings and 2 errors generated.
make[2]: *** [CMakeFiles/hdrplus.dir/src/InputSource.cpp.o] Error 1
make[1]: *** [CMakeFiles/hdrplus.dir/all] Error 2
make: *** [all] Error 2
Titaniumtown commented 4 years ago

What OS? architecture? etc It looks like you are on a mac

roshanaz commented 4 years ago

Yes, it is mac.

Titaniumtown commented 4 years ago

what version of clang are you using?

Titaniumtown commented 4 years ago

try clang 4.0, that's what worked for me.

roshanaz commented 4 years ago
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin19.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
roshanaz commented 4 years ago

@Titaniumtown I did try with clang 4.0 but I get the same error. any idea?

Titaniumtown commented 4 years ago

huh, strange. I'll look into it.

roshanaz commented 4 years ago

I added #include <array> to code and it passed that stage. now it is failing on Linking because of lpng looks like it does not find libpng

(base) ➜  build git:(master) ✗ make
[ 17%] Built target align_and_merge.generator_library
[ 24%] Built target halide_library_runtime.generator_binary
[ 24%] Built target halide_rt_host_runtime_gen
[ 44%] Built target hdrplus_pipeline.generator_library
[ 51%] Built target hdrplus_pipeline.generator_binary
[ 55%] Built target hdrplus_pipeline_lib_gen
[ 58%] Linking CXX executable hdrplus
ld: library not found for -lpng
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [hdrplus] Error 1
make[1]: *** [CMakeFiles/hdrplus.dir/all] Error 2
make: *** [all] Error 2
Titaniumtown commented 4 years ago

install libpng

roshanaz commented 4 years ago

I did already using brew

Titaniumtown commented 4 years ago

huh

Titaniumtown commented 4 years ago

what version of macos are you on?

roshanaz commented 4 years ago

10.15.1

roshanaz commented 4 years ago

it is installed and linked

Warning: libpng 1.6.37 is already installed and up-to-date
To reinstall 1.6.37, run `brew reinstall libpng`
Warning: Already linked: /usr/local/Cellar/libpng/1.6.37
Titaniumtown commented 4 years ago

weird