Description of problem: When trying to build xulrunner with dtrace enabled (I have the latest systemtap and systemtap-sdt-devel packages installed on my recently updated i686 rawhide VM), I get the following errors in js sources: In file included from jsdtracef.c:47: jsdtracef.h:36:30: error: javascript-trace.h: No such file or directory jsdtracef.c: In function 'jsdtrace_function_entry': jsdtracef.c:209: warning: implicit declaration of function 'JAVASCRIPT_FUNCTION_ENTRY' jsdtracef.c: In function 'jsdtrace_function_info': jsdtracef.c:220: warning: implicit declaration of function 'JAVASCRIPT_FUNCTION_INFO' jsdtracef.c: In function 'jsdtrace_function_args': jsdtracef.c:233: warning: implicit declaration of function 'JAVASCRIPT_FUNCTION_ARGS' jsdtracef.c: In function 'jsdtrace_function_rval': jsdtracef.c:249: warning: implicit declaration of function 'JAVASCRIPT_FUNCTION_RVAL' jsdtracef.c: In function 'jsdtrace_function_return': jsdtracef.c:261: warning: implicit declaration of function 'JAVASCRIPT_FUNCTION_RETURN' jsdtracef.c: In function 'jsdtrace_object_create_start': jsdtracef.c:271: warning: implicit declaration of function 'JAVASCRIPT_OBJECT_CREATE_START' jsdtracef.c: In function 'jsdtrace_object_create_done': jsdtracef.c:277: warning: implicit declaration of function 'JAVASCRIPT_OBJECT_CREATE_DONE' jsdtracef.c: In function 'jsdtrace_object_create': jsdtracef.c:283: warning: implicit declaration of function 'JAVASCRIPT_OBJECT_CREATE' jsdtracef.c:286: error: 'uintptr_t' undeclared (first use in this function) jsdtracef.c:286: error: (Each undeclared identifier is reported only once jsdtracef.c:286: error: for each function it appears in.) jsdtracef.c:286: error: expected ')' before 'obj' jsdtracef.c: In function 'jsdtrace_object_finalize': jsdtracef.c:299: warning: implicit declaration of function 'JAVASCRIPT_OBJECT_FINALIZE' jsdtracef.c:299: error: 'uintptr_t' undeclared (first use in this function) jsdtracef.c:299: error: expected ')' before 'obj' I hand built a javascript-trace.h in the same fashion as the makefile in js/src/ does and tried to build again. The missing file error for javascript-trace.h and related warnings were resolved but I still encounter the uintptr_t related errors at jsdtracef.c:286 and jsdtracef.c 299 Version-Release number of selected component (if applicable): xulrunner-1.9.1-0.9.beta2.fc11 How reproducible: Every time Steps to Reproduce: 1. Add a 'ac_add_options --enable-drace' line to xulrunner-mozconfig 2. Use rpmbuild to build from sources Actual results: The error messages reported above Expected results: xulrunner builds Additional info:
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle. Changing version to '11'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Probably slightly different issue, but still similar to this one. Reproducable on Rawhide (trying to build a package to work on bug 496113): make[5]: Entering directory `/home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/shell' js.cpp c++ -o js.o -c -I../../../dist/system_wrappers_js -include ../config/gcc_hidden.h -DEXPORT_JS_API -DOSTYPE=\"Linux2.6.32-15.MClocal.el6\" -DOSARCH=Linux -I.. -I.. -I. -I. -I../../../dist/include -I../../../dist/include/nsprpub -I/usr/include/nspr4 -fPIC -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Wno-long-long -pedantic -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing -pthread -pipe -DNDEBUG -DTRIMMED -Os -freorder-blocks -fno-reorder-functions -DMOZILLA_CLIENT -include ../js-confdefs.h -Wp,-MD,.deps/js.pp js.cpp js.cpp: In function 'void my_ErrorReporter(JSContext*, const char*, JSErrorReport*)': js.cpp:4317: warning: ignoring return value of 'size_t fwrite(const void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result c++ -o js -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Wno-long-long -pedantic -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing -pthread -pipe -DNDEBUG -DTRIMMED -Os -freorder-blocks -fno-reorder-functions js.o -lpthread -Wl,-rpath,/usr/lib64/xulrunner-1.9.2 -Wl,-rpath-link,/bin -Wl,-rpath-link,/usr/lib -L../../../dist/bin -L../../../dist/lib -L/usr/lib64 -lplds4 -lplc4 -lnspr4 -lpthread -ldl ../editline/libeditline.a ../libjs_static.a -ldl -lm ../libjs_static.a(jsgc.o): In function `FinalizeObject': /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsgc.cpp:3193: undefined reference to `object__finalize_semaphore' ../libjs_static.a(jsinvoke.o): In function `js_Execute': /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsinterp.cpp:1502: undefined reference to `execute__start_semaphore' /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsinterp.cpp:1624: undefined reference to `execute__done_semaphore' /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsinterp.cpp:1624: undefined reference to `execute__done_semaphore' ../libjs_static.a(jsinvoke.o): In function `js_Invoke': /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsinterp.cpp:1342: undefined reference to `function__entry_semaphore' /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsinterp.cpp:1344: undefined reference to `function__info_semaphore' /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsinterp.cpp:1346: undefined reference to `function__args_semaphore' /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsinterp.cpp:1373: undefined reference to `function__rval_semaphore' /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsinterp.cpp:1375: undefined reference to `function__return_semaphore' ../libjs_static.a(jsobj.o): In function `js_NewObjectWithGivenProto': /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsobj.cpp:2054: undefined reference to `object__create__start_semaphore' /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsobj.cpp:2123: undefined reference to `object__create_semaphore' /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsobj.cpp:2125: undefined reference to `object__create__done_semaphore' /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsobj.cpp:2054: undefined reference to `object__create__start_semaphore' /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsobj.cpp:2123: undefined reference to `object__create_semaphore' /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsobj.cpp:2125: undefined reference to `object__create__done_semaphore' ../libjs_static.a(jsdtracef.o): In function `jsdtrace_execute_done': /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsdtracef.cpp:277: undefined reference to `execute__done_semaphore' ../libjs_static.a(jsdtracef.o): In function `jsdtrace_execute_start': /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsdtracef.cpp:268: undefined reference to `execute__start_semaphore' ../libjs_static.a(jsdtracef.o): In function `jsdtrace_object_finalize': /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsdtracef.cpp:262: undefined reference to `object__finalize_semaphore' ../libjs_static.a(jsdtracef.o): In function `jsdtrace_object_create_done': /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsdtracef.cpp:240: undefined reference to `object__create__done_semaphore' ../libjs_static.a(jsdtracef.o): In function `jsdtrace_object_create_start': /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsdtracef.cpp:234: undefined reference to `object__create__start_semaphore' ../libjs_static.a(jsdtracef.o): In function `jsdtrace_function_return': /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsdtracef.cpp:224: undefined reference to `function__return_semaphore' ../libjs_static.a(jsdtracef.o): In function `jsdtrace_function_entry': /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsdtracef.cpp:171: undefined reference to `function__entry_semaphore' ../libjs_static.a(jsdtracef.o): In function `jsdtrace_function_rval': /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsdtracef.cpp:211: undefined reference to `function__rval_semaphore' ../libjs_static.a(jsdtracef.o): In function `jsdtrace_function_args': /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsdtracef.cpp:195: undefined reference to `function__args_semaphore' ../libjs_static.a(jsdtracef.o): In function `jsdtrace_object_create': /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsdtracef.cpp:246: undefined reference to `object__create_semaphore' ../libjs_static.a(jsdtracef.o): In function `jsdtrace_function_info': /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsdtracef.cpp:182: undefined reference to `function__info_semaphore' ../libjs_static.a(jsinterp.o): In function `js_Interpret': /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsops.cpp:2172: undefined reference to `function__entry_semaphore' /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsops.cpp:2174: undefined reference to `function__info_semaphore' /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsops.cpp:2176: undefined reference to `function__args_semaphore' /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsops.cpp:268: undefined reference to `function__rval_semaphore' /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsops.cpp:270: undefined reference to `function__return_semaphore' /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsops.cpp:2196: undefined reference to `function__entry_semaphore' /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsops.cpp:2198: undefined reference to `function__info_semaphore' /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsops.cpp:2200: undefined reference to `function__args_semaphore' /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsops.cpp:2211: undefined reference to `function__rval_semaphore' /home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/jsops.cpp:2213: undefined reference to `function__return_semaphore' /usr/bin/ld: js: hidden symbol `object__create__done_semaphore' isn't defined /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status make[5]: *** [js] Error 1 make[5]: Leaving directory `/home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src/shell' make[4]: *** [libs] Error 2 make[4]: Leaving directory `/home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2/js/src' make[3]: *** [libs_tier_js] Error 2 make[3]: Leaving directory `/home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2' make[2]: *** [tier_js] Error 2 make[2]: Leaving directory `/home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2' make[1]: *** [default] Error 2 make[1]: Leaving directory `/home/matej/rpmbuild/BUILD/xulrunner-1.9.2.1/mozilla-1.9.2' make: *** [build] Error 2 chyba: Špatný návratový kód z /var/tmp/rpm-tmp.GwGRqL (%build) chyby sestavení RPM: Špatný návratový kód z /var/tmp/rpm-tmp.GwGRqL (%build) johanka:SPECS$
The result from comment 2 is because javascript builds both an executable and a shared object but only the shared object links in the probe object file. I get around that in my testing by doing: sed -i '/include.*rules.mk/a\ PROGOBJS+=mozjs-dtrace.o' js/src/Makefile
Created attachment 394364 [details] patch on spec file I am probably thick, but even with this patch on spec file, build fails.
Created attachment 394365 [details] log of the build attempt
I was building upstream 1.9.1.4 (it is easier to automate since I can just wget the source). That links with an explicit object list: g++ -o js -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-long-long -pedantic -g -I/work/scox/systemtap/bld/../install/include -fno-strict-aliasing -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -Os -fstrict-aliasing js.o jsdtracef.o jsapi.o jsarena.o jsarray.o jsatom.o jsbool.o jscntxt.o jsdate.o jsdbgapi.o jsdhash.o jsdtoa.o jsemit.o jsexn.o jsfun.o jsgc.o jshash.o jsinterp.o jsinvoke.o jsiter.o jslock.o jslog2.o jsmath.o jsnum.o jsobj.o json.o jsopcode.o jsparse.o jsprf.o jsregexp.o jsscan.o jsscope.o jsscript.o jsstr.o jsutil.o jsxdrapi.o jsxml.o prmjtime.o mozjs-dtrace.o -lpthread -Wl,-rpath-link,/bin -Wl,-rpath-link,/lib -L./../../dist/bin -L./../../dist/lib -L/work/scox/systemtap/bld/testsuite/xul/bld/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl -ldl -lm -lm -ldl versus 1.9.2.1 which links with: c++ -o js -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Wno-long-long -pedantic -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing -pthread -pipe -DNDEBUG -DTRIMMED -Os -freorder-blocks -fno-reorder-functions js.o -lpthread -Wl,-rpath,/usr/lib64/xulrunner-1.9.2 -Wl,-rpath-link,/bin -Wl,-rpath-link,/usr/lib -L../../../dist/bin -L../../../dist/lib -L/usr/lib64 -lplds4 -lplc4 -lnspr4 -lpthread -ldl ../editline/libeditline.a ../libjs_static.a -ldl -lm I'm switching to 1.9.2.1 and I'll upgrade the patch.
The js Makefile links the dtrace object into the .so but not the .a. This patch adjusts for that: sed -i '/include.*rules.mk/a\ ifdef HAVE_DTRACE\ PROGOBJS += ../mozjs-dtrace.$(OBJ_SUFFIX)\ endif\ ' js/src/shell/Makefile sed -i '/include.*rules.mk/a\ ifdef HAVE_DTRACE\ PROGOBJS += ../mozjs-dtrace.$(OBJ_SUFFIX)\ endif\ ' js/src/jsapi-tests/Makefile
This bug appears to have been reported against 'rawhide' during the Fedora 13 development cycle. Changing version to '13'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
systemtap uses the patch in #7 to successfully build and test xul 1.9.2rc1 as part of its testsuite
Reassigning to component owner, as Stan is not in a position to commit the makefile patch that appears to correct this problem.
Please file the patch at upstream bugzilla (bugzilla.mozilla.org).
Just switching on NEEDINFO, so we know we are waiting here.
Created attachment 457294 [details] xulrunner --enable-dtrace patch I have a patch for building xulrunner-1.9.2.3-1 with --enable-dtrace. I had to workaround a bug in the released sdt.h DTRACE_PROBE10 macro; missing cast. SOURCES/mozjs-dtrace.patch New xulrunner-mozconfig.patch Patch to SOURCES/xulrunner-mozconfig xulrunner.spec.patch Patch to SPECS/xulrunner.spec
OK, Martin will push upstream whatever is needed. No need to create a bug upstream after all. Thanks Stan for your work.
We filed this bug in the upstream database (https://bugzilla.mozilla.org/show_bug.cgi?id=619661) and believe that it is more appropriate to let it be resolved upstream. We will continue to track the issue in the centralized upstream bug tracker, and will review any bug fixes that become available for consideration in future updates. We would strongly encourage you to subscribe to the upstream bug as well (by logging in and adding yourself to the Cc list), so that you can provide whatever information required for the successful resolving of this issue. Thank you for helping to make free software better.
Reopening, we will have to fix ourselves it seems to me. However, not sure whether somebody from MoFo Red Hat maintainers will pick it up. Also build with this patch failed for me on Rawhide with the latest XULRunner 2.0 http://koji.fedoraproject.org/koji/taskinfo?taskID=2766561
It's going to be fixed in firefox 8.