GNOME Bugzilla – Bug 792302
CMake build fails to include iconv-detect.h
Last modified: 2018-01-18 11:27:38 UTC
When building with cmake, we get the following error: src/camel/camel-iconv.c:36:10: fatal error: iconv-detect.h: No such file or directory #include "iconv-detect.h" ^~~~~~~~~~~~~~~~ compilation terminated. src/camel/CMakeFiles/camel.dir/build.make:602: recipe for target 'src/camel/CMakeFiles/camel.dir/camel-iconv.c.o' failed The iconv-detect.[ch] files seem to be present at the toplevel directory, perhaps they are missing from the include path.
Thanks for a bug report, but it's pretty odd that you see this now, when it's in use for a long time (several stable releases, all time since the switch to CMake). I believe that this would be found out easily by others. How do you precisely build eds, please? What are the arguments to CMake and what are the related environment variables (set | grep FLAG), please? Also, what is your CMake version, please? There is used > CHECK_C_SOURCE_RUNS("#include \"${CMAKE_SOURCE_DIR}/iconv-detect.c\"" _correct_iconv) which generates that iconv-detect.h in the current directory of that run. That's probably that problem, because otherwise libcamel has ${CMAKE_BINARY_DIR} in its include path, together with some other related. I see that iconv-detect.h in the top build directory, but I also run cmake as: $ cd evolution-data-server $ mkdir _build $ cd _build $ cmake <plenty-of-arguments> .. thus I run cmake in the top build dir. I can change this, that's fine, I only want to know what makes the difference. Even flatpak and GNOME continuous build work as expected, thus it's something nasty/different you do.
Created attachment 366954 [details] Full log file of failed build
Created attachment 366960 [details] [review] proposed eds patch Could you give a try to this patch, please?
I've confirmed this fixes the build for me yes.
Thanks for the confirmation. Created commit 6b51d2f60 in eds master (3.27.90+)