Closed Bug 692606 Opened 13 years ago Closed 13 years ago

clobber needed after changing --enable-jprof (or --enable-shared-js?)

Categories

(Firefox Build System :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla10

People

(Reporter: sfink, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

I recently added --enable-jprof to my mozconfig and reran make -f client.mk. The resulting xpcshell and firefox binaries would not run. xpcshell spews out a couple of incomprehensible errors ("This should never happen!" or something like that.) firefox gave some sort of XRE load failure.

LD_DEBUG=libs showed that it was failing to resolve a pair of symbols in libxul.so -- but also that it was using /usr/lib64/xulrunner-1.9.2/libxul.so!

What ended up being the problem is that my dependentlibs.list was missing libjprof.so, so dlopen of obj/dist/bin/libxul.so failed, so it fell back to the system lib.

I kind of feel like the real problem is the opacity of XPCOM glue failures, but this bug is for the needs-clobber problem.
Is it not an unwritten rule to blow away your objdir after modifying .mozconfig?
Attached patch Depend on mozilla-config.h (obsolete) — Splinter Review
This fixes it for me. My first attempt, to depend on Makefile instead of Makefile.in, did not work. (I thought maybe the Makefile would get regenerated when mozconfig changed.)

I'm not claiming this is the best way. It only works because --enable-jprof does both AC_DEFINE(MOZ_JPROF) and AC_SUBST(MOZ_JPROF), and so toggling --enable-jprof changes both mozilla-config.h and the dependentlibs.list that gets created from executing the Makefile.

I really wanted to do a mv-if-diff type of thing (i.e., unconditionally generated dependentlibs.list but only update the timestamp if it changes), but I don't want to deal with doing that portably.
Attachment #565369 - Flags: review?(khuey)
Comment on attachment 565369 [details] [diff] [review]
Depend on mozilla-config.h

Review of attachment 565369 [details] [diff] [review]:
-----------------------------------------------------------------

::: xpcom/stub/Makefile.in
@@ +122,5 @@
>  include $(topsrcdir)/config/rules.mk
>  
>  libs:: $(FINAL_TARGET)/dependentlibs.list
>  
> +$(FINAL_TARGET)/dependentlibs.list: Makefile.in $(DEPTH)/mozilla-config.h

config/autoconf.mk would make more sense.
Attachment #565369 - Flags: review?(khuey) → review-
Indeed it would. Darn, that's what I was originally thinking of, but I wasn't sure how to get to the objdir, and thought a .h file would be easier... which has exactly the same problem.
Attachment #565369 - Attachment is obsolete: true
Attachment #565371 - Flags: review?(mh+mozilla)
Attachment #565371 - Flags: review?(mh+mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/8fae5a109fe2
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
Blocks: clobber
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: