[CMake] ExternalProject feature regenerating the configure script

Ashok Nalkund ashoknn at qti.qualcomm.com
Mon Jul 29 21:21:57 EDT 2013


On 7/24/2013 11:14 AM, Alan W. Irwin wrote:
> On 2013-07-24 10:54-0700 Ashok Nalkund wrote:
>
>> On 7/23/2013 8:42 PM, Alan W. Irwin wrote:
>>> On 2013-07-23 18:09-0700 Ashok Nalkund wrote:
>>>
>>>> I noticed the following messages when I ran 'make VERBOSE=1 -d':
>>>>
>>>>> <path to package>/build/src/package/Makefile.in'.
>>>>>     Prerequisite `<path to package>/build/src/package/aclocal.m4' 
>>>>> is newer than target `<path to 
>>>>> package>/build/src/package/Makefile.in'.
>>>>>    Must remake target `<path to 
>>>>> package>/build/src/package/Makefile.in'.
>>>>> Putting child 0x0156a7f0 (<path to 
>>>>> package>/build/src/mare/Makefile.in) PID 23029 on the chain.
>>>>> Live child 0x0156a7f0 (<path to 
>>>>> package>/build/src/mare/Makefile.in) PID 23029
>>>>>  cd <path to package>/build/src/mare && /bin/sh <path to 
>>>>> package>/build/src/mare/autotools/missing --run automake-1.11 
>>>>> --foreign
>>>>> aclocal.m4:17: warning: this file was generated for autoconf 2.68.
>>>>
>>>> I'll dig into this more.
>>>
>>> I suggest you try replacing cmake -E touch everywhere it occurs in the
>>> ExternalPackage module with the equivalent Unix (or MSYS) touch
>>> command. That's what I was forced to do because the "cmake -E touch
>>> <filename>" command is not reliable with regard to timing (it
>>> truncates all times to the nearest second) leading to weird 
>>> regeneration
>>> results similar to what you have described.
>>>
>>> You could also try the git version of CMake.  I have been told that
>>> the appropriate bug fix for this "cmake -E touch" issue has been done
>>> in the git version of CMake in response to my bug report, but this fix
>>> will only be deployed for the forthcoming CMake-2.8.12 release.
>>>
>>> If time truncation to the nearest second for "cmake -E touch" in the
>>> ExternalPackage module is not the issue, then the other possibility is
>>> the release tarball has not been correctly prepared for autotools
>>> release so the build-system file dates are not in the right date order
>>> ==> inappropriate regeneration of the build-system files for the user.
>>> (This actually happened to me as a release manager many years ago when
>>> PLplot was still using autotools, and I remember that embarrassment
>>> very well indeed.) But in this case, you would also get regeneration
>>> when running configure/make by hand, and you stated that was not the
>>> case.
>>>
>>> Alan
>>
>> Hi Alan,
>>  Thanks for the response. First I tried to see the times of these 
>> files using stat and it DOESNT indicate that aclocal.m4 is newer than 
>> configure:
>>
>>>   File: `<path to package>/build/src/mare/aclocal.m4'
>>>   Size: 37457           Blocks: 80         IO Block: 4096 regular file
>>> Device: fd04h/64772d    Inode: 52823233    Links: 1
>>> Access: (0600/-rw-------)  Uid: (45401/ ashoknn)   Gid: ( 200/ users)
>>> Access: 2013-07-24 10:50:01.409175844 -0700
>>> Modify: 2013-07-24 10:49:37.335299410 -0700
>>> Change: 2013-07-24 10:49:37.335299410 -0700
>>>   File: `<path to package>/build/src/mare/configure'
>>>   Size: 840346          Blocks: 1648       IO Block: 4096 regular file
>>> Device: fd04h/64772d    Inode: 52822857    Links: 1
>>> Access: (0700/-rwx------)  Uid: (45401/ ashoknn)   Gid: ( 200/ users)
>>> Access: 2013-07-24 10:50:02.979883315 -0700
>>> Modify: 2013-07-24 10:50:02.958882582 -0700
>>> Change: 2013-07-24 10:50:02.958882582 -0700
>>>
>> Also I changed '${CMAKE_COMMAND} -E touch' with 'touch' in the 
>> ExternalProject module but that also didnt seem to make a difference.
>
> Hi Ashok:
>
> Sorry my suggestions didn't lead anywhere.  Good luck in figuring
> out this peculiar issue.
>
> Alan
> __________________________

After digging around more, I found that the copy_directory command to 
cmake may be causing some issues. The package sources have the correct 
timestamps for the Makefile.am and Makefile.in. But as part of the 
ExternalPackage_Add, the download step does a 'cmake -E copy_directory' 
which then results in the Makefile.in being newer than Makefile.am:

Original source files:
> temp/extprrj/build $stat ../src/package/Makefile.*
>   File: `../src/package/Makefile.am'
>   Size: 1379            Blocks: 8          IO Block: 4096 regular file
> Device: fd04h/64772d    Inode: 52822441    Links: 1
> Access: (0600/-rw-------)  Uid: (45401/ ashoknn)   Gid: (  200/ users)
> Access: 2013-07-29 16:52:47.916883087 -0700
> Modify: 2013-07-19 03:04:39.184297618 -0700
> Change: 2013-07-29 05:36:10.417882924 -0700
>   File: `../src/package/Makefile.in'
>   Size: 34464           Blocks: 72         IO Block: 4096 regular file
> Device: fd04h/64772d    Inode: 52834887    Links: 1
> Access: (0600/-rw-------)  Uid: (45401/ ashoknn)   Gid: (  200/ users)
> Access: 2013-07-29 18:03:36.974882758 -0700
> Modify: 2013-07-29 18:02:58.270154290 -0700
> Change: 2013-07-29 18:02:58.321679447 -0700
> temp/extprrj/build $

Files in directory by download step:
> temp/extprrj/build $stat src/package/Makefile.*
>   File: `src/package/Makefile.am'
>   Size: 1379            Blocks: 8          IO Block: 4096 regular file
> Device: fd04h/64772d    Inode: 52834595    Links: 1
> Access: (0600/-rw-------)  Uid: (45401/ ashoknn)   Gid: (  200/ users)
> Access: 2013-07-29 18:06:47.551134339 -0700
> Modify: 2013-07-29 18:06:47.551134339 -0700
> Change: 2013-07-29 18:06:47.551134339 -0700
>   File: `src/package/Makefile.in'
>   Size: 34464           Blocks: 72         IO Block: 4096 regular file
> Device: fd04h/64772d    Inode: 52834507    Links: 1
> Access: (0600/-rw-------)  Uid: (45401/ ashoknn)   Gid: (  200/ users)
> Access: 2013-07-29 18:06:52.016883376 -0700
> Modify: 2013-07-29 18:06:47.546134364 -0700
> Change: 2013-07-29 18:06:47.546134364 -0700
> temp/extprrj/build $

I'm going to look into this further, wanted to send the data to the list.

tia,
ashok



More information about the CMake mailing list