Bug#900591: FTBFS against R 3.5: The C compiler identification is unknown
On Sat, Jun 02, 2018 at 11:58:21AM +0300, Juhani Numminen wrote: > On Fri, 1 Jun 2018 21:12:06 +0200 Sébastien Villemot > wrote: > > Package: src:rkward > > Severity: serious > For a build log of the failure, see the link "rbuild (41KB)" at [1]. > > It seems that the cmake invocation is causing trouble. Consider these forms: > > 1) CC='gcc -std=c99' cmake ... > 2) CC='gcc -std=c99' cmake -DCMAKE_C_COMPILER='gcc -std=c99' ... If you look around passing spaces in CC to cmake, you'll quickly see that this generally doesn't work well. Yes, there is a hack that can separate one argument from the path, but that is more of an implementation detail as far as I understand it. Thus I believe that this usage is expectably prone to breakage. Not supporting spaces in CC seems reasonable to me. > The first one is okay and CMake handles the extra -std=c99 argument properly, > but > the second one causes "-- The C compiler identification is unknown". > This behavior is expected as CMAKE_C_COMPILER should be a full path.[6] > > Debhelper[2] uses the second form when CC is set, as is done in rkward[3]. > The change was introduced in [4], to fix #897083[5]. > (Helmut Cc'd to notify of this unexpected breakage.) Yes, the attribution to this debhelper bug is correct. The proper way to pass -std=c99 would be CMAKE_C_FLAGS as far as I can tell. > On the other hand, maybe debian/rules of rkward needs to be changed. The > comment > at [3] states that setting CC is required for "some installations of R", but > is > it required in the Debian package specifically? > > In this case, 'gcc -std=c99' comes from "/usr/bin/R CMD config CC". > I am also wondering why R should impose -std=c99. There exist many other > possible > values for -std.[7] Stuffing flags - and in particular -std=c99 - into CC looks wrong to me. Maybe reassigning to R is the way to go. Also note that using plain "gcc" here breaks cross compilation. R should certainly return a triplet-prefixed CC like python does. Most debhelper changes break some package. This one is no different. The number of affected packages seems low to me and the feature being broken was known to be fragile. I think it is reasonable to keep the new debhelper behaviour. Helmut
Bug#900591: FTBFS against R 3.5: The C compiler identification is unknown
On Sat, 2 Jun 2018 11:58:21 +0300 Juhani Numminen wrote: > On the other hand, maybe debian/rules of rkward needs to be changed. > The comment at [3] states that setting CC is required for "some > installations of R", but is it required in the Debian package > specifically? In fact, my approach to fixing this is to remove the specification of CC (and CXX, F77) form R CMD config. This was added, historically, in 2007, when R was forcing GCC 4.2, while GCC 4.1 was still the default, and Ubuntu did not even have GCC 4.1. Since there was some incompatibility between 4.2 and 4.1 (fortran, I believe), linking would fail unless using the same version. Handling this in rules, instead of dependencies was the only way to allow building for debian and ubuntu from the same source, then. It should not be needed, today. A fixed package is on mentors. I cannot upload myself. Lisandro has sponsored the last couple of uploads, and I've contacted him, this morning. (Note that technically, this is also a new upstream release, but the single upstream change is a hotfix to ensure proper installation of translations). Regards Thomas pgp2F5K5zIC30.pgp Description: OpenPGP digital signature
Bug#900591: FTBFS against R 3.5: The C compiler identification is unknown
On Fri, 1 Jun 2018 21:12:06 +0200 Sébastien Villemot wrote: > Package: src:rkward > Version: 0.7.0-1 > Severity: serious > Control: block 896667 by -1 > > Dear Maintainer, > > The R 3.5 transition has just started (see #896667), and consequently the > rebuild of rkward has been triggered. > > But the rebuild failed, apparently because the C compiler is not properly > detected (I did not investigate whether this error is actually related to R > 3.5 > or is due to some other unrelated change): For a build log of the failure, see the link "rbuild (41KB)" at [1]. It seems that the cmake invocation is causing trouble. Consider these forms: 1) CC='gcc -std=c99' cmake ... 2) CC='gcc -std=c99' cmake -DCMAKE_C_COMPILER='gcc -std=c99' ... The first one is okay and CMake handles the extra -std=c99 argument properly, but the second one causes "-- The C compiler identification is unknown". This behavior is expected as CMAKE_C_COMPILER should be a full path.[6] Debhelper[2] uses the second form when CC is set, as is done in rkward[3]. The change was introduced in [4], to fix #897083[5]. (Helmut Cc'd to notify of this unexpected breakage.) On the other hand, maybe debian/rules of rkward needs to be changed. The comment at [3] states that setting CC is required for "some installations of R", but is it required in the Debian package specifically? In this case, 'gcc -std=c99' comes from "/usr/bin/R CMD config CC". I am also wondering why R should impose -std=c99. There exist many other possible values for -std.[7] Cheers, Juhani [1] https://tests.reproducible-buildds.org/debian/rb-pkg/unstable/armhf/rkward.html [2] https://sources.debian.org/src/debhelper/11.3.2/lib/Debian/Debhelper/Buildsystem/cmake.pm/#L90 [3] https://sources.debian.org/src/rkward/0.7.0-1/debian/rules/#L25 [4] https://salsa.debian.org/debian/debhelper/commit/a5eb0dc3c3a16d12c7a26ac42b93a35b931188d3 [5] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897083 [6] https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER.html [7] https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html
Bug#900591: FTBFS against R 3.5: The C compiler identification is unknown
Package: src:rkward Version: 0.7.0-1 Severity: serious Control: block 896667 by -1 Dear Maintainer, The R 3.5 transition has just started (see #896667), and consequently the rebuild of rkward has been triggered. But the rebuild failed, apparently because the C compiler is not properly detected (I did not investigate whether this error is actually related to R 3.5 or is due to some other unrelated change): https://buildd.debian.org/status/fetch.php?pkg=rkward=amd64=0.7.0-1=1523909885=0 Best, -- ⢀⣴⠾⠻⢶⣦⠀ Sébastien Villemot ⣾⠁⢠⠒⠀⣿⡁ Debian Developer ⢿⡄⠘⠷⠚⠋⠀ http://sebastien.villemot.name ⠈⠳⣄ http://www.debian.org signature.asc Description: PGP signature