pamela-project / slambench

SLAM performance evaluation framework
https://apt.cs.manchester.ac.uk/projects/PAMELA/
Other
311 stars 84 forks source link

make deps fails freeimage #26

Closed tnugent97 closed 5 years ago

tnugent97 commented 5 years ago

running make deps fails when making FreeImage, which is caused by an error in the LibRaw library:

Source/LibRawLite/internal/dcraw_common.cpp:6830:80: error: call of overloaded 'powf64(int, int)' is ambiguous
|     10*(table_buf[iLensData+9]>>2) * powf64(4, (table_buf[iLensData+9] & 0x03)-2);

This is supposedly fixed in the latest version of FreeImage which uses LibRaw 0.18.0, so I changed the hash in the freeimage makefile but still get the same error. Not exactly sure why this is the case; perhaps the error is not fixed in 0.18.0, and 0.19.0 is needed (which FreeImage does not use).

Anyway to fix I manually changed the offending file (internal/dcraw_common.cpp) to add a powf64 functions that takes two ints and simply casts them to floats and calls the normal powf64 (casting the result back to an int).

Horrible, but that's all I could do for now.

bbodin commented 5 years ago

Thanks, The commit 9c1670a1db0376b75ef767627afe665381bd5616 fixes this bug (I am using a different version for FreeImage), but I rolled it back because I was not sure if slambench was still working in oldest systems.

I keep this issue open as long as I haven't pushed this fix yet.