Closed Bug 686434 Opened 13 years ago Closed 13 years ago

Generating omni.jar failed during building xulrunner

Categories

(Core :: XPConnect, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: t.matsuu, Unassigned)

References

Details

When I build xulrunner, Generating omni.jar failed.

Good: http://hg.mozilla.org/mozilla-central/rev/aebd7d72106d
Bad: http://hg.mozilla.org/mozilla-central/rev/754865ae97bc


However tinderbox say b57d50c6c046 which is the changeset after 754865ae97bc is successfully built.

So there's something wrong with 754865ae97bc but it depends on CXXFLAGS etc.

CXXFLAGS='-O2 -g -pipe  -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'


If someone would like to know the real compilation arguments for specific source files, please let me know. I'll put it.
Blocks: 684435
What's the error you see?
cd ../../dist/xulrunner && rm -f omni.jar components/binary.manifest && grep -h '^binary-component' components/*.manifest > binary.manifest ; for m in components/*.manifest; do sed -e 's/^binary-component/#binary-component/' $m > tmp.manifest && mv tmp.manifest $m; done; /usr/bin/zip -r9m omni.jar chrome chrome.manifest components/*.js components/*.xpt components/*.manifest modules res defaults greprefs.js jsloader  -x chrome/icons/\* defaults/pref/channel-prefs.js res/cursors/\* res/MainMenu.nib/\*  && /media/bkup/work/rpmbuild/BUILD/xulrunner-9.0/mozilla-central/dist/bin/run-mozilla.sh /media/bkup/work/rpmbuild/BUILD/xulrunner-9.0/mozilla-central/dist/bin/xpcshell -g "$PWD" -a "$PWD" -f /media/bkup/work/rpmbuild/BUILD/xulrunner-9.0/mozilla-central/xulrunner/installer/../../toolkit/mozapps/installer/precompile_cache.js -e "populate_startupcache('GreD', 'omni.jar', 'startupCache.zip');" && rm -rf jsloader && /usr/bin/unzip startupCache.zip && rm startupCache.zip && /usr/bin/zip -r9m omni.jar jsloader/resource/gre && /usr/bin/python2.7 /media/bkup/work/rpmbuild/BUILD/xulrunner-9.0/mozilla-central/xulrunner/installer/../../config/optimizejars.py --optimize /media/bkup/work/rpmbuild/BUILD/xulrunner-9.0/mozilla-central/xulrunner/installer/../../jarlog//en-US ./ ./ && mv binary.manifest components && printf "manifest components/binary.manifest\n" > chrome.manifest
	zip warning: name not matched: jsloader
  adding: chrome/ (stored 0%)
  adding: chrome/toolkit.manifest (deflated 67%)
  adding: chrome/en-US.manifest (deflated 74%)
  adding: chrome/toolkit/ (stored 0%)

...

  adding: defaults/pref/ (stored 0%)
  adding: defaults/pref/xulrunner.js (deflated 60%)
  adding: defaults/pref/all-redhat.js (deflated 44%)
  adding: defaults/autoconfig/ (stored 0%)
  adding: defaults/autoconfig/platform.js (deflated 5%)
  adding: defaults/autoconfig/prefcalls.js (deflated 72%)
  adding: greprefs.js (deflated 73%)
failed to get nsXPConnect service!
make[1]: *** [install] Error 1
make[1]: Leaving directory `/foo/rpmbuild/BUILD/xulrunner-9.0/mozilla-central/xulrunner/installer'
make: *** [install] Error 2
The message
failed to get nsXPConnect service!

is generated by

/foo/rpmbuild/BUILD/xulrunner-9.0/mozilla-central/dist/bin/run-mozilla.sh /foo/rpmbuild/BUILD/xulrunner-9.0/mozilla-central/dist/bin/xpcshell -g "$PWD" -a "$PWD" -f /foo/rpmbuild/BUILD/xulrunner-9.0/mozilla-central/xulrunner/installer/../../toolkit/mozapps/installer/precompile_cache.js -e "populate_startupcache('GreD', 'omni.jar', 'startupCache.zip');"
> failed to get nsXPConnect service!

That's presumably because the interface ID of nsIXPConnect changed in bug 684435.

Did you rebuild only part of the tree or something?  IF you build into a new objdir (but save the old one, in case we need it!), do things work?
(In reply to Boris Zbarsky (:bz) from comment #4)
> Did you rebuild only part of the tree or something?  IF you build into a new
> objdir (but save the old one, in case we need it!), do things work?

I always build xulrunner under new directory which contains no generated object files.
OK.  If you just try to run xpcshell, do you get the same issue?  I would assume you do.

If so, can you try stepping into that GetService call and seeing what ends up happening?
I finally found that it's an issue of not mozilla but spec file for RPM package in Fedora.

In the build stage, rpath is set in the value of LDFLAGS. So if the xulrunner has been already installed at the rpath directory, newly generated binaries search libraries located at the rpath direcroty (old ones), not newly generated ones.

Sorry for bugspam.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
At least we can fix it in Fedora :)
You need to log in before you can comment on or make changes to this bug.