[CMake] Error from GenerateExportHeader.cmake (configure_file)

Miroslav Drahos mdrahos at aurisrobotics.com
Fri Mar 3 12:23:20 EST 2017


Hi,

I am getting errors emanating from GenerateExportHeader.cmake and hope someone has any pointers on this. The error:


CMake Error at /usr/share/cmake-3.5/Modules/GenerateExportHeader.cmake:362 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/GenerateExportHeader.cmake:378 (_do_generate_export_header)
  /slave/workspace/build-1.7.0/aurissw/Main/CMake/AsrCreateLibraryMacro.cmake:161 (generate_export_header)


The relevant portion of the custom AsrCreateLibraryMacro.cmake is pretty standard, according to cmake docs:


  unset(exportMacro)
  string(TOUPPER ${TARGET} exportMacro)
  set(exportMacro "${exportMacro}_DLLSPEC")
  set(exportHeader ${TARGET}_export.h)
  generate_export_header(${TARGET}
    BASE_NAME ${TARGET}
    EXPORT_MACRO_NAME ${exportMacro}
    EXPORT_FILE_NAME ${exportHeader}
    )

where TARGET is always set to a valid string (library name).

The error is not consistent among machines -- on some machines this error is never seen, on others, it consistently fails. All of these machines run a pretty standard Linux distribution (most of them Ubuntu 16.04), and use the same cmake 3.5.1.

Here is the system version that we are using:
Linux version 4.4.0-36-generic (buildd at lcy01-01) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.2) ) #55-Ubuntu SMP Thu Aug 11 18:01:55 UTC 2016
We have a machine with the exact same system version that builds fine and a machine that cmake consistently fails.

Has anyone experienced a similar error? Any clues on what may be the problem?
Thank you tons,
Miro

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170303/cb8df6bf/attachment.html>


More information about the CMake mailing list