aferrero2707 / PhotoFlow

A fully non-destructive photo retouching program providing a complete layer-based workflow including RAW image development.
http://aferrero2707.github.io/PhotoFlow
GNU General Public License v3.0
315 stars 36 forks source link

[Linux] Can't compile with the latest system Exiv2 #169

Closed Fincer closed 6 years ago

Fincer commented 6 years ago

As the title states, building process of Photoflow with latest system Exiv2 crashes to trivial error about missing file exiv2/xmp.hpp. I am using the following patch to circumvent the issue:

--- a/src/base/exif_data.hh
+++ b/src/base/exif_data.hh
@@ -41,7 +41,7 @@
 #include <external/exiv2/include/exiv2/exif.hpp>
 #else
 #include <exiv2/easyaccess.hpp>
-#include <exiv2/xmp.hpp>
+#include <exiv2/xmp_exiv2.hpp>
 #include <exiv2/error.hpp>
 #include <exiv2/image.hpp>
 #include <exiv2/exif.hpp>

I'm using Arch Linux with exiv2-git (version r5320.4c4f91e4)

aferrero2707 commented 6 years ago

Thanks for discovering this. Could you please check if the code still compiles if you remove all lines between #include <exiv2/easyaccess.hpp> and #include <exiv2/image.hpp> leaving only #include <exiv2/exif.hpp>?

I think that the main EXIV2 header file already takes care of those additional includes...

Fincer commented 6 years ago

I ran various tests, and the program compiles with the following patch:

--- a/src/base/exif_data.hh
+++ b/src/base/exif_data.hh
@@ -41,8 +41,6 @@
 #include <external/exiv2/include/exiv2/exif.hpp>
 #else
 #include <exiv2/easyaccess.hpp>
-#include <exiv2/xmp.hpp>
-#include <exiv2/error.hpp>
 #include <exiv2/image.hpp>
 #include <exiv2/exif.hpp>
 #endif

Removing either #include <exiv2/image.hpp> or #include <exiv2/easyaccess.hpp> leads to failures in building process.

aferrero2707 commented 6 years ago

I think I found my mistake... what if you only put #include <exiv2/exiv2.hpp>?

The main header file should include all required .hpp files...

Fincer commented 6 years ago

Yeah, it works (Photoflow compiles & runs).

--- a/src/base/exif_data.hh
+++ b/src/base/exif_data.hh
@@ -40,11 +40,7 @@
 #include <external/exiv2/include/exiv2/image.hpp>
 #include <external/exiv2/include/exiv2/exif.hpp>
 #else
-#include <exiv2/easyaccess.hpp>
-#include <exiv2/xmp.hpp>
-#include <exiv2/error.hpp>
-#include <exiv2/image.hpp>
-#include <exiv2/exif.hpp>
+#include <exiv2/exiv2.hpp>
 #endif
aferrero2707 commented 6 years ago

Great! I will make this modification in the stable branch.