[Scons-users] Rebuild issue with CheckLib()?

Herzog, Tobias (G3-29) tobias.herzog at carmeq.com
Mon May 3 03:11:54 EDT 2021


Hi Mats,

thanks for the feedback - I already thought about something like that...

The example was just to demonstrate the behavior. Originally I really discovered this with an external lib. For some testing/debugging I recompiled and replaced this external lib with other compiler options while the headers are kept. I admit, that this is not a very common/clean use case...

/tobias


-----Ursprüngliche Nachricht-----
Von: Mats Wichmann <mats at wichmann.us> 
Gesendet: Mittwoch, 28. April 2021 21:00
An: Herzog, Tobias (G3-29) <tobias.herzog at carmeq.com>
Betreff: Re: [Scons-users] Rebuild issue with CheckLib()?

On 4/28/21 11:58 AM, Mats Wichmann wrote:

>> If you modify "mylib/gtestd.lib" (I am using MSVC compiler on 
>> Windows), no rebuild is triggered ("scons: `.' is up to date.").
>> However the dependencies are detected correctly ("scons --tree=all"). 
>> Even with "-config=force" no rebuild is triggered. If I leave out the 
>> Configure section it works like expected.

I wrote a second message on this, which seems to have vanished into the ether without a trace.  If it shows up as a duplicate, apologies.

I found another mention of the issue, in #2757.

It seems that the thing being checked (library in your case, header in the mention in 2757) has its current signature recorded as part of the check. Then when the calculation of targets to build is made, the library swill have the same signature as the saved signature (the one saved as part of the configure check), so there seems to be no need to build it.

FWIW if the library is one you normally build in your project, you shouldn't CheckLib it, that's really intended for external dependencies (don't know that's what you are doing, it just seemed worth mentioning).



More information about the Scons-users mailing list