[dtrace-discuss] Unable to build a dtrace-enabled python

Adam Leventhal
Mon, 13 Apr 2009 05:53:35 -0000

Hey Robert,

I''ve never built a DTrace-enabled python, but I can tell you that USDT
doesn''t play well generally with .a archives. That may be the issue
you''re hitting, but I''m not sure I have enough data to answer
your
definitively. Can you provide any additional information? Have you
contacted the author of the patches that you''re using (or is that
person on this list perhaps)?

Adam

On Apr 10, 2009, at 4:30 PM, Robert Diamond wrote:

> I''ve followed all the threads I could find, and many Google Red
> Herrings, so if it''s an RTFM, please let me know which FM I should
> read :-)
>
> I''m running open solaris 5.11 in 32-bit mode using VMWare Fusion
on
> a macbook pro.  Gcc is version 4.0.3.
>
> I downloaded the source for Python v2.4.4, since this is the version
> for which the patches appear to be written.  First problem I
> encountered was that dtrace''s compiler didn''t seem to
know about
> varargs.  I added the following two lines to Python/phelper.d:
> #define __builtin_va_list long
> #define __attribute__(x)
> This allowed compilation to complete.  I am stuck now on the link
> phase:
> robertdiamond$ svn commit -m ''hopefully fix more bugs than I addar
> cr libpython2.4.a Python/bltinmodule.o Python/exceptions.o Python/
> ceval.o Python/compile.o Python/codecs.o Python/errors.o Python/
> frozen.o Python/frozenmain.o Python/future.o Python/getargs.o Python/
> getcompiler.o Python/getcopyright.o Python/getmtime.o Python/
> getplatform.o Python/getversion.o Python/graminit.o Python/import.o
> Python/importdl.o Python/marshal.o Python/modsupport.o Python/
> mystrtoul.o Python/mysnprintf.o Python/pyfpe.o Python/pystate.o
> Python/pythonrun.o Python/structmember.o Python/symtable.o Python/
> sysmodule.o Python/traceback.o Python/getopt.o Python/pystrtod.o
> Python/dynload_shlib.o Python/dtrace.o Python/phelper.o  Python/
> thread.o
> ar cr libpython2.4.a Modules/config.o Modules/getpath.o Modules/
> main.o Modules/gcmodule.oar cr libpython2.4.a Modules/
> threadmodule.o  Modules/signalmodule.o  Modules/posixmodule.o
> Modules/errnomodule.o  Modules/pwdmodule.o  Modules/_sre.o  Modules/
> _codecsmodule.o  Modules/zipimport.o  Modules/symtablemodule.o
> Modules/xxsubtype.oranlib
> libpython2.4.a                              c++  -Xlinker --export-
> dynamic -o python \         Modules/python.o \
> libpython2.4.a -lsocket -lnsl -ldl    -lm
> libpython2.4.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make: *** [python] Error 1
>
>
> My guess is this is because dtrace modifies ceval.o, and changes
> four undefined symbols to Absolute relocation:
> # nm Python/ceval.o
> ...
> 00000000 A __dtrace_python___function-entry
> 00000000 A __dtrace_python___function-return
> 00000000 A __dtraceenabled_python___function-entry
> 00000000 A __dtraceenabled_python___function-return
> ...
>
>
> thanks in advance,
>    Robert D
>
> Message was edited by: rdiamond
> --
> This message posted from opensolaris.org
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss at opensolaris.org


--
Adam Leventhal, Fishworks                        http://blogs.sun.com/ahl