bugPSPP - Bugs: bug #59577, make html results in build error...

 
 

bug #59577: make html results in build error on MacOS "sometimes"

Submitter:  Friedrich Beckmann <beckmanf>
Submitted:  Mon 30 Nov 2020 02:20:39 PM UTC
   
 
Category:  Compilation/Portability Severity:  5 - Average
Status:  Fixed Assigned to:  None
Open/Closed:  Closed Release:  None
Effort:  0.00
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 17 Dec 2020 11:34:59 AM UTC, comment #3: 

The MacOS homebrew CI build is now working again:

https://github.com/fredowski/homebrew-pspp/actions

So your fix seems to work. Thanks!

Friedrich Beckmann <beckmanf>
Group Member
Tue 15 Dec 2020 09:37:24 AM UTC, comment #2: 

I checked in a fix which should make this a lot more reliable.

John Darrington <jmd>
Group administrator
Mon 30 Nov 2020 02:32:07 PM UTC, comment #1: 

The immediate problem seems to be the handcrafted html-local target which expects that the doc/pspp.html directory is already there. From the manual

https://www.gnu.org/software/automake/manual/html_node/Extending.html


Note that Automake does not make any distinction between rules with commands and rules that only specify dependencies. So it is not possible to append new dependencies to an automake-defined target without redefining the entire rule.


and


With the -local targets, there is no particular guarantee of execution order; typically, they are run early, but with parallel make, there is no way to be sure of that.





Friedrich Beckmann <beckmanf>
Group Member
Mon 30 Nov 2020 02:20:39 PM UTC, original submission:  

The MacOS homebrew build fails to build due a problem in the Makefile. The doc/pspp.html directory is not produced.


