Last Comment Bug 686434 - Generating omni.jar failed during building xulrunner
: Generating omni.jar failed during building xulrunner
Status: RESOLVED INVALID
:
Product: Core
Classification: Components
Component: XPConnect (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks: 684435
  Show dependency treegraph
 
Reported: 2011-09-13 02:52 PDT by Takanori MATSUURA
Modified: 2011-09-15 22:29 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Takanori MATSUURA 2011-09-13 02:52:29 PDT
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.
Comment 1 Josh Matthews [:jdm] (away until 9/3) 2011-09-13 06:27:14 PDT
What's the error you see?
Comment 2 Takanori MATSUURA 2011-09-13 06:30:40 PDT
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
Comment 3 Takanori MATSUURA 2011-09-13 06:38:45 PDT
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');"
Comment 4 Boris Zbarsky [:bz] 2011-09-13 17:26:56 PDT
> 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?
Comment 5 Takanori MATSUURA 2011-09-13 20:58:40 PDT
(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.
Comment 6 Boris Zbarsky [:bz] 2011-09-13 22:15:33 PDT
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?
Comment 7 Takanori MATSUURA 2011-09-14 09:41:23 PDT
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.
Comment 8 Martin Stránský 2011-09-15 22:29:29 PDT
At least we can fix it in Fedora :)

Note You need to log in before you can comment on or make changes to this bug.