NetBSD Problem Report #48516
From ryo_on@yk.rim.or.jp Mon Jan 13 03:05:12 2014
Return-Path: <ryo_on@yk.rim.or.jp>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 1A1BEA6468
for <gnats-bugs@gnats.NetBSD.org>; Mon, 13 Jan 2014 03:05:12 +0000 (UTC)
Message-Id: <20140113030508.904F8100FF884@mail.SiriusCloud.jp>
Date: Mon, 13 Jan 2014 12:05:08 +0900 (JST)
From: ryoon@NetBSD.org
Reply-To: ryoon@NetBSD.org
To: gnats-bugs@gnats.NetBSD.org
Subject: lang/perl5 build under OS X 10.9.1 (Mavericks) fails when dtrace option is enabled
X-Send-Pr-Version: 3.95
>Number: 48516
>Category: pkg
>Synopsis: lang/perl5 build under OS X 10.9.1 (Mavericks) fails when dtrace option is enabled
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: sevan
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jan 13 03:10:01 +0000 2014
>Closed-Date: Mon Jun 20 13:15:48 +0000 2016
>Last-Modified: Mon Jun 20 13:15:48 +0000 2016
>Originator: Ryo ONODERA
>Release: NetBSD 6.99.28
>Organization:
>Environment:
System: Darwin technetium.elements.tetera.org 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
>Description:
I have setup 64bit ABI pkgsrc with the following command with Xcode 5.0.2.
# ./bootstrap --workdir /tmp/bs --varbase /usr/pkg/var --compiler clang --abi 64
And I want to build lang/perl5, but its build fails with following error.
OS X 10.9.1 Mavericks' dtrace command does not accept -G option.
(snip)
==========================================================================
The supported build options for perl are:
64bitall 64bitauto 64bitint 64bitmore 64bitnone
debug dtrace mstats threads
The currently selected options are:
64bitauto dtrace threads
You can select which build options to use by setting PKG_DEFAULT_OPTIONS
or the following variable. Its current value is shown:
PKG_OPTIONS.perl (not defined)
==========================================================================
(snip)
/usr/sbin/dtrace -G -s perldtrace.d -o miniperldtrace.o perlmini.o opmini.o miniperlmain.o gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o perlmini.o
Usage: dtrace [-aACeFHlqSvVwZ] [-arch i386|x86_64] [-b bufsz] [-c cmd] [-D name[=def]]
[-I path] [-L path] [-o output] [-p pid] [-s script] [-U name]
[-x opt[=val]]
[-P provider [[ predicate ] action ]]
[-m [ provider: ] module [[ predicate ] action ]]
[-f [[ provider: ] module: ] func [[ predicate ] action ]]
[-n [[[ provider: ] module: ] func: ] name [[ predicate ] action ]]
[-i probe-id [[ predicate ] action ]] [ args ... ]
predicate -> '/' D-expression '/'
action -> '{' D-statements '}'
-arch Generate programs and Mach-O files for the specified architecture
-a claim anonymous tracing state
-A generate plist(5) entries for anonymous tracing
-b set trace buffer size
-c run specified command and exit upon its completion
-C run cpp(1) preprocessor on script files
-D define symbol when invoking preprocessor
-e exit after compiling request but prior to enabling probes
-f enable or list probes matching the specified function name
-F coalesce trace output by function
-h generate a header file with definitions for static probes
-H print included files when invoking preprocessor
-i enable or list probes matching the specified probe id
-I add include directory to preprocessor search path
-l list probes matching specified criteria
-L add library directory to library search path
-m enable or list probes matching the specified module name
-n enable or list probes matching the specified probe name
-o set output file
-p grab specified process-ID and cache its symbol tables
-P enable or list probes matching the specified provider name
-q set quiet mode (only output explicitly traced data)
-s enable or list probes according to the specified D script
-S print D compiler intermediate code
-U undefine symbol when invoking preprocessor
-v set verbose mode (report stability attributes, arguments)
-V report DTrace API version
-w permit destructive actions
-x enable or modify compiler and tracing options
-Z permit probe descriptions that match zero probes
gnumake: *** [miniperldtrace.o] Error 2
gnumake: *** Waiting for unfinished jobs....
*** Error code 2
Stop.
bmake: stopped in /mnt/pkgsrc/lang/perl5
*** Error code 1
Stop.
bmake: stopped in /mnt/pkgsrc/lang/perl5
>How-To-Repeat:
Under OS X 10.9.1 Mavericks,
$ cd pkgsrc/lang/perl5
$ /usr/pkg/bin/bmake
>Fix:
I have no idea.
How about other version of OS X?
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->macosx-pkg-peoples
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Mon, 13 Jan 2014 09:12:09 +0000
Responsible-Changed-Why:
Call for Mac users
Responsible-Changed-From-To: macosx-pkg-peoples->macosx-pkg-people
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Mon, 13 Jan 2014 09:26:23 +0000
Responsible-Changed-Why:
fix roll name
Responsible-Changed-From-To: macosx-pkg-people->macos-pkg-people
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Mon, 13 Jan 2014 09:29:03 +0000
Responsible-Changed-Why:
fix again...
Responsible-Changed-From-To: macos-pkg-people->sevan
Responsible-Changed-By: sevan@NetBSD.org
Responsible-Changed-When: Fri, 20 Mar 2015 05:26:10 +0000
Responsible-Changed-Why:
Take, DTrace is being envoked with -G to generate an ELF file containing an embedded DTrace program, Darwin uses MACH-O not ELF hence the -G option is not available.
From: Sevan Janiyan <sevan@NetBSD.org>
To: "gnats-bugs@netbsd.org" <gnats-bugs@NetBSD.org>
Cc:
Subject: Re: pkg/48516 (lang/perl5 build under OS X 10.9.1 (Mavericks) fails
when dtrace option is enabled)
Date: Sat, 18 Jul 2015 20:02:21 +0100
Just an update on progress, there are two issues with lang/perl5 in
pkgsrc that prevent perl being built with DTrace support.
As mentioned previously, DTrace on OS X does not have -G because it use
MACH-O binary format rather than ELF.
Modifying the calls to dtrace to use -arch i386 in Makefile.SH instead
of -G resolves the issue reported.
The build then fails at a different place with
perldtrace.d: line 21: extraneous argument 'perlmini.o' ($40 is not
referenced)
This is due to the changes made by lang/perl5/patches/patch-Makefile.SH
By not applying this patch, lang/perl5 builds successfully on 10.95 with
dtrace support enabled.
I've filed a bug upstream to highlight the issue with -G / -arch flags
[perl #125639]
https://rt.perl.org/Ticket/Display.html?id=125639
Not found a solution for the fallout from the changes introduced by
lang/perl5/patches/patch-Makefile.SH, yet!
Sevan
From: Sevan Janiyan <sevan@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/48516 (lang/perl5 build under OS X 10.9.1 (Mavericks) fails
when dtrace option is enabled)
Date: Mon, 20 Jun 2016 14:13:48 +0100
With r1.5 of pkgsrc/lang/perl5/patches/patch-Makefile.SH lang/perl5 can
be build with dtrace support on OS X again.
% sudo dtrace -l -c ~/pkg/bin/perl -P perl\*
ID PROVIDER MODULE FUNCTION NAME
9884 perl19255 libperl.dylib Perl_dtrace_probe_load
loaded-file
9885 perl19255 libperl.dylib Perl_dtrace_probe_load
loading-file
9886 perl19255 libperl.dylib Perl_runops_standard
op-entry
9887 perl19255 libperl.dylib Perl_runops_debug
op-entry
9888 perl19255 libperl.dylib S_run_body
op-entry
9889 perl19255 libperl.dylib perl_run
op-entry
9890 perl19255 libperl.dylib S_parse_body
op-entry
9891 perl19255 libperl.dylib perl_parse
op-entry
9892 perl19255 libperl.dylib perl_destruct
op-entry
9893 perl19255 libperl.dylib Perl_dtrace_probe_op
op-entry
9894 perl19255 libperl.dylib Perl_dtrace_probe_phase
phase-change
9895 perl19255 libperl.dylib Perl_pp_require
sub-entry
9896 perl19255 libperl.dylib S_cx_pushsub
sub-entry
9897 perl19255 libperl.dylib S_cx_popsub
sub-entry
9898 perl19255 libperl.dylib Perl_dtrace_probe_call
sub-entry
9899 perl19255 libperl.dylib Perl_dtrace_probe_call
sub-return
State-Changed-From-To: open->closed
State-Changed-By: sevan@NetBSD.org
State-Changed-When: Mon, 20 Jun 2016 13:15:48 +0000
State-Changed-Why:
Issue is now resolved
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.