summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--SConstruct87
-rw-r--r--build.txt54
3 files changed, 32 insertions, 110 deletions
diff --git a/NEWS b/NEWS
index 1b126efd..8a8770fa 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@
Repository head:
Fixed incorrect decode of south latitudes in AIS Type 17 messages.
splint has been retired; this removes almost 2KLOC of annotations.
+ chrpath is no longer a build dependency.
3.14: 2015-03-14 (Eric S. Raymond <esr@snark.thyrsus.com>)
The Pi Day release, 3.14 on 3/14 2015 at 9:26. Longer timeouts on test clients.
diff --git a/SConstruct b/SConstruct
index 4747d485..90922124 100644
--- a/SConstruct
+++ b/SConstruct
@@ -159,7 +159,6 @@ boolopts = (
("profiling", False, "build with profiling enabled"),
("coveraging", False, "build with code coveraging enabled"),
("nostrip", False, "don't symbol-strip binaries at link time"),
- ("chrpath", False, "use chrpath to edit library load paths"),
("manbuild", True, "build help in man and HTML formats"),
("leapfetch", True, "fetch up-to-date data on leap seconds."),
("minimal", False, "turn off every option not set on the command line"),
@@ -255,8 +254,7 @@ env['PYTHON'] = sys.executable
# settings.
env['STRIP'] = "strip"
env['PKG_CONFIG'] = "pkg-config"
-env['CHRPATH'] = 'chrpath'
-for i in ["AR", "ARFLAGS", "CCFLAGS", "CFLAGS", "CC", "CXX", "CXXFLAGS", "LINKFLAGS", "STRIP", "PKG_CONFIG", "CHRPATH", "LD", "TAR"]:
+for i in ["AR", "ARFLAGS", "CCFLAGS", "CFLAGS", "CC", "CXX", "CXXFLAGS", "LINKFLAGS", "STRIP", "PKG_CONFIG", "LD", "TAR"]:
if os.environ.has_key(i):
j = i
if i == "LD":
@@ -350,7 +348,6 @@ env.SourceCode('.', None)
devenv = (("ADDR2LINE", "addr2line"),
("AR","ar"),
("AS","as"),
- ("CHRPATH", "chrpath"),
("CXX","c++"),
("CXXFILT","c++filt"),
("CPP","cpp"),
@@ -523,20 +520,6 @@ else:
env.MergeFlags("-pthread")
env.Prepend(LIBPATH=[os.path.realpath(os.curdir)])
- if env["shared"] and env["chrpath"]:
- if WhereIs('chrpath'):
- # Tell generated binaries to look in the current directory
- # for shared libraries so we can run ad-hoc tests without
- # hassle (the regression tests *don't* need this as
- # they're run in a controlled environment where we can set
- # LD_LIBRARY_PATH). Should be handled sanely by scons on
- # all systems. Not good to use '.' or a relative path
- # here; it's a security risk. At install time we use
- # chrpath to edit this out of RPATH.
- env.Prepend(RPATH=[os.path.realpath(os.curdir)+",--enable-new-dtags"])
- else:
- print "chrpath is not available; please build with chrpath=no."
-
confdefs = ["/* gpsd_config.h. Generated by scons, do not hand-hack. */\n"]
confdefs.append('#ifndef GPSD_CONFIG_H\n')
@@ -983,9 +966,6 @@ if qt_env:
gpsflags = ["-lm"] + rtlibs + dbusflags
gpsdflags = usbflags + bluezflags + gpsflags
-gpslibs = ["-lgps"] + gpsflags
-gpsdlibs = ["-lgpsd"] + gpsdflags + gpslibs
-
# Source groups
gpsd_sources = ['gpsd.c','timehint.c', 'shmexport.c','dbusexport.c']
@@ -1008,41 +988,38 @@ gpsmon_sources = [
## Production programs
gpsd = env.Program('gpsd', gpsd_sources,
- LIBS=['gpsd'], parse_flags=gpsdflags+gpslibs)
-env.Depends(gpsd, [compiled_gpslib])
-
+ LIBS=['gpsd', 'gps_static'], LIBPATH='.',
+ parse_flags=gpsdflags+gpsflags)
gpsdecode = env.Program('gpsdecode', ['gpsdecode.c'],
- LIBS=['gpsd'], parse_flags=gpsdflags+gpslibs)
-env.Depends(gpsdecode, [compiled_gpslib])
-
+ LIBS=['gpsd', 'gps_static'], LIBPATH='.',
+ parse_flags=gpsdflags+gpsflags)
gpsctl = env.Program('gpsctl', ['gpsctl.c'],
- LIBS=['gpsd'], parse_flags=gpsdflags+gpslibs)
-env.Depends(gpsctl, [compiled_gpslib])
-
+ LIBS=['gpsd', 'gps_static'], LIBPATH='.',
+ parse_flags=gpsdflags+gpsflags)
gpsmon = env.Program('gpsmon', gpsmon_sources,
- LIBS=['gpsd'], parse_flags=gpsdflags+gpslibs + ncurseslibs)
-env.Depends(gpsmon, [compiled_gpslib])
-
-gpsdctl = env.Program('gpsdctl', ['gpsdctl.c'], parse_flags=gpslibs)
-env.Depends(gpsdctl, compiled_gpslib)
-
-gpspipe = env.Program('gpspipe', ['gpspipe.c'], parse_flags=gpslibs)
-env.Depends(gpspipe, compiled_gpslib)
-
-gps2udp = env.Program('gps2udp', ['gps2udp.c'], parse_flags=gpslibs)
-env.Depends(gps2udp, compiled_gpslib)
-
-gpxlogger = env.Program('gpxlogger', ['gpxlogger.c'], parse_flags=gpslibs)
-env.Depends(gpxlogger, compiled_gpslib)
-
-lcdgps = env.Program('lcdgps', ['lcdgps.c'], parse_flags=gpslibs)
-env.Depends(lcdgps, compiled_gpslib)
-
-cgps = env.Program('cgps', ['cgps.c'], parse_flags=gpslibs + ncurseslibs)
-env.Depends(cgps, compiled_gpslib)
-
-ntpshmmon = env.Program('ntpshmmon', ['ntpshmmon.c'], parse_flags=gpslibs)
-env.Depends(ntpshmmon, compiled_gpslib)
+ LIBS=['gpsd', 'gps_static'], LIBPATH='.',
+ parse_flags=gpsdflags + gpsflags + ncurseslibs)
+gpsdctl = env.Program('gpsdctl', ['gpsdctl.c'],
+ LIBS=['gps_static'], LIBPATH='.',
+ parse_flags=gpsflags)
+gpspipe = env.Program('gpspipe', ['gpspipe.c'],
+ LIBS=['gps_static'], LIBPATH='.',
+ parse_flags=gpsflags)
+gps2udp = env.Program('gps2udp', ['gps2udp.c'],
+ LIBS=['gps_static'], LIBPATH='.',
+ parse_flags=gpsflags)
+gpxlogger = env.Program('gpxlogger', ['gpxlogger.c'],
+ LIBS=['gps_static'], LIBPATH='.',
+ parse_flags=gpsflags)
+lcdgps = env.Program('lcdgps', ['lcdgps.c'],
+ LIBS=['gps_static'], LIBPATH='.',
+ parse_flags=gpsflags)
+cgps = env.Program('cgps', ['cgps.c'],
+ LIBS=['gps_static'], LIBPATH='.',
+ parse_flags=gpsflags + ncurseslibs)
+ntpshmmon = env.Program('ntpshmmon', ['ntpshmmon.c'],
+ LIBS=['gps_static'], LIBPATH='.',
+ parse_flags=gpsflags)
binaries = [gpsd, gpsdecode, gpsctl, gpsdctl, gpspipe, gps2udp, gpxlogger, lcdgps, ntpshmmon]
if env["ncurses"]:
@@ -1361,10 +1338,6 @@ binaryinstall.append(LibraryInstall(env, installdir('libdir'), compiled_gpslib))
if qt_env:
binaryinstall.append(LibraryInstall(qt_env, installdir('libdir'), compiled_qgpsmmlib))
-if env["shared"] and env["chrpath"]:
- env.AddPostAction(binaryinstall, '$CHRPATH -r "%s" "$TARGET"' \
- % (installdir('libdir', False), ))
-
if not env['debug'] and not env['profiling'] and not env['nostrip'] and not sys.platform.startswith('darwin'):
env.AddPostAction(binaryinstall, '$STRIP $TARGET')
diff --git a/build.txt b/build.txt
index 7de42487..28ee66ae 100644
--- a/build.txt
+++ b/build.txt
@@ -241,58 +241,6 @@ included with the distribution. To install it, copy the file
'gpsd.php' to your HTML document directory. Then see the
post-installation instructions in INSTALL for how to configure it.
-=== Why you might need chrpath ===
-
-You can probably skip this section unless you are a developer working
-on the GPSD source directly, with a need to run some of the GPSD
-programs by hand in the test directory. You are likely to get a
-message something like:
-
---------------------------------------------------------------------
-./gpsd: error while loading shared libraries: libgpsd.so.XX: cannot open shared object file: No such file or directory
---------------------------------------------------------------------
-
-If this happens, there are two different things you can do about it.
-One is this:
-
---------------------------------------------------------------------
-export LD_LIBRARY_PATH=${PWD}
---------------------------------------------------------------------
-
-The other is to install the chrpath utility and do your builds with
-chrpath=yes.
-
-The reason one of these is required is because of some details
-about dynamic linking. The search path for dynamic linking that is
-compiled into your binaries as you build them is set by the
-environment variable RPATH, if it exists. At runtime, when a
-dynamically-linked executable is called, that path is prepended
-with $LD_LIBRARY_PATH
-
-Ideally, during development, we want to build build binaries that (a)
-link dynamically, (b) can be tested in the build directory without
-installing to system space (in particular, so we can run ad-hoc
-tests without disturbing a production installation) and (c) won't
-carry a potential exploit into system space if the binaries are
-installed.
-
-The potential exploit is the remnant presence of the build directory in
-the binary's internal list of places it will look for shared libraries.
-We need that to be there for testing purposes, but we want it gone
-in the version of the binary that's copied to /lib or /usr/lib. Otherwise
-there are threat scenarios with a maliciously crafted library.
-
-To get (b) without runtime tweaking of LD_LIBRARY_PATH, the
-development directory needs to be in RPATH, opening the security hole.
-Without editing RPATH at installation time we can get any two of those
-three, but we can't get all three. Choosing static linking we get (b)
-and (c), choosing dynamic linking without chrpath we get (a) and (b).
-
-chrpath is a tool for editing RPATH in object files.
-
-Ubuntu users can do 'apt-get install chrpath'
-CentOS users can do 'yum install chrpath' from extras.
-
== The leapseconds cache ==
Early in your build, the recipe will try to go over the Internet to
@@ -410,7 +358,7 @@ Here are the scons switches I use:
scons wordsize=32 snapshot=off arch=arm sample=shell
scons -j3 prefix=/usr libdir=$prefix/lib udevdir=/lib/udev
-chrpath=False gpsd_user=gpsd gpsd_group=uucp socket_export=1
+gpsd_user=gpsd gpsd_group=uucp socket_export=1
nmea0183=1 sirf=1
With the following environment variables: