timothybrooks / hdr-plus

HDR+ Implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

make error

JanzenLiu opened this issue · comments

I tried building the project with the instructions in README but failed. The message is as below. Do you have any idea how to solve it?

Scanning dependencies of target hdrplus
[ 16%] Building CXX object CMakeFiles/hdrplus.dir/src/HDRPlus.cpp.o
In file included from /home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:2:0:
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/halide_load_raw.h: In function ‘bool Halide::Tools::load_raw(const string&, uint16_t*, int, int)’:
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/halide_load_raw.h:50:93: error: too many arguments to function
     if (!check(f.f != nullptr, "File %s could not be opened for reading\n", filename.c_str())) return false;
                                                                                             ^
In file included from /home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:2:0:
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/halide_load_raw.h:66:135: error: too many arguments to function
     if (!check(in_width == width, "Input image '%s' has width %d, but must must have width of %d\n", filename.c_str(), in_width, width)) return false;
                                                                                                                                       ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/halide_load_raw.h:68:141: error: too many arguments to function
     if (!check(in_height == height, "Input image '%s' has height %d, but must must have height of %d\n", filename.c_str(), in_height, height)) return false;
                                                                                                                                             ^
In file included from /home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:7:0:
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/align.h: At global scope:
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/align.h:58:26: error: ‘Image’ in namespace ‘Halide’ does not name a type
 Halide::Func align(const Halide::Image<uint16_t> imgs);
                          ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/align.h:58:34: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
 Halide::Func align(const Halide::Image<uint16_t> imgs);
                                  ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/align.h:58:39: error: expected ‘,’ or ‘...’ before ‘<’ token
 Halide::Func align(const Halide::Image<uint16_t> imgs);
                                       ^
In file included from /home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:8:0:
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/merge.h:10:20: error: ‘Image’ is not a member of ‘Halide’
 Halide::Func merge(Halide::Image<uint16_t> imgs, Halide::Func alignment);
                    ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/merge.h:10:42: error: expected primary-expression before ‘>’ token
 Halide::Func merge(Halide::Image<uint16_t> imgs, Halide::Func alignment);
                                          ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/merge.h:10:44: error: ‘imgs’ was not declared in this scope
 Halide::Func merge(Halide::Image<uint16_t> imgs, Halide::Func alignment);
                                            ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/merge.h:10:63: error: expected primary-expression before ‘alignment’
 Halide::Func merge(Halide::Image<uint16_t> imgs, Halide::Func alignment);
                                                               ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:21:15: error: ‘Image’ does not name a type
         const Image<uint16_t> imgs;
               ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:36:22: error: expected ‘)’ before ‘<’ token
         HDRPlus(Image<uint16_t> imgs, BlackPoint bp, WhitePoint wp, WhiteBalance wb, Compression c, Gain g) : imgs(imgs), bp(bp), wp(wp), wb(wb), c(c), g(g) {
                      ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:47:9: error: ‘Image’ does not name a type
         Image<uint8_t> process() {
         ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:72:90: error: ‘Image’ has not been declared
         static bool load_raws(std::string dir_path, std::vector<std::string> &img_names, Image<uint16_t> &imgs) {
                                                                                          ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:72:95: error: expected ‘,’ or ‘...’ before ‘<’ token
         static bool load_raws(std::string dir_path, std::vector<std::string> &img_names, Image<uint16_t> &imgs) {
                                                                                               ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:99:74: error: ‘Image’ has not been declared
         static bool save_png(std::string dir_path, std::string img_name, Image<uint8_t> &img) {
                                                                          ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:99:79: error: expected ‘,’ or ‘...’ before ‘<’ token
         static bool save_png(std::string dir_path, std::string img_name, Image<uint8_t> &img) {
                                                                               ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp: In static member function ‘static bool HDRPlus::load_raws(std::string, std::vector<std::basic_string<char> >&, int)’:
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:76:13: error: ‘imgs’ was not declared in this scope
             imgs = Image<uint16_t>(width, height, num_imgs);
             ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:76:20: error: ‘Image’ was not declared in this scope
             imgs = Image<uint16_t>(width, height, num_imgs);
                    ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:76:34: error: expected primary-expression before ‘>’ token
             imgs = Image<uint16_t>(width, height, num_imgs);
                                  ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:76:43: warning: left operand of comma operator has no effect [-Wunused-value]
             imgs = Image<uint16_t>(width, height, num_imgs);
                                           ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:76:51: warning: right operand of comma operator has no effect [-Wunused-value]
             imgs = Image<uint16_t>(width, height, num_imgs);
                                                   ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp: In static member function ‘static bool HDRPlus::save_png(std::string, std::string, int)’:
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:105:35: error: ‘img’ was not declared in this scope
             int stride_in_bytes = img.width() * img.channels();
                                   ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp: In function ‘int main(int, char**)’:
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:187:5: error: ‘Image’ was not declared in this scope
     Image<uint16_t> imgs;
     ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:187:19: error: expected primary-expression before ‘>’ token
     Image<uint16_t> imgs;
                   ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:187:21: error: ‘imgs’ was not declared in this scope
     Image<uint16_t> imgs;
                     ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:197:18: error: expected primary-expression before ‘>’ token
     Image<uint8_t> output = hdr_plus.process();
                  ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:197:20: error: ‘output’ was not declared in this scope
     Image<uint8_t> output = hdr_plus.process();
                    ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:197:38: error: ‘class HDRPlus’ has no member named ‘process’
     Image<uint8_t> output = hdr_plus.process();
                                      ^
In file included from /home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:2:0:
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/halide_load_raw.h: In instantiation of ‘bool Halide::Tools::load_raw(const string&, uint16_t*, int, int) [with bool (* check)(bool, const char*) = Halide::Tools::Internal::CheckFail; std::string = std::basic_string<char>; uint16_t = short unsigned int]’:
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:85:66:   required from here
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/halide_load_raw.h:50:93: error: too many arguments to function
     if (!check(f.f != nullptr, "File %s could not be opened for reading\n", filename.c_str())) return false;
                                                                                             ^
In file included from /home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/HDRPlus.cpp:2:0:
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/halide_load_raw.h:66:135: error: too many arguments to function
     if (!check(in_width == width, "Input image '%s' has width %d, but must must have width of %d\n", filename.c_str(), in_width, width)) return false;
                                                                                                                                       ^
/home/likewise-open/SENSETIME/liuchengtsung/Desktop/hdr-plus/src/halide_load_raw.h:68:141: error: too many arguments to function
     if (!check(in_height == height, "Input image '%s' has height %d, but must must have height of %d\n", filename.c_str(), in_height, height)) return false;
                                                                                                                                             ^
make[2]: *** [CMakeFiles/hdrplus.dir/src/HDRPlus.cpp.o] Error 1
make[1]: *** [CMakeFiles/hdrplus.dir/all] Error 2
make: *** [all] Error 2

I just fix this, it's due to the formatted string. Maybe it's because my compiler is too old lol (if it doesn't cause error in other machine). Thank you!

i fix it with replacing halide with 10-22-2016 release version(halide-linux-64-gcc53-trunk-aa5d5514f179bf0ffe1a2dead0c0eb7300b4069a.tgz).

okay I will also try this. Thanks

Halide 2016/10/22 release version works fine for compilation

Where do you get this version of Halide I can't find it anywhere I saw it before on their github page but I think they deleted it.

Closing now that pull request to fix halide compatibility has been merged. Feel free to reopen if these issues persist.