Closed Bug 619661 Opened 15 years ago Closed 15 years ago

js source fails to build with --enable-dtrace

Categories

(Core :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 574403

People

(Reporter: mcepl, Unassigned)

Details

Attachments

(1 file)

Attached file suggested patch
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 comments: 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 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. Created attachment 394365 [details] [diff] [review] log of the build attempt Created attachment 394364 [details] [diff] [review] patch on spec file ----------------------------- 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 Just switching on NEEDINFO, so we know we are waiting here. Please file the patch at upstream bugzilla (bugzilla.mozilla.org). Reassigning to component owner, as Stan is not in a position to commit the makefile patch that appears to correct this problem. systemtap uses the patch in #7 to successfully build and test xul 1.9.2rc1 as part of its testsuite
Build with XULRunner 2.0 from Fedora Rawhide fails http://koji.fedoraproject.org/koji/taskinfo?taskID=2766561
I'm going to dupe this to bug 574403 because I seem to have this building successfully with both dtrace on OSX and systemtap on Linux. I remember needing to fix up DTRACE_PROBE10 as well, but I newer systemtaps seem to have corrected that problem. I'm not doing everything you did in your patches, but I'd rather new bugs be filed for anything remaining.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: