gpsd-dev
[Top][All Lists]
Advanced

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

[gpsd-dev] gpsd_config.h in release tarballs can break rebuild


From: Gregory Fong
Subject: [gpsd-dev] gpsd_config.h in release tarballs can break rebuild
Date: Fri, 13 Jan 2017 02:41:47 -0800

Hello,

The following commit had a side-effect of adding gpsd_config.h to the
release tarball by adding gpsd_config.h to generated_sources in
SConstruct:

  commit eafd2ee908832f18b56f2ba986fde17a378e4791
  Author: Sanjeev Gupta <address@hidden>
  Date:   Fri Apr 3 23:26:03 2015 +0800

      Remove generated source file gpsd_config.h when cleaning scons

This leads to a subtle build issue if the following steps are taken on
a machine that will end up generating a different gpsd_config.h than
the shipped version:

1. unpack gpsd 3.15+ release tarball
2. build gpsd
3. unpack tarball to the same location again
4. try to build gpsd, but it will fail---despite having an old
timestamp (from time of release), gpsd_config.h will not be recreated
because all of the results for the cached configuration tests in
.sconf_test are unchanged from the previous run, so SConf thinks the
file is up to date.

I've encountered the issue when using OpenEmbedded's bitbake tool---if
the gpsd recipe is updated, the build directory is not wiped and
replaced, but instead repopulated with files from the tarball.  Other
build systems may do the same thing.  What makes this extremely
misleading is that all of the cached results are printed to the
console, suggesting that scons happily probed the system configuration
and generated the config when it did not!

A simple solution to this is to do the same thing that's currently
done for timebase.h and mark it as AlwaysBuild in SConstruct, i.e.

  gpsd_config = env.Textfile(target="gpsd_config.h", source=confdefs)
  env.AlwaysBuild(gpsd_config)

Another would be to remove this from the release tarball, since it has
to be generated anyway.  Thoughts on what would be better?

Thanks and regards,
Gregory



reply via email to

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