develooper Front page | perl.perl5.porters | Postings from June 2019

[perl #134218] dtrace build of perl-5.30.0 uses undefined $(ECHO)

Thread Previous | Thread Next
From:
James E Keenan via RT
Date:
June 21, 2019 20:36
Subject:
[perl #134218] dtrace build of perl-5.30.0 uses undefined $(ECHO)
Message ID:
rt-4.0.24-28244-1561149393-1214.134218-15-0@perl.org
On Fri, 21 Jun 2019 19:55:57 GMT, enchanter wrote:
> 
> This is a bug report for perl from tim.mooney@ndsu.edu,
> generated with the help of perlbug 1.40 running under perl 5.22.4.
> 
> 
> -----------------------------------------------------------------
> [Please describe your issue here]
> 
> Hi!
> 
> I'm using perlbug from 5.22.4, but I'm attempting to build perl 5.30.0
> on OpenIndiana, one of the Illumos (formerly OpenSolaris)
> distributions.
> 
> The build fails in the dtrace Makefile logic (which was improved at
> 5.26.2),
> with the following output:
> 
> ----
> 
> LD_LIBRARY_PATH=/export/home/mooney/oi-userland/components/perl/perl-
> 530/build/amd64 ./miniperl -Ilib -MExtUtils::Miniperl -e
> 'writemain(\"perlmain.c", @ARGV)' DynaLoader
> /usr/gcc/6/bin/gcc -m64 -c -DPERL_CORE -D_REENTRANT -m64 -fwrapv -fno-
> strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE64_SOURCE
> -D_FORTIFY_SOURCE=2 -DPERL_USE_SAFE_PUTENV -O -Wall
> -Werror=declaration-after-statement -Werror=pointer-arith -Wextra
> -Wc++-compat -Wwrite-strings -fPIC perlmain.c
> rm -rf maindtrace
> mkdir maindtrace
> cp perlmain.o maindtrace/
> /usr/sbin/dtrace -xnolibs -G -s perldtrace.d -o dtrace_main.o
> maindtrace/perlmain.o ||        \
>  (  "No probes in perlmain.o, generating a dummy dtrace_main.o    " &&
> \
> > dtrace_main.c &&                                \
> `sh  cflags "optimize='-O'" dtrace_main.o` -fPIC dtrace_main.c &&
> \
>  rm -f dtrace_main.c )
> dtrace: failed to link script perldtrace.d: No probe sites found for
> declared provider
> /bin/sh[2]: No probes in perlmain.o, generating a dummy dtrace_main.o
> : not found [No such file or directory]
> make[1]: *** [makefile:368: dtrace_main.o] Error 127
> 
> 
> ----
> 
> If you examine that output closely, you'll see that there's no echo or
> printf before the "No probes in perlmain.o..." string.
> 
> Tracing this back to the "Makefile", it's coming from this section of
> code in the generated Makefile:
> 
> 
> ----
> 
> $(DTRACE_MAIN_O): perldtrace.d perlmain$(OBJ_EXT)
>         -rm -rf maindtrace
>         mkdir maindtrace
>         cp perlmain$(OBJ_EXT) maindtrace/
>         $(DTRACE) -G -s perldtrace.d -o $(DTRACE_MAIN_O)
> $(perlmain_dtrace_objs) ||           \
>           ( $(ECHO) "No probes in perlmain$(OBJ_EXT), generating a
> dummy $(DTRACE_MAIN_O)" && \
>             $(ECHO) >dtrace_main.c &&
> \
>             `$(CCCMD)` $(PLDLFLAGS) dtrace_main.c &&
> \
>              rm -f dtrace_main.c )
> 
> ----
> 
> As you can see, the Makefile has $(ECHO) in a couple of places, but
> it's
> not actually defined anywhere in the generated Makefile, so it's
> coming
> up empty when the Makefile is run, and triggering the issue.
> 
> The fix is straightforward.  In Makefile.SH, in the section where
> other
> settings like CC, LD, CPS, RMS, etc. are set, we just need a
> 
> ECHO = $echo
> 
> $echo *is* being set by Configure and added to config.sh, it's just
> that
> Makefile.SH and hence Makefile are using $(ECHO) in one and only one
> place: the dtrace probes.
> 
> If you agree this is the right fix, I can submit the trivial patch to
> fix it.
> 
> Thanks,
> 
> Tim
> 
> 

[previous post was incomplete]

I don't have any Solaris available -- we could really use some smoke-testers on those systems -- but I do have FreeBSD with dtrace.

#####
[p5p] $ dtrace -V
dtrace: Sun D 1.13
[p5p] $ uname -mrs
FreeBSD 11.2-STABLE amd64
#####

I configured on this machine at 3 different commits:

#####
tag v5.24.3
tag v5.26.2
HEAD 1f51249e1fcbfdb429b29a9af9165da7f187cd51
#####

In each case I configured as follows:

#####
sh ./Configure -des -Dusedevel -Duseithreads -Dusedtrace
#####

Only in the case of 5.24.3 did 'make' fail to complete.  I got the following line in the 'make' output for each:

#####
dtrace: failed to link script perldtrace.d: No probe sites found for declared provider
#####

Could the problem be not just in -Dusedtrace but in the interaction between that switch and the others you might have used?  Can you try configuring (5.30.0 or HEAD) with just '-des -Dusedevel -Duseithreads -Dusedtrace'?

-- 
James E Keenan (jkeenan@cpan.org)

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

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About