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

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

Thread Previous
From:
Tim.Mooney@ndsu.edu
Date:
June 21, 2019 19:56
Subject:
[perl #134218] dtrace build of perl-5.30.0 uses undefined $(ECHO)
Message ID:
rt-4.0.24-27754-1561146957-1863.134218-75-0@perl.org
# New Ticket Created by  Tim.Mooney@ndsu.edu 
# Please include the string:  [perl #134218]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=134218 >



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




[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=install
    severity=medium
---
Site configuration information for perl 5.22.4:

Configured by perl-bugs at Thu May 24 21:32:52 UTC 2018.

Summary of my perl5 (revision 5 version 22 subversion 4) configuration:
   
  Platform:
    osname=solaris, osvers=2.11, archname=i86pc-solaris-64int
    uname='sunos hipster.openindiana.org 5.11 illumos-017c366d7c i86pc i386 i86pc '
    config_args='-de -Dmksymlinks -Ulocincpth= -Uloclibpth= -Dbin=/usr/perl5/5.22/bin -Dcc=/usr/gcc/6/bin/gcc -m32 -Dccflags=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Dcf_email=oi-dev@openindiana.org -Dcf_by=perl-bugs -Dlibperl=libperl.so -Dmyhostname=localhost -Dprefix=/usr/perl5/5.22 -Dprivlib=/usr/perl5/5.22/lib -Dsitelib=/usr/perl5/site_perl/5.22 -Dsiteprefix=/usr/perl5/5.22 -Dvendorlib=/usr/perl5/vendor_perl/5.22 -Dvendorprefix=/usr/perl5/5.22 -Duse64bitint -Duseshrplib -Dusedtrace -Uuselargefiles'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    use64bitint=define, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='/usr/gcc/6/bin/gcc -m32', ccflags ='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPTR_IS_LONG -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -DPERL_USE_SAFE_PUTENV',
    optimize='-O',
    cppflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPTR_IS_LONG -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong'
    ccversion='', gccversion='6.4.0', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678, doublekind=3
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12, longdblkind=3
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='/usr/gcc/6/bin/gcc -m32', ldflags =' -fstack-protector-strong'
    libpth=/usr/gcc/6/lib /usr/lib /usr/ccs/lib
    libs=-lpthread -lsocket -lnsl -lgdbm -ldb -ldl -lm -lc
    perllibs=-lpthread -lsocket -lnsl -ldl -lm -lc
    libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -R /usr/perl5/5.22/lib/i86pc-solaris-64int/CORE'
    cccdlflags='-fPIC -DPIC', lddlflags='-shared -fstack-protector -fstack-protector-strong'


---
@INC for perl 5.22.4:
    /usr/perl5/site_perl/5.22/i86pc-solaris-64int
    /usr/perl5/site_perl/5.22
    /usr/perl5/vendor_perl/5.22/i86pc-solaris-64int
    /usr/perl5/vendor_perl/5.22
    /usr/perl5/5.22/lib/i86pc-solaris-64int
    /usr/perl5/5.22/lib

---
Environment for perl 5.22.4:
    HOME=/export/home/mooney
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/java/bin:/opt/SUNWspro/bin:/usr/bin/amd64:/usr/bin:/usr/ccs/bin:/usr/sbin:/sbin:/usr/sadm/bin:/usr/gnu/bin:/usr/perl5/bin:/usr/games:/export/home/mooney/bin:/usr/X11/bin:/usr/openwin/bin:/usr/dt/bin:.
    PERL_BADLANG (unset)
    SHELL=/bin/bash


Thread Previous


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