bash-3.2$ make html
Making html in gl
make[2]: Nothing to be done for `html-am'.
Making html in po
utilities/pspp-output convert doc/pspp-figures/aggregate.spv doc/pspp-figures/aggregate.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/autorecode.spv doc/pspp-figures/autorecode.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/chisquare.spv doc/pspp-figures/chisquare.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/compute.spv doc/pspp-figures/compute.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/count.spv doc/pspp-figures/count.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/descriptives.spv doc/pspp-figures/descriptives.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/flip.spv doc/pspp-figures/flip.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/frequencies.spv doc/pspp-figures/frequencies.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/means.spv doc/pspp-figures/means.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/one-sample-t.spv doc/pspp-figures/one-sample-t.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/independent-samples-t.spv doc/pspp-figures/independent-samples-t.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/reliability.spv doc/pspp-figures/reliability.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/select-if.spv doc/pspp-figures/select-if.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/sort-cases.spv doc/pspp-figures/sort-cases.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/split.spv doc/pspp-figures/split.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/temporary.spv doc/pspp-figures/temporary.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/tutorial1.spv doc/pspp-figures/tutorial1.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/tutorial2.spv doc/pspp-figures/tutorial2.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/tutorial3.spv doc/pspp-figures/tutorial3.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/tutorial4.spv doc/pspp-figures/tutorial4.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/tutorial5.spv doc/pspp-figures/tutorial5.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/tutorial6.spv doc/pspp-figures/tutorial6.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/tutorial7.spv doc/pspp-figures/tutorial7.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/weight.spv doc/pspp-figures/weight.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/tutorial2a.spv doc/pspp-figures/tutorial2a.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/tutorial2b.spv doc/pspp-figures/tutorial2b.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/tutorial5a.spv doc/pspp-figures/tutorial5a.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/tutorial5b.spv doc/pspp-figures/tutorial5b.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/tutorial7a.spv doc/pspp-figures/tutorial7a.html -O format=html -O bare=true
utilities/pspp-output convert doc/pspp-figures/tutorial7b.spv doc/pspp-figures/tutorial7b.html -O format=html -O bare=true
rm -rf doc/pspp-dev.htp
for h in doc/pspp.html/*.html; do \
                if grep -Fq '<img src="screenshots/' $h; then continue; fi ; \
                /usr/local/homebrew/Library/Homebrew/shims/mac/super/sed -i -e 's|<img src="\([^"]*\)"|<img src="screenshots/\1"|' $h; \
        done
if /bin/sh /private/tmp/pspp-20201130-11218-n3gtam/pspp-1.5.2-g53a437/build-aux/missing makeinfo --html  --css-ref=pspp-manual.css  -I doc -I ./doc \
         -o doc/pspp-dev.htp `test -f 'doc/pspp-dev.texi' || echo './'`doc/pspp-dev.texi; \
        then \
          rm -rf doc/pspp-dev.html && mv doc/pspp-dev.htp doc/pspp-dev.html; \
        else \
          rm -rf doc/pspp-dev.htp; exit 1; \
        fi
grep: doc/pspp.html/*.html: No such file or directory
sed: doc/pspp.html/*.html: No such file or directory
make[1]: *** [html-local] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [html-recursive] Error 1
bash-3.2$


The second "make html" also fails but produces the doc/pspp.html directory.


bash-3.2$ make html
Making html in gl
make[2]: Nothing to be done for `html-am'.
Making html in po
rm -rf doc/pspp.htp
for h in doc/pspp.html/*.html; do \
                if grep -Fq '<img src="screenshots/' $h; then continue; fi ; \
                /usr/local/homebrew/Library/Homebrew/shims/mac/super/sed -i -e 's|<img src="\([^"]*\)"|<img src="screenshots/\1"|' $h; \
        done
if /bin/sh /private/tmp/pspp-20201130-11218-n3gtam/pspp-1.5.2-g53a437/build-aux/missing makeinfo --html  --css-ref=pspp-manual.css  -I doc -I ./doc \
         -o doc/pspp.htp `test -f 'doc/pspp.texi' || echo './'`doc/pspp.texi; \
        then \
          rm -rf doc/pspp.html && mv doc/pspp.htp doc/pspp.html; \
        else \
          rm -rf doc/pspp.htp; exit 1; \
        fi
grep: doc/pspp.html/*.html: No such file or directory
sed: doc/pspp.html/*.html: No such file or directory
make[1]: *** [html-local] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [html-recursive] Error 1


The third run then works


bash-3.2$ make html
Making html in gl
make[2]: Nothing to be done for `html-am'.
Making html in po
for h in doc/pspp.html/*.html; do \
                if grep -Fq '<img src="screenshots/' $h; then continue; fi ; \
                /usr/local/homebrew/Library/Homebrew/shims/mac/super/sed -i -e 's|<img src="\([^"]*\)"|<img src="screenshots/\1"|' $h; \
        done
bash-3.2$


I had a look at the produced Makefile and I think there is some problem with the pspp.html target. There are two rules which target that directory. One is produced by automake because TEXINFOS is set to doc/pspp.texi. The resulting rule is


doc/pspp.html: doc/pspp.texi $(srcdir)/doc/version.texi $(doc_pspp_TEXINFOS) doc/$(am__dirstamp)
        $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp)
        $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc \
         -o $(@:.html=.htp) `test -f 'doc/pspp.texi' || echo '$(srcdir)/'`doc/pspp.texi; \
        then \
          rm -rf $@ && mv $(@:.html=.htp) $@; \
        else \
          rm -rf $(@:.html=.htp); exit 1; \
        fi


But there is another handcrafted rule:


$(top_builddir)/doc/pspp.html:  $(FIGURE_HTMLS)


which looks to me as if is the same target. Probably this second one was introduced to have the generated figure files as an additional dependency. There is however no following code which says how to produce the pspp.html target. So it is only the dependency. My understanding is the the correct way would be to have the first rule extended by the FIGURE_HTMLS as a dependency while the second rule is removed. However I could not find a way to tell automake about this additional dependency.




Friedrich Beckmann <beckmanf>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jmd (Posted a comment)
  • -email is unavailable- added by beckmanf (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-12-15 jmd StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code