gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master fails to build/check


From: Greg Troxel
Subject: Re: master fails to build/check
Date: Sat, 25 Jan 2020 12:31:13 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (berkeley-unix)

The reason I didn't see this before is that I used to have scons
installed against python3.7, but I recently ended up changing the
installed scons to the 2.7 version from the 3 version.  In theory things
shouldn't care (and by the same theory every scons script out there
should run correctly with any version of python; note bridge for sale),
but pkgsrc currently requires scons to be built for the same python as
the package being built as part a desire for repeatable builds.

SConstruct compiles python programs using sys.executable, rather than
target_python, and this resulted in a 2.7 compilation of a 3.x-only
program as part of scons check.

The following change uses target_python instead of whatever is being
used for scons:

  diff --git a/SConstruct b/SConstruct
  index 3f7dff6f5..21ae0fddd 100644
  --- a/SConstruct
  +++ b/SConstruct
  @@ -2094,7 +2094,7 @@ if env['python'] and not cleaning and not helping:
       for p in python_all:
           # split in two lines for readability
           check_compile.append('cp %s tmp.py; %s -tt -m py_compile tmp.py;' %
  -                             (p, sys.executable))
  +                             (p, target_python_path))
           # tmp.py may have inherited non-writable permissions
           check_compile.append('rm -f tmp.py*')


Strictly, in a cross world this is perhaps not 100% right, as there is
some blurring between target and build host.  But, I think "scons
check", just like any other "make check", cannot function in a cross
world, so that's ok.

With this change. sys.executable is used only as the default value of
target_python if none is defined, and that seems like a good situation.

Any reason this is wrong, and if so what's the right fix?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]