Skip Menu |
Report information
Id: 120120
Status: resolved
Priority: 0/
Queue: perl5

Owner: tonyc <tony [at] develop-help.com>
Requestors: rjbs <rjbs [at] cpan.org>
Cc:
AdminCc:

Operating System: Solaris
PatchStatus: (no value)
Severity: medium
Type: core
Perl Version: 5.19.5
Fixed In: (no value)



CC: rjbs [...] cpan.org
Subject: -Dusedtrace builds on solaris fail to build perldtrace.h on time
Date: Sun, 6 Oct 2013 09:18:55 -0400 (EDT)
To: perlbug [...] perl.org
From: rjbs [...] cpan.org
Download (untitled) / with headers
text/plain 3.1k
This is a bug report for perl from rjbs@cpan.org, generated with the help of perlbug 1.39 running under perl 5.19.5. ----------------------------------------------------------------- [Please describe your issue here] When building -Dusedtrace on Solaris, make fails because perldtrace.h is needed before it is built. If I `make perldtrace.h` by hand, the build will proceed as normal. I'm using Sun CC and gmake. I do not have this problem building on OS X. I will attach the full build details. [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=medium --- Site configuration information for perl 5.19.5: Configured by rjbs at Sun Oct 6 09:08:59 EDT 2013. Summary of my perl5 (revision 5 version 19 subversion 5) configuration: Commit id: d62e4400a62cae85d546fe1f5b0731630b537851 Platform: osname=solaris, osvers=2.10, archname=i86pc-solaris uname='sunos lab 5.10 generic_142910-17 i86pc i386 i86pc ' config_args='-des -Dusedevel -Dusedtrace' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='/opt/SUNWspro/bin/cc', ccflags ='-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV', optimize='-O', cppflags='-I/usr/local/include' ccversion='Sun C 5.9 SunOS_i386 2007/05/03', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='/opt/SUNWspro/bin/cc', ldflags =' -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib -L/lib -L/usr/local/lib ' libpth=/usr/lib /usr/ccs/lib /opt/SUNWspro/prod/lib /lib /usr/local/lib libs=-lsocket -lnsl -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -lc libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-KPIC', lddlflags='-G -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib -L/lib -L/usr/local/lib' --- @INC for perl 5.19.5: lib /usr/local/lib/perl5/site_perl/5.19.5/i86pc-solaris /usr/local/lib/perl5/site_perl/5.19.5 /usr/local/lib/perl5/5.19.5/i86pc-solaris /usr/local/lib/perl5/5.19.5 . --- Environment for perl 5.19.5: HOME=/export/home/rjbs LANG=en_US.UTF-8 LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/export/home/rjbs/bin:/export/home/rjbs/bin:/icg/lib/perl/site_perl/bin:/usr/pkg/lib/perl5/site_perl/bin:/usr/pkg/lib/perl5/bin:/icg/wrapper:/icg/admin/bin:/icg/bin:/icg/sbin:/usr/pkg/bin:/usr/pkg/sbin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/games PERL_AUTOINSTALL=--skipdeps PERL_BADLANG (unset) SHELL=/bin/zsh
RT-Send-CC: perl5-porters [...] perl.org
build attached -- rjbs
Download no-dtrace.txt
text/plain 27.2k

Message body is not shown because it is too large.

RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 535b
I hit this issue as well. One possible fix is to have the dtrace header file generated when makedepend runs, either by patching makedepend or by updating the Makefile to have 'depend' have DTRACE_H as a dependency. I've opted for the latter in the attached patch since it's such a minimal code change and already has the information as to whether dtrace is needed or not. (Another option is to force a 'make hlist', which recurses down into DTRACE_H and generates the header file - make depend does that in some cases, but not all).
Subject: 0001-If-building-with-DTrace-the-dtrace-header-is-require.patch
From 9226c02fe73461709fcbaa8960b6e4467c36a056 Mon Sep 17 00:00:00 2001 From: Peter Martini <PeterCMartini@GMail.com> Date: Thu, 19 Dec 2013 05:21:19 -0500 Subject: [PATCH] If building with DTrace, the dtrace header is required. It's generated and its a dependency, so make depend seems like a natural fit for it. --- Makefile.SH | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.SH b/Makefile.SH index 7b64e71..dccd8da 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -1316,7 +1316,7 @@ done $spitshell >>$Makefile <<'!NO!SUBS!' .PHONY: depend -depend: makedepend +depend: makedepend $(DTRACE_H) sh ./makedepend MAKE=$(MAKE) cflags .PHONY: test check test_prep test_prep_nodll test_prep_pre \ -- 1.8.0.3
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 2.5k
On Thu Dec 19 02:45:35 2013, pcm wrote: Show quoted text
> I hit this issue as well. One possible fix is to have the dtrace > header file generated when makedepend runs, either by patching > makedepend or by updating the Makefile to have 'depend' have DTRACE_H > as a dependency. I've opted for the latter in the attached patch > since it's such a minimal code change and already has the information > as to whether dtrace is needed or not. > > (Another option is to force a 'make hlist', which recurses down into > DTRACE_H and generates the header file - make depend does that in some > cases, but not all).
I also met this problem on Solaris 10 sparc when building perl 5.18.2 (the latest stable at the time of writing). The easiest workaround I found was to run "make perldtrace.h" before the regular make run: perl@perl10s [perl10s]:~/newperl/perl-5.18.2 > make clean perl@perl10s [perl10s]:~/newperl/perl-5.18.2 > echo $PATH /export/home/perl/perl5/bin:/usr/bin:/usr/sbin:/sbin:/usr/ccs/bin:/usr/dt/bin:/usr/openwin/bin:/opt/SUNWspro/bin:/opt/bop/bin:/opt/csw/bin:/usr/sfw/bin:/usr/sfw/sbin:/opt/SUNWspro/bin perl@perl10s [perl10s]:~/newperl/perl-5.18.2 > ./Configure -ders -Dusedtrace First let's make sure your kit is complete. Checking... [...] perl@perl10s [perl10s]:~/newperl/perl-5.18.2 > make make: Warning: Both `makefile' and `Makefile' exist `sh cflags "optimize='-O'" perlmini.o` -fPIC -DPERL_IS_MINIPERL -DPERL_EXTERNAL_GLOB perlmini.c CCCMD = /usr/sfw/bin/gcc -DPERL_CORE -c -D_REENTRANT -mcpu=v9 -m64 -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -O -Wall -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wwrite-strings In file included from cop.h:381, from perl.h:3481, from perl.c:33: mydtrace.h:14:26: perldtrace.h: No such file or directory perl.c: In function `perl_destruct': perl.c:557: warning: implicit declaration of function `PERL_PHASE_CHANGE_ENABLED' perl.c:557: warning: implicit declaration of function `PERL_PHASE_CHANGE' *** Error code 1 make: Fatal error: Command failed for target `perlmini.o' perl@perl10s [perl10s]:~/newperl/perl-5.18.2 > make perldtrace.h make: Warning: Both `makefile' and `Makefile' exist /usr/sbin/dtrace -h -s perldtrace.d -o perldtrace.h.in sed -e '/const/!s/char \*/const char */g' perldtrace.h.in >perldtrace.h rm -f perldtrace.h.in perl@perl10s [perl10s]:~/newperl/perl-5.18.2 > make [...] perl@perl10s [perl10s]:~/newperl/perl-5.18.2 > make test [...] All tests successful. u=55.53 s=49.03 cu=4986.42 cs=780.16 scripts=2322 tests=685390
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 2.5k
On Sun Oct 06 06:19:24 2013, rjbs wrote: Show quoted text
> When building -Dusedtrace on Solaris, make fails because perldtrace.h > is needed > before it is built. If I `make perldtrace.h` by hand, the build will > proceed > as normal. I'm using Sun CC and gmake.
I'm not sure why this is happening. makedepend should be adding a dependency for mydtrace.h, which has an explicit dependency on $(DTRACE_H). When I build on Solaris with either the system make or gmake perldtrace.h is built before it attempts to build the object file: tony@nereid:~/dev/perl/git/perl$ make perlmini.o make: Warning: Both `makefile' and `Makefile' exist /usr/sbin/dtrace -h -s perldtrace.d -o perldtrace.h.in sed -e '/const/!s/char \*/const char */g' perldtrace.h.in >perldtrace.h rm -f perldtrace.h.in echo @`sh cflags "optimize='-O'" perlmini.o` -DPERL_IS_MINIPERL -DPERL_EXTERNAL_GLOB perlmini.c @cc -c -DPERL_CORE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -O -DPERL_IS_MINIPERL -DPERL_EXTERNAL_GLOB perlmini.c tony@nereid:~/dev/perl/git/perl$ uname -a SunOS nereid 5.11 11.1 i86pc i386 i86pc If I enable dependency tracing with -d, the trace shows make building perldtrace.h when it's about to check mydtrace.h: tony@nereid:~/dev/perl/git/perl$ make -d perlmini.o MAKEFLAGS value: make: Warning: Both `makefile' and `Makefile' exist Building perlmini.o because it is out of date relative to perlmini.c Building perlmini.o because it is out of date relative to /usr/include/arpa/inet.h ... Building perlmini.o because it is out of date relative to mg_vtable.h Building perldtrace.h because it is out of date relative to perldtrace.d /usr/sbin/dtrace -h -s perldtrace.d -o perldtrace.h.in sed -e '/const/!s/char \*/const char */g' perldtrace.h.in >perldtrace.h rm -f perldtrace.h.in Building mydtrace.h because it is out of date relative to perldtrace.h Building perlmini.o because it is out of date relative to mydtrace.h Building perlmini.o because it is out of date relative to op.h ... Building perlmini.o because it is out of date relative to cflags Building perlmini.o using suffix rule for .c.o because it is out of date relative to perlmini.c echo @`sh cflags "optimize='-O'" perlmini.o` -DPERL_IS_MINIPERL -DPERL_EXTERNAL_GLOB perlmini.c @cc -c -DPERL_CORE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -O -DPERL_IS_MINIPERL -DPERL_EXTERNAL_GLOB perlmini.c I'm include to add this, but I wonder why this isn't building on your system. Another difference from rjbs's output, I don't see the "Label too long" warnings from sed. Tony
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 772b
Hi Tony, Show quoted text
> tony@nereid:~/dev/perl/git/perl$ uname -a > SunOS nereid 5.11 11.1 i86pc i386 i86pc
I made some time to investigate further. The problem does not happen on Solaris 11. All our builds (OpenCSW) are done on Solaris 10 (the biggest Solaris install base). (Packages built on Solaris 10 are compatible with Solaris 11 and not the way around.) That's why you can't reproduce the problem on your machine. Show quoted text
> Another difference from rjbs's output, I don't see the "Label too > long" warnings from sed.
I think we can safely ignore this. I think rjbs is using Solaris sed and I'm using gnu's one (from OpenCSW). I'm preparing a mail to p5p about this and the second Solaris build problem (specific for gcc amd64, a 1 line patch) hopefully in time for 5.20. Claudio
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 379b
Hi, been hitting this problem as well on a few illumos systems... The second part of the attached patchset seems to work around the dependency problem okay... Indirect dependencies doesn't really seem to be handled in makedepend.SH so I simply tried "forcing" the issue during 'clist' in order to keep existing 'hlist' logic (which, for this case, could probably be revisited).
Subject: patch-Makefile.SH
Download patch-Makefile.SH
application/octet-stream 937b

Message body not shown because it is not plain text.

RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 593b
On Wed Jun 04 08:29:40 2014, richard@netbsd.org wrote: Show quoted text
> Hi, been hitting this problem as well on a few illumos systems... > > The second part of the attached patchset seems to work around the > dependency problem okay... > > Indirect dependencies doesn't really seem to be handled in > makedepend.SH so I simply tried "forcing" the issue during 'clist' in > order to keep existing 'hlist' logic (which, for this case, could > probably be revisited).
What fails without the first part of the patch? I was planning on applying Peter's patch which is the dependency part of your patch. Tony
RT-Send-CC: perl5-porters [...] perl.org, richard [...] netbsd.org
Download (untitled) / with headers
text/plain 822b
On Sun Jun 22 18:43:53 2014, tonyc wrote: Show quoted text
> On Wed Jun 04 08:29:40 2014, richard@netbsd.org wrote:
> > Hi, been hitting this problem as well on a few illumos systems... > > > > The second part of the attached patchset seems to work around the > > dependency problem okay... > > > > Indirect dependencies doesn't really seem to be handled in > > makedepend.SH so I simply tried "forcing" the issue during 'clist' in > > order to keep existing 'hlist' logic (which, for this case, could > > probably be revisited).
> > What fails without the first part of the patch? > > I was planning on applying Peter's patch which is the dependency part > of your patch.
I've applied Peter's patch as 5afb921fc1886c21e5630bc8c71449439c6136c7. I'll close this ticket in a week, unless I see a reply about the rest of your patch. Tony
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 977b
On Tue Jul 01 16:33:06 2014, tonyc wrote: Show quoted text
> On Sun Jun 22 18:43:53 2014, tonyc wrote:
> > On Wed Jun 04 08:29:40 2014, richard@netbsd.org wrote:
> > > Hi, been hitting this problem as well on a few illumos systems... > > > > > > The second part of the attached patchset seems to work around the > > > dependency problem okay... > > > > > > Indirect dependencies doesn't really seem to be handled in > > > makedepend.SH so I simply tried "forcing" the issue during 'clist' > > > in > > > order to keep existing 'hlist' logic (which, for this case, could > > > probably be revisited).
> > > > What fails without the first part of the patch? > > > > I was planning on applying Peter's patch which is the dependency part > > of your patch.
> > I've applied Peter's patch as > 5afb921fc1886c21e5630bc8c71449439c6136c7. > > I'll close this ticket in a week, unless I see a reply about the rest > of your patch.
Closing, please open a new ticket if you have an updated patch. Tony


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org