[R-pkg-team] Bug#1103228: r-cran-sdmtools: FTBFS: pointinpolygon.c:11:20: error: 'PI' undeclared here (not in a function)

Santiago Vila sanvila at debian.org
Tue Apr 15 02:22:26 BST 2025


Package: src:r-cran-sdmtools
Version: 1.1-221.2-1
Severity: serious
Tags: ftbfs trixie sid

Dear maintainer:

During a rebuild of all packages in unstable, your package failed to build:

--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean --buildsystem R
   dh_auto_clean -O--buildsystem=R
   dh_autoreconf_clean -O--buildsystem=R
   dh_clean -O--buildsystem=R
 debian/rules binary
dh binary --buildsystem R
   dh_update_autotools_config -O--buildsystem=R
   dh_autoreconf -O--buildsystem=R
   dh_auto_configure -O--buildsystem=R
   dh_auto_build -O--buildsystem=R
   dh_auto_test -O--buildsystem=R
   create-stamp debian/debhelper-build-stamp
   dh_testroot -O--buildsystem=R
   dh_prep -O--buildsystem=R
   dh_auto_install --destdir=debian/r-cran-sdmtools/ -O--buildsystem=R
I: R Package: SDMTools Version: 1.1-221.2
I: Building using R version 4.5.0-1
I: R API version: r-api-4.0
I: Using built-time from d/changelog: Wed, 04 Dec 2019 14:36:56 +0100
	mkdir -p /<<PKGBUILDDIR>>/debian/r-cran-sdmtools/usr/lib/R/site-library
	R CMD INSTALL -l /<<PKGBUILDDIR>>/debian/r-cran-sdmtools/usr/lib/R/site-library --clean . "--built-timestamp='Wed, 04 Dec 2019 14:36:56 +0100'"
* installing *source* package ‘SDMTools’ ...
** this is package ‘SDMTools’ version ‘1.1-221.2’
** package ‘SDMTools’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C compiler: ‘gcc (Debian 14.2.0-19) 14.2.0’
make[1]: Entering directory '/<<PKGBUILDDIR>>/src'
gcc -std=gnu23 -I"/usr/share/R/include" -DNDEBUG       -fpic  -g -O2 -ffile-prefix-map=/<<BUILDDIR>>/r-base-4.5.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2  -c ConnectedComponentLabelling.c -o ConnectedComponentLabelling.o
gcc -std=gnu23 -I"/usr/share/R/include" -DNDEBUG       -fpic  -g -O2 -ffile-prefix-map=/<<BUILDDIR>>/r-base-4.5.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2  -c getmin.c -o getmin.o
gcc -std=gnu23 -I"/usr/share/R/include" -DNDEBUG       -fpic  -g -O2 -ffile-prefix-map=/<<BUILDDIR>>/r-base-4.5.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2  -c movewindow.c -o movewindow.o
gcc -std=gnu23 -I"/usr/share/R/include" -DNDEBUG       -fpic  -g -O2 -ffile-prefix-map=/<<BUILDDIR>>/r-base-4.5.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2  -c patchstats.c -o patchstats.o
gcc -std=gnu23 -I"/usr/share/R/include" -DNDEBUG       -fpic  -g -O2 -ffile-prefix-map=/<<BUILDDIR>>/r-base-4.5.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2  -c pointinpolygon.c -o pointinpolygon.o
pointinpolygon.c:11:20: error: ‘PI’ undeclared here (not in a function)
   11 | double TWOPI = 2 * PI;
      |                    ^~
make[1]: *** [/usr/lib/R/etc/Makeconf:202: pointinpolygon.o] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>/src'
make[1]: Entering directory '/<<PKGBUILDDIR>>/src'
make[1]: Leaving directory '/<<PKGBUILDDIR>>/src'
ERROR: compilation failed for package ‘SDMTools’
* removing ‘/<<PKGBUILDDIR>>/debian/r-cran-sdmtools/usr/lib/R/site-library/SDMTools’
dh_auto_install: error: R CMD INSTALL -l /<<PKGBUILDDIR>>/debian/r-cran-sdmtools/usr/lib/R/site-library --clean . "--built-timestamp='Wed, 04 Dec 2019 14:36:56 +0100'" returned exit code 1
make: *** [debian/rules:4: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------

The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here:

https://people.debian.org/~sanvila/build-logs/202504/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you could not reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:r-cran-sdmtools, so that this is still
visible in the BTS web page for this package.

Thanks.



More information about the R-pkg-team mailing list