Guillem Jover wrote on Mon, 21 Aug 2017 01:34 +0200: > Hi! > Good morning!
> On Sun, 2017-08-20 at 03:21:59 +0000, Daniel Shahaf wrote: > > Guillem Jover wrote on Sun, Apr 09, 2017 at 03:24:55 +0200: > > > On Tue, 2017-02-28 at 15:23:49 +0000, CONSUEGRA Lenny - externe wrote: > > > > When building a package with dpkg-source, warnings are printed if gcc is > > > > not installed on the system : > > > > > > > > root@build:/srv/build/tmp/test# dpkg-source -b ublock-origin-1.9.4+dfsg > > > > sh: 1: gcc: not found > > > > dpkg-source: warning: Couldn't determine gcc system type, falling back > > > > to default (native compilation) > > > > > > I've analyzed the code, and it does indeed not really require the host > > > architecture when building a source package, so I've got a couple of > > > commits that get rid of those messages. > > > > > > The first disables the perl warnings for when the program is not found > > > (the equivalent of first line for 1.18.x, but w/o going via the shell), > > > and the second removes the need completely of calling gcc (so the > > > second line will not even be emitted). > > > > > > I've queued these for 1.19.x. > > > > I see a similar error in another codepath: > > > > % apt-get source hello > > % cd hello*/ > > % dpkg-buildpackage > > ⋮ > > dpkg-buildpackage: info: source changed by Salvatore Bonaccorso > > <car...@debian.org> > > Can't exec "gcc": No such file or directory at > > /usr/share/perl5/Dpkg/Arch.pm line 165. > > dpkg-architecture: warning: cannot determine CC system type, falling back > > to default (native compilation) > > ⋮ > > I don't think this is the same problem, given that you did a full build > instead of a source only one? > I don't think it's the same problem either. (Perhaps it should be tracked as a separate bug report.) > > I think the following patch will suffice to address it: > > > > [[[ > […] > > ]]] > > > > I tested it in current sid. > > What compiler do you have installed that provides cc and it's not gcc? apt install clang It provides an implementation of /etc/alternatives/cc. > That'd be pretty non-standard Debian? > Well, yes, but it works... (and the patch should be a no-op for standard Debian where cc is gcc) > > I tried to build the package with this > > patch, on the assumption that that would run unit tests, but the build > > failed both with and without the patch with "error: cannot get project > > version" (probably from ./get-version). I built by running 'pdebuild' > > without arguments in a fresh debcheckout. > > When building from a git tree, you need git installed. :) As I said, I was building from a fresh debcheckout; I obtained it by running 'debcheckout' which ran 'git'. I am not sure what the problem was; perhaps I should have had pdebuild have pbuilder pre-install git in the chroot? Cheers, Daniel