Re: [CMake] Error from GenerateExportHeader.cmake (configure_file)

2017-03-03 Thread Michael Ellery

> On Mar 3, 2017, at 9:23 AM, Miroslav Drahos  wrote:
> 
> 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@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

This might just be a filesystem error when writing the configured header file. 
I would try message() printing the value of ${exportHeader} and 
${CMAKE_CURRENT_BINARY_DIR} before calling GEH to make sure the filepath looks 
valid and writeable.

-Mike
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Error from GenerateExportHeader.cmake (configure_file)

2017-03-03 Thread Miroslav Drahos
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@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

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake