Last Comment Bug 644692 - bsdiff build failure with system bzip2
: bsdiff build failure with system bzip2
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: mozilla6
Assigned To: Mike Hommey [:glandium]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-24 11:13 PDT by Joseph Felps
Modified: 2011-04-13 01:12 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Possible fix (798 bytes, patch)
2011-03-25 09:03 PDT, Mike Hommey [:glandium]
no flags Details | Diff | Review
Modified fix (720 bytes, patch)
2011-03-25 10:49 PDT, Joseph Felps
ted: review+
Details | Diff | Review

Description Joseph Felps 2011-03-24 11:13:34 PDT
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:2.0b13pre) Gecko/20100101 Firefox/4.0b13pre
Build Identifier: 

Here is the build failure log:

make[6]: Leaving directory `/home/null/xulrunner-build/modules/libmar/tool'
make[5]: Leaving directory `/home/null/xulrunner-build/modules/libmar'
make[5]: Entering directory `/home/null/xulrunner-build/other-licenses/bsdiff'
make[5]: *** No rule to make target `../../dist/host/lib/libhostbz2.a', needed by `mbsdiff'.  Stop.
make[5]: *** Waiting for unfinished jobs....
bsdiff.c
gcc -o host_bsdiff.o -c  -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -W -pedantic -Wno-long-long -march=native -fno-strict-aliasing -pthread -pipe  -DNDEBUG -DTRIMMED -g -fprofile-generate -O3 -fomit-frame-pointer -DXP_UNIX -O3 -fomit-frame-pointer  -I/home/null/mozilla-src/toolkit/mozapps/update/updater -I/home/null/mozilla-src/other-licenses/bsdiff -I. -I../../dist/include -I../../dist/include/nsprpub  -I/home/null/xulrunner-build/dist/include/nspr -I/home/null/xulrunner-build/dist/include/nss      -I/home/null/xulrunner-build/dist/include/nspr /home/null/mozilla-src/other-licenses/bsdiff/bsdiff.c
In file included from /home/null/mozilla-src/other-licenses/bsdiff/bsdiff.c:19:0:
/home/null/mozilla-src/toolkit/mozapps/update/updater/bspatch.h:35:1: warning: C++ style comments are not allowed in ISO C90
/home/null/mozilla-src/toolkit/mozapps/update/updater/bspatch.h:35:1: warning: (this will be reported only once per input file)
/home/null/mozilla-src/other-licenses/bsdiff/bsdiff.c: In function ‘main’:
/home/null/mozilla-src/other-licenses/bsdiff/bsdiff.c:215:17: warning: ‘old’ may be used uninitialized in this function
/home/null/mozilla-src/other-licenses/bsdiff/bsdiff.c:216:13: warning: ‘oldsize’ may be used uninitialized in this function
/home/null/mozilla-src/other-licenses/bsdiff/bsdiff.c:215:22: warning: ‘newbuf’ may be used uninitialized in this function
/home/null/mozilla-src/other-licenses/bsdiff/bsdiff.c:216:21: warning: ‘newsize’ may be used uninitialized in this function
make[5]: Leaving directory `/home/null/xulrunner-build/other-licenses/bsdiff'
make[4]: *** [libs_tier_platform] Error 2
make[4]: Leaving directory `/home/null/xulrunner-build'
make[3]: *** [tier_platform] Error 2
make[3]: Leaving directory `/home/null/xulrunner-build'
make[2]: *** [default] Error 2
make[2]: Leaving directory `/home/null/xulrunner-build'
make[1]: *** [build] Error 2
make[1]: Leaving directory `/home/null/mozilla-src'
make: *** [profiledbuild] Error 2

I think this maybe caused by bug 584474.

Reproducible: Always
Comment 1 Ted Mielczarek [:ted.mielczarek] 2011-03-24 12:05:40 PDT
Conveniently glandium is looking at PGO builds as well.
Comment 2 Mike Hommey [:glandium] 2011-03-24 12:19:01 PDT
This might be the same as bug 602245. Does the patch from there solve the problem for you?
Comment 3 Joseph Felps 2011-03-24 21:16:35 PDT
I tried the patch, it makes no difference.  That bug seems to be pretty old, I just started getting this build error around Monday.
Comment 4 Mike Hommey [:glandium] 2011-03-25 00:00:09 PDT
I've built with PGO several times this week, this is weird that it appeared for you and not for me... what was the revision you tried ?
Comment 5 Joseph Felps 2011-03-25 08:51:49 PDT
Ok I just tried again from tip, changeset 9906280eeef7 and I get the same build error.  So I tried an experiment,  I modified my mozconfig file to comment out the option --with-system-bz2 and now I don't get the build error.  So I think it has to do with bsdiff not finding the system bz2 libraries?
Comment 6 Mike Hommey [:glandium] 2011-03-25 09:00:21 PDT
(In reply to comment #5)
> Ok I just tried again from tip, changeset 9906280eeef7 and I get the same build
> error.  So I tried an experiment,  I modified my mozconfig file to comment out
> the option --with-system-bz2 and now I don't get the build error.  So I think
> it has to do with bsdiff not finding the system bz2 libraries?

Ah yes, that's very much possible. But that is not related to pgo.
Comment 7 Mike Hommey [:glandium] 2011-03-25 09:03:00 PDT
Created attachment 521837 [details] [diff] [review]
Possible fix

This should fix your issue, though it will fail to work properly on cross compilations.
Comment 8 Joseph Felps 2011-03-25 09:18:00 PDT
Well I kinda spoke too soon.  The compile got pass the previous point but now I getting this failure:

make[3]: Leaving directory `/home/null/xulrunner-build/xulrunner/installer'
make tools
make[3]: Entering directory `/home/null/xulrunner-build/xulrunner/installer'
Makefile:112: FULL_NSPR_CFLAGS=-I\${includedir}
make[3]: Nothing to be done for `tools'.
make[3]: Leaving directory `/home/null/xulrunner-build/xulrunner/installer'
if test -d ../../dist/bin ; then touch ../../dist/bin/.purgecaches ; fi
make[2]: Leaving directory `/home/null/xulrunner-build/xulrunner/installer'
make[1]: Leaving directory `/home/null/xulrunner-build'
OBJDIR=/home/null/mozilla-central/../xulrunner-build python /home/null/mozilla-central/../xulrunner-build/_profile/pgo/profileserver.py
args: ['/home/null/xulrunner-build/dist/xulrunner/xulrunner-bin', '-no-remote', '-profile', '/home/null/xulrunner-build/_profile/pgo/pgoprofile/', 'http://localhost:8888/index.html']
INFO | automation.py | Application pid: 23264
Error: unrecognized application.ini path.
TEST-UNEXPECTED-FAIL | automation.py | Exited with code 2 during test run
INFO | automation.py | Application ran for: 0:00:00.220967
INFO | automation.py | Reading PID log: /tmp/tmpyhsZHLpidlog
make: *** [profiledbuild] Error 2

Should I open a separate bug?
Comment 9 Mike Hommey [:glandium] 2011-03-25 09:25:27 PDT
(In reply to comment #8)
> Should I open a separate bug?

No, because this is not a bug, you're trying to use the firefox profiling script with xulrunner...
Comment 10 Joseph Felps 2011-03-25 10:49:27 PDT
Created attachment 521858 [details] [diff] [review]
Modified fix
Comment 11 Joseph Felps 2011-03-25 10:49:58 PDT
Ah, ok.  Sorry about that.  I'm guessing there currently isn't a way to pgo xulrunner?

Well, I had to slightly modify the patch to get it to build.  I re-enabled --with-system-bz2, did a regular make -f client.mk build, and everything works fine now.
Comment 12 Ted Mielczarek [:ted.mielczarek] 2011-03-25 10:55:47 PDT
You can PGO xulrunner, we just don't have an in-tree script to do it. You have to provide your own, see https://developer.mozilla.org/en/Building_with_Profile-Guided_Optimization
Comment 13 Mike Hommey [:glandium] 2011-04-13 01:12:30 PDT
http://hg.mozilla.org/mozilla-central/rev/0583d58b20a3

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