Re: [crossfire] Building crossfire 1.71.0 server fails without arches
On 04/13/14 08:36 AM, Kevin Zheng wrote: Hi Kari, On 04/13/2014 05:14, Kari Pahula wrote: Crossfire 1.71.0 server is unbuildable without the arch directory. Here's what happens in lib/ directory (from make -d's output): In short, install-data-local requires smooth, which requires .collect-stamp, which gets created with touch. Then smooth's rule decides that smooth needs to be regenerated since .collect-stamp is fresher than smooth, making the build fail since there's no arch directory. Thanks for going through all the trouble to figure out what's wrong. It is indeed a missing dependency-tracking file ('lib/.collect-stamp') in the distfile. I must have missed it when creating the tarballs. In theory, make dist should collect everything that is necessary (that said, all too often things tend to fall through cracks which are discovered at release time). This would work if there was a lib/.collect-stamp with a correct timestamp included with the server package, but there isn't. I could suggest that it wouldn't be a dot file since it wouldn't get waylaid so easily then. But this part would, IMHO, work even better without using a stamp file at all. The collect.pl script generates a fairly limited set of files and you had listed them already in the Makefile.am file itself. I'm not sure how make -jn friendly the current code is, either. The current archetype collection process is hackish and fails when running with multiple build jobs. I was thinking that the collection process should be moved out of the server build process altogether. It is part of the build process because it is needed for the server to run. However, I'm not quite sure why we never did something like this in the Makefile: if [[ ! -e arch ]]; then echo "No arch directory found - skipping collection" else fi I suspect there is probably some makefile magic that could be done to fix the 'gmake -j4' type issue - something to say that that single command is used to generate this file, so don't run multiple versions at same time. Or perhaps at least for the lib directory, something that just explicitly disables parallelism, since nothing is really built in that directory. All that said, the collect logic isn't great - it doesn't have any way to know if the files in the arch directory have changed, so in that case, the server admin has to know to run an 'make collect' by hand if they know the files have change. There is also some different situation here from SVN vs releases - in SVN, there is no precollected files, so by definition, a collection will be needed - which is not the case for official releases. I ran into this while packaging 1.71.0 for Debian. I worked around it by calling touch -t 197001010101 lib/.collect-stamp before building the server. This workaround also works for packaging on FreeBSD. Do you think I should roll a new tarball with '.collect-stamp' included? I don't think it is worth the effort - I'd perhaps just put out a notice like 'the lib/.collect-stamp file is missing. Before compiling this release, do a 'touch -t 201401010101 lib/.collect-stamp' and all will be good. That is such a simple workaround that it shouldn't be any problem. For anyone making official binary releases, this won't be a problem in the release - just the packager will have to know this step. ___ crossfire mailing list crossfire@metalforge.org http://mailman.metalforge.org/mailman/listinfo/crossfire
Re: [crossfire] Building crossfire 1.71.0 server fails without arches
Hi Kari, On 04/13/2014 05:14, Kari Pahula wrote: > Crossfire 1.71.0 server is unbuildable without the arch directory. > Here's what happens in lib/ directory (from make -d's output): > > In short, install-data-local requires smooth, which requires > .collect-stamp, which gets created with touch. Then smooth's rule > decides that smooth needs to be regenerated since .collect-stamp is > fresher than smooth, making the build fail since there's no arch > directory. Thanks for going through all the trouble to figure out what's wrong. It is indeed a missing dependency-tracking file ('lib/.collect-stamp') in the distfile. I must have missed it when creating the tarballs. > This would work if there was a lib/.collect-stamp with a correct > timestamp included with the server package, but there isn't. I could > suggest that it wouldn't be a dot file since it wouldn't get waylaid > so easily then. But this part would, IMHO, work even better without > using a stamp file at all. The collect.pl script generates a fairly > limited set of files and you had listed them already in the > Makefile.am file itself. I'm not sure how make -jn friendly the > current code is, either. The current archetype collection process is hackish and fails when running with multiple build jobs. I was thinking that the collection process should be moved out of the server build process altogether. > I ran into this while packaging 1.71.0 for Debian. I worked around it > by calling touch -t 197001010101 lib/.collect-stamp before building > the server. This workaround also works for packaging on FreeBSD. Do you think I should roll a new tarball with '.collect-stamp' included? Thanks, Kevin Zheng ___ crossfire mailing list crossfire@metalforge.org http://mailman.metalforge.org/mailman/listinfo/crossfire
[crossfire] Building crossfire 1.71.0 server fails without arches
Hi. Crossfire 1.71.0 server is unbuildable without the arch directory. Here's what happens in lib/ directory (from make -d's output): Considering target file `smooth'. Considering target file `.collect-stamp'. File `.collect-stamp' does not exist. Finished prerequisites of target file `.collect-stamp'. Must remake target `.collect-stamp'. touch .collect-stamp Putting child 0x01251550 (.collect-stamp) PID 15874 on the chain. Live child 0x01251550 (.collect-stamp) PID 15874 Reaping winning child 0x01251550 PID 15874 Removing child 0x01251550 PID 15874 from chain. Successfully remade target file `.collect-stamp'. Finished prerequisites of target file `smooth'. Prerequisite `.collect-stamp' is newer than target `smooth'. Must remake target `smooth'. touch .collect-stamp Putting child 0x012744c0 (smooth) PID 15875 on the chain. Live child 0x012744c0 (smooth) PID 15875 Reaping winning child 0x012744c0 PID 15875 make collect ... Considering target file `collect'. File `collect' does not exist. Finished prerequisites of target file `collect'. Must remake target `collect'. make[1]: Entering directory `/home/kaol/deb/crossfire/crossfire-1.71.0/lib' /usr/bin/perl -I. collect.pl ./arch Putting child 0x013c6600 (collect) PID 15877 on the chain. Live child 0x013c6600 (collect) PID 15877 collect.pl: looking ... couldn't open ./arch at collect.pl line 500. Reaping losing child 0x013c6600 PID 15877 make[1]: *** [collect] Error 2 Here's the relevant rules from lib/Makefile.am: .collect-stamp: touch .collect-stamp collect: $(PERL) -I$(srcdir) collect.pl $(builddir)/arch $(PERL) $(srcdir)/adm/collect_images.pl -src $(srcdir) -png archetypes faces animations bmaps.paths smooth: .collect-stamp touch .collect-stamp $(MAKE) collect install-data-local: archetypes crossfire.0 faces animations smooth collect.pl util.pl In short, install-data-local requires smooth, which requires .collect-stamp, which gets created with touch. Then smooth's rule decides that smooth needs to be regenerated since .collect-stamp is fresher than smooth, making the build fail since there's no arch directory. This would work if there was a lib/.collect-stamp with a correct timestamp included with the server package, but there isn't. I could suggest that it wouldn't be a dot file since it wouldn't get waylaid so easily then. But this part would, IMHO, work even better without using a stamp file at all. The collect.pl script generates a fairly limited set of files and you had listed them already in the Makefile.am file itself. I'm not sure how make -jn friendly the current code is, either. I ran into this while packaging 1.71.0 for Debian. I worked around it by calling touch -t 197001010101 lib/.collect-stamp before building the server. ___ crossfire mailing list crossfire@metalforge.org http://mailman.metalforge.org/mailman/listinfo/crossfire