Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Perl: porters

[perl #112512] -Dusedtrace doesn't work on FreeBSD

 

 

Perl porters RSS feed   Index | Next | Previous | View Threaded


perlbug-followup at perl

Apr 17, 2012, 9:13 PM

Post #1 of 3 (71 views)
Permalink
[perl #112512] -Dusedtrace doesn't work on FreeBSD

# New Ticket Created by Steve Wills
# Please include the string: [perl #112512]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=112512 >


This is a bug report for perl from steve [at] mouf,
generated with the help of perlbug 1.39 running under perl 5.12.4.


-----------------------------------------------------------------
enabling dtrace via -Dusedtrace doesn't work.

The call to dtrace in Makefile.SH needs to have -64 added, since I'm on a 64
bit system, although I'm not sure it should be. Also, these addtional libs need
to be added to the miniperl and libperl link:

-ldtrace -ldwarf -lelf -lproc -lctf -lrtld_db -lz

Also, -pthread may also be needed in some cases. These may be issues on the
FreeBSD side, I'll try to investigate.


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=low
---
Site configuration information for perl 5.12.4:

Configured by steve at Fri Jan 20 14:22:20 EST 2012.

Summary of my perl5 (revision 5 version 12 subversion 4) configuration:

Platform:
osname=freebsd, osvers=10.0-current, archname=amd64-freebsd
uname='freebsd tinderbox.host 10.0-current freebsd 10.0-current #0: fri jan 20 14:21:53 est 2012 root [at] tinderbox:usrsrcsysmagickernelpath amd64 '
config_args='-sde -Dprefix=/usr/local -Darchlib=/usr/local/lib/perl5/5.12.4/mach -Dprivlib=/usr/local/lib/perl5/5.12.4 -Dman3dir=/usr/local/lib/perl5/5.12.4/perl/man/man3 -Dman1dir=/usr/local/man/man1 -Dsitearch=/usr/local/lib/perl5/site_perl/5.12.4/mach -Dsitelib=/usr/local/lib/perl5/site_perl/5.12.4 -Dscriptdir=/usr/local/bin -Dsiteman3dir=/usr/local/lib/perl5/5.12.4/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dcc=cc -Duseshrplib -Dinc_version_list=none -Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.12.4/BSDPAN" -Doptimize=-O2 -pipe -fno-strict-aliasing -Ui_gdbm -Dusethreads=n -Dusemymalloc=n -Duse64bitint'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.12.4/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include',
optimize='-O2 -pipe -fno-strict-aliasing',
cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.12.4/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.2.1 20070831 patched [FreeBSD]', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags ='-pthread -Wl,-E -fstack-protector -L/usr/local/lib'
libpth=/usr/lib /usr/local/lib
libs=-lm -lcrypt -lutil
perllibs=-lm -lcrypt -lutil
libc=, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-R/usr/local/lib/perl5/5.12.4/mach/CORE'
cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib -fstack-protector'

Locally applied patches:


---
@INC for perl 5.12.4:
/usr/local/lib/perl5/5.12.4/BSDPAN
/usr/local/lib/perl5/site_perl/5.12.4/mach
/usr/local/lib/perl5/site_perl/5.12.4
/usr/local/lib/perl5/5.12.4/mach
/usr/local/lib/perl5/5.12.4
.

---
Environment for perl 5.12.4:
HOME=/home/steve
LANG (unset)
LANGUAGE=
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/usr/local/bin:/opt/local/bin:/opt/local/sbin:/usr/X11R6/bin:/usr/local/bin:/opt/local/bin:/opt/local/sbin:/usr/X11R6/bin:/usr/local/kde4/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/steve/bin
PERL_BADLANG (unset)
SHELL=/usr/local/bin/zsh


perlbug-followup at perl

Apr 30, 2012, 3:10 AM

Post #2 of 3 (61 views)
Permalink
[perl #112512] -Dusedtrace doesn't work on FreeBSD [In reply to]

On Tue Apr 17 21:13:35 2012, swills wrote:
> This is a bug report for perl from steve [at] mouf,
> generated with the help of perlbug 1.39 running under perl 5.12.4.
>
>
> -----------------------------------------------------------------
> enabling dtrace via -Dusedtrace doesn't work.
>
> The call to dtrace in Makefile.SH needs to have -64 added, since I'm
> on a 64
> bit system, although I'm not sure it should be. Also, these addtional
> libs need
> to be added to the miniperl and libperl link:
>
> -ldtrace -ldwarf -lelf -lproc -lctf -lrtld_db -lz
>
> Also, -pthread may also be needed in some cases. These may be issues
> on the
> FreeBSD side, I'll try to investigate.

Ignoring 64-bit for now, I can get blead with usedtrace building with:

case "$usedtrace" in
$define|true|[Yy]*) libswanted="$libswanted elf"
esac

Based on reading:

http://wiki.freebsd.org/DTrace/userland

and

http://svnweb.freebsd.org/base/head/share/mk/bsd.dtrace.mk?view=markup

this should be enough as part of the build process.

Unfortunately when trying to test this:

freebsd32# dtrace -n 'perl::sub-entry, perl::sub-return {
trace(copyinstr(arg0)) }' -c '/home/tony/perl/blead-dtrace/bin/perl
/home/tony/subs.pl'
hello
ld-elf.so.1: failed to control pid 11721: process exited with status 0
freebsd32#

Other userland dtrace implementations seem to have similar issues on
FreeBSD:

http://lists.freebsd.org/pipermail/freebsd-questions/2012-February/238862.html

Tony

---
via perlbug: queue: perl5 status: new
https://rt.perl.org:443/rt3/Ticket/Display.html?id=112512


perlbug-followup at perl

May 1, 2012, 6:02 PM

Post #3 of 3 (56 views)
Permalink
[perl #112512] -Dusedtrace doesn't work on FreeBSD [In reply to]

On Tue Apr 17 21:13:35 2012, swills wrote:
> enabling dtrace via -Dusedtrace doesn't work.
>
> The call to dtrace in Makefile.SH needs to have -64 added, since I'm
> on a 64
> bit system, although I'm not sure it should be. Also, these addtional
> libs need
> to be added to the miniperl and libperl link:
>
> -ldtrace -ldwarf -lelf -lproc -lctf -lrtld_db -lz
>
> Also, -pthread may also be needed in some cases. These may be issues
> on the
> FreeBSD side, I'll try to investigate.
>

From discussion with you on IRC there's FreeBSD issues preventing this
from working.

Once those have been resolved, please create a new ticket or re-open
this one.

Tony

---
via perlbug: queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=112512

Perl porters RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.