[PostGIS] #5779: create_upgrade.pl fails for 3.5.0-beta1

PostGIS trac at osgeo.org
Mon Sep 16 22:32:45 PDT 2024


#5779: create_upgrade.pl fails for 3.5.0-beta1
----------------------------+---------------------------
 Reporter:  Bas Couwenberg  |      Owner:  strk
     Type:  defect          |     Status:  new
 Priority:  medium          |  Milestone:  PostGIS 3.5.0
Component:  build           |    Version:  master
 Keywords:                  |
----------------------------+---------------------------
 The Debian package for 3.5.0-beta1 failed to build on some architectures
 due to parallel build issue:
 {{{
 ---- Making all in utils
 make[3]: Entering directory '/build/postgis/utils'
 sed -e '1,/^__END__/d' postgis_restore.pl.in \
         | sort -u \
         > postgis_restore_data.hardcoded
 /usr/bin/make -C ../raster/rt_pg rtpostgis_upgrade.sql
 make[4]: Entering directory '/build/postgis/raster/rt_pg'
 /usr/bin/make -C ../raster/rt_pg uninstall_rtpostgis.sql
 make[4]: Entering directory '/build/postgis/raster/rt_pg'
 /usr/bin/cpp -traditional-cpp -w -P -Upixel -Ubool -I../../postgis/
 rtpostgis.sql.in > rtpostgis.sql.tmp
 grep -v '^#' rtpostgis.sql.tmp | \
 /usr/bin/perl -lpe
 "s'MODULE_PATHNAME'\$libdir/postgis_raster-3'g;s'@extschema@\.''g" >
 rtpostgis.sql
 /usr/bin/cpp -traditional-cpp -w -P -Upixel -Ubool -I../../postgis/
 rtpostgis_upgrade_cleanup.sql.in > rtpostgis_upgrade_cleanup.sql.tmp
 /usr/bin/cpp -traditional-cpp -w -P -Upixel -Ubool -I../../postgis/
 rtpostgis.sql.in > rtpostgis.sql.tmp
 /usr/bin/cpp -traditional-cpp -w -P -Upixel -Ubool -I../../postgis/
 rtpostgis_drop.sql.in > rtpostgis_drop.sql.tmp
 rm -f rtpostgis.sql.tmp
 /usr/bin/perl ../../utils/create_uninstall.pl rtpostgis.sql 170 >
 uninstall_rtpostgis.sql
 grep -v '^#' rtpostgis_upgrade_cleanup.sql.tmp | \
 /usr/bin/perl -lpe
 "s'MODULE_PATHNAME'\$libdir/postgis_raster-3'g;s'@extschema@\.''g" >
 rtpostgis_upgrade_cleanup.sql
 grep -v '^#' rtpostgis.sql.tmp | \
 /usr/bin/perl -lpe
 "s'MODULE_PATHNAME'\$libdir/postgis_raster-3'g;s'@extschema@\.''g" >
 rtpostgis.sql
 make[4]: Leaving directory '/build/postgis/raster/rt_pg'
 grep -v '^#' rtpostgis_drop.sql.tmp | \
 /usr/bin/perl -lpe
 "s'MODULE_PATHNAME'\$libdir/postgis_raster-3'g;s'@extschema@\.''g" >
 rtpostgis_drop.sql
 rm -f rtpostgis_upgrade_cleanup.sql.tmp
 grep: rtpostgis.sql.tmp: No such file or directory
 rm -f rtpostgis.sql.tmp
 rm -f rtpostgis_drop.sql.tmp
 /usr/bin/perl ../../utils/create_upgrade.pl rtpostgis.sql >
 rtpostgis_upgrade.sql.in
 Unable to locate target new version number in rtpostgis.sql
 make[4]: *** [Makefile:156: rtpostgis_upgrade.sql.in] Error 255
 make[4]: *** Deleting file 'rtpostgis_upgrade.sql.in'
 make[4]: Leaving directory '/build/postgis/raster/rt_pg'
 make[3]: *** [Makefile:71: ../raster/rt_pg/rtpostgis_upgrade.sql] Error 2
 make[3]: Leaving directory '/build/postgis/utils'
 make[2]: *** [GNUmakefile:28: all] Error 1
 make[2]: Leaving directory '/build/postgis'
 make[1]: *** [debian/rules:129: override_dh_auto_build] Error 2
 make[1]: Leaving directory '/build/postgis'
 }}}

 The build failed on [https://salsa.debian.org/debian-gis-
 team/postgis/-/jobs/6293145 amd64 CI] (parallel=2),
 [https://buildd.debian.org/status/fetch.php?pkg=postgis&arch=s390x&ver=3.5.0%7Ebeta1%2Bdfsg-1%7Eexp1&stamp=1726545713&raw=0
 s390x buildd] (parallel=2). It did not locally at first with parallel=11
 but did the second time, but again not with parallel=1. This suggests a
 race condition between the Makefile dependencies.

 Chaining the commands to create the SQL file seems to help, but that might
 also just be the race condition:
 {{{
 --- postgis.orig/raster/rt_pg/Makefile.in
 +++ postgis/raster/rt_pg/Makefile.in
 @@ -129,9 +129,9 @@ endif
  #       in the extension/ folder
  #
  %.sql: %.sql.in
 -       $(SQLPP) -I at top_builddir@/postgis/ $< > $@.tmp
 +       $(SQLPP) -I at top_builddir@/postgis/ $< > $@.tmp && \
         grep -v '^#' $@.tmp | \
 -       $(PERL) -lpe
 "s'MODULE_PATHNAME'\$(MODULEPATH)'g;s'@extschema@\.''g" > $@
 +       $(PERL) -lpe
 "s'MODULE_PATHNAME'\$(MODULEPATH)'g;s'@extschema@\.''g" > $@ && \
         rm -f $@.tmp

  ../../liblwgeom/.libs/liblwgeom.a:
 }}}
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5779>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list