After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 792302 - CMake build fails to include iconv-detect.h
CMake build fails to include iconv-detect.h
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: general
3.27.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2018-01-07 14:24 UTC by Tristan Van Berkom
Modified: 2018-01-18 11:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Full log file of failed build (189.15 KB, text/plain)
2018-01-17 16:47 UTC, Tristan Van Berkom
  Details
proposed eds patch (972 bytes, patch)
2018-01-17 17:15 UTC, Milan Crha
committed Details | Review

Description Tristan Van Berkom 2018-01-07 14:24:42 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.
Comment 1 Milan Crha 2018-01-08 18:08:22 UTC
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.
Comment 2 Tristan Van Berkom 2018-01-17 16:47:01 UTC
Created attachment 366954 [details]
Full log file of failed build
Comment 3 Milan Crha 2018-01-17 17:15:02 UTC
Created attachment 366960 [details] [review]
proposed eds patch

Could you give a try to this patch, please?
Comment 4 Tristan Van Berkom 2018-01-18 11:10:07 UTC
I've confirmed this fixes the build for me yes.
Comment 5 Milan Crha 2018-01-18 11:27:25 UTC
Thanks for the confirmation.

Created commit 6b51d2f60 in eds master (3.27.90+)