Closed Bug 712785 Opened 12 years ago Closed 12 years ago

LDAP files recompiled at each build even if nothing apparently changed

Categories

(Directory :: LDAP C SDK, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aceman, Assigned: standard8)

References

Details

Attachments

(1 file)

Even if I run two builds (gmake -f client.mk build) after another, without changing anything between them, some files in ldap/xpcom/src, e.g. nsLDAPMessage.cpp are always compiled again.

Is it necessary? Is something subtly changing here at each run?

Due to some recompiles like this, libxul is always relinked even when probably not necessary (I made changes only to some .js or .xhtml file).
I am not sure LDAP is the culprit, but I can't find any other offender. Only these files seem to be recompiled. Resulting libmozldap.a is linked into libxul.so .
I think this has something to do with one of the ldap c-sdk header files being copied on each build.
Can it be fixed?
Assignee: nobody → mbanner
Status: UNCONFIRMED → NEW
Component: LDAP Integration → LDAP C SDK
Ever confirmed: true
OS: Linux → All
Product: MailNews Core → Directory
QA Contact: ldap-integration → csdk
Hardware: x86 → All
Version: Trunk → other
Attached patch The fixSplinter Review
So what is happening here:

- The Thunderbird/Firefox build system removes the public include directory - $(DIST)/public - at the start of each build.
- ldap-standard.h is a generated file that goes into that directory.
- LDAP xpcom sees that ldap-standard.h has a new timestamp and rebuilds.

The solution here is to generate ldap-standard.h into the objdir directory, and then use $(INSTALL) which will typically symlink it.

Next time the deps system comes along it'll check the time on the file not the symlink, and hence we won't rebuild xpcom sdk unnecessarily.
Attachment #586155 - Flags: review?(richm)
Attachment #586155 - Flags: review?(richm) → review+
Blocks: 720328
Checked in: http://hg.mozilla.org/projects/ldap-sdks/rev/e91ca699fdcc

Filed bug 720328 to pull this into Thunderbird.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Blocks: 834214
No longer blocks: 834214
You need to log in before you can comment on or make changes to this bug.