Hi Michael,

On Sat, Feb 01, 2020 at 10:02:16AM +0100, Michael Olbrich wrote:
> Well this patch and the 3.20 update still fails here with:
> 
> .../bin/ld: gpspacket-py_2_7_16_final_0.cpython-37m-arm-linux-gnueabihf.so:
> in function `Lexer_dealloc':
> platform-arm-hf/build-target/gpsd-3.20/gpspacket.c:129: undefined reference
> to `PyObject_Free'
> 
> This looks suspicious to me: 2.7.16 is python2 version... I think there is
> some stuff leaking in from the build Python.

This leakage could be fixed with following patch:
https://lists.nongnu.org/archive/html/gpsd-dev/2020-02/msg00006.html

Also to kill warning about different time_t size, consider following:
--- a/rules/python3.make
+++ b/rules/python3.make
@@ -46,6 +46,7 @@ PYTHON3_CONF_ENV      := \
        ac_cv_broken_sem_getvalue=no \
        ac_cv_file__dev_ptmx=no \
        ac_cv_file__dev_ptc=no \
+       ac_cv_sizeof_time_t=8 \
        ac_cv_working_tzset=yes \
        ac_cv_header_bluetooth_bluetooth_h=no \
        LDFLAGS="-L$(PTXDIST_SYSROOT_TARGET)/usr/lib"

I do not know how to fix PYINCLUDE path yet nor how to link against
libpython3.7m.so.1.0, so I'm sending current patch (tested against
git version of gpsd) in case someone wants to play with it.

--- >8 ---

From: Ladislav Michl <la...@linux-mips.org>
Subject: [PATCH] gpsd: version bump 3.19 -> 3.20

Quite few options were removed...

Not-yet-Signed-off-by: Ladislav Michl <la...@linux-mips.org>
---
 ...Fix-python-binding-cross-compilation.patch | 96 -------------------
 patches/gpsd-3.19/series                      |  5 -
 .../0001-Search-for-ncursesw-pkgconfig.patch  |  6 +-
 patches/gpsd-3.20/series                      |  4 +
 rules/gpsd.in                                 | 28 +-----
 rules/gpsd.make                               | 22 +----
 6 files changed, 17 insertions(+), 144 deletions(-)
 delete mode 100644 
patches/gpsd-3.19/0002-Fix-python-binding-cross-compilation.patch
 delete mode 100644 patches/gpsd-3.19/series
 rename patches/{gpsd-3.19 => 
gpsd-3.20}/0001-Search-for-ncursesw-pkgconfig.patch (85%)
 create mode 100644 patches/gpsd-3.20/series

diff --git a/patches/gpsd-3.19/0002-Fix-python-binding-cross-compilation.patch 
b/patches/gpsd-3.19/0002-Fix-python-binding-cross-compilation.patch
deleted file mode 100644
index 94a4810f6..000000000
--- a/patches/gpsd-3.19/0002-Fix-python-binding-cross-compilation.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From: Ladislav Michl <la...@linux-mips.org>
-Date: Wed, 30 Oct 2019 11:47:28 +0100
-Subject: [PATCH] Fix python binding cross-compilation
-
----
- SConstruct | 48 +++++++++++++++++++++---------------------------
- 1 file changed, 21 insertions(+), 27 deletions(-)
-
-diff --git a/SConstruct b/SConstruct
-index 7bd5b08f2a46..4895b659ba49 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -440,6 +440,10 @@ def announce(msg):
-     if not env.GetOption("silent"):
-         print(msg)
- 
-+if env['sysroot']:
-+    sysroot = env['sysroot']
-+else:
-+    sysroot = ''
- 
- # DESTDIR environment variable means user prefix the installation root.
- DESTDIR = os.environ.get('DESTDIR', '')
-@@ -454,12 +458,6 @@ def installdir(dir, add_destdir=True):
-     wrapped.replace("/usr/lib/systemd", "/lib/systemd")
-     return wrapped
- 
--
--# Honor the specified installation prefix in link paths.
--if env["sysroot"]:
--    env.Prepend(LIBPATH=[env["sysroot"] + installdir('libdir',
--                add_destdir=False)])
--
- # Give deheader a way to set compiler flags
- if 'MORECFLAGS' in os.environ:
-     env.Append(CFLAGS=Split(os.environ['MORECFLAGS']))
-@@ -513,11 +511,6 @@ if env['target']:
-     for (name, toolname) in devenv:
-         env[name] = env['target'] + '-' + toolname
- 
--if env['sysroot']:
--    env.MergeFlags({"CFLAGS": ["--sysroot=%s" % env['sysroot']]})
--    env.MergeFlags({"LINKFLAGS": ["--sysroot=%s" % env['sysroot']]})
--
--
- # Build help
- def cmp(a, b):
-     return (a > b) - (a < b)
-@@ -1156,22 +1149,23 @@ if helping:
- 
- else:
- 
--    if config.env['python'] and config.env['target_python']:
--        try:
--            config.CheckProg
--        except AttributeError:  # Older scons versions don't have CheckProg
--            target_python_path = config.env['target_python']
--        else:
--            target_python_path = config.CheckProg(config.env['target_python'])
--        if not target_python_path:
--            announce("Target Python doesn't exist - disabling Python.")
--            config.env['python'] = False
-     if config.env['python']:
--        # Maximize consistency by using the reported sys.executable
--        target_python_path = config.GetPythonValue('exe path',
--                                                   'import sys',
--                                                   'sys.executable',
--                                                   brief=cleaning)
-+        if config.env['target_python']:
-+            try:
-+                config.CheckProg
-+            except AttributeError:  # Older scons versions don't have 
CheckProg
-+                target_python_path = config.env['target_python']
-+            else:
-+                target_python_path = 
config.CheckProg(config.env['target_python'])
-+            if not target_python_path:
-+                announce("Target Python doesn't exist - disabling Python.")
-+                config.env['python'] = False
-+        else:
-+            # Maximize consistency by using the reported sys.executable
-+            target_python_path = config.GetPythonValue('exe path',
-+                                                       'import sys',
-+                                                       'sys.executable',
-+                                                       brief=cleaning)
-         if config.env['python_libdir']:
-             python_libdir = config.env['python_libdir']
-         else:
-@@ -1674,7 +1668,7 @@ else:
-                        LINK=ldshared,
-                        SHLIBPREFIX="",
-                        SHLIBSUFFIX=python_config['SO'],
--                       CPPPATH=[python_config['INCLUDEPY']],
-+                       CPPPATH=sysroot + python_config['INCLUDEPY'],
-                        CPPFLAGS=python_config['OPT'],
-                        CFLAGS=python_config['BASECFLAGS'],
-                        CXXFLAGS=python_config['BASECFLAGS'])
diff --git a/patches/gpsd-3.19/series b/patches/gpsd-3.19/series
deleted file mode 100644
index 32349387e..000000000
--- a/patches/gpsd-3.19/series
+++ /dev/null
@@ -1,5 +0,0 @@
-# generated by git-ptx-patches
-#tag:base --start-number 1
-0001-Search-for-ncursesw-pkgconfig.patch
-0002-Fix-python-binding-cross-compilation.patch
-# a402ea49345e59dc5c9f5487c0ce65c6  - git-ptx-patches magic
diff --git a/patches/gpsd-3.19/0001-Search-for-ncursesw-pkgconfig.patch 
b/patches/gpsd-3.20/0001-Search-for-ncursesw-pkgconfig.patch
similarity index 85%
rename from patches/gpsd-3.19/0001-Search-for-ncursesw-pkgconfig.patch
rename to patches/gpsd-3.20/0001-Search-for-ncursesw-pkgconfig.patch
index 235d5b36e..3556f3c8a 100644
--- a/patches/gpsd-3.19/0001-Search-for-ncursesw-pkgconfig.patch
+++ b/patches/gpsd-3.20/0001-Search-for-ncursesw-pkgconfig.patch
@@ -2,7 +2,7 @@ From: Ladislav Michl <la...@linux-mips.org>
 Date: Fri, 25 Oct 2019 14:18:30 +0200
 Subject: [PATCH] Search for ncursesw pkgconfig
 
-PTXDist can be configured to build wide char verson of ncurses
+PTXDist can be configured to build wide char version of ncurses
 which SConstruct is unaware of.
 
 Signed-off-by: Ladislav Michl <la...@linux-mips.org>
@@ -11,10 +11,10 @@ Signed-off-by: Ladislav Michl <la...@linux-mips.org>
  1 file changed, 2 insertions(+)
 
 diff --git a/SConstruct b/SConstruct
-index 5160481a7a7b..7bd5b08f2a46 100644
+index 33e0ff32665c..0fde205c7302 100644
 --- a/SConstruct
 +++ b/SConstruct
-@@ -826,6 +826,8 @@ else:
+@@ -872,6 +872,8 @@ else:
              ncurseslibs = pkg_config('ncurses', rpath_hack=True)
              if config.CheckPKG('tinfo'):
                  ncurseslibs += pkg_config('tinfo', rpath_hack=True)
diff --git a/patches/gpsd-3.20/series b/patches/gpsd-3.20/series
new file mode 100644
index 000000000..92c1ff2dc
--- /dev/null
+++ b/patches/gpsd-3.20/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Search-for-ncursesw-pkgconfig.patch
+# 0a25b3a60da43320932e29415a6d365a  - git-ptx-patches magic
diff --git a/rules/gpsd.in b/rules/gpsd.in
index 660088969..6603bd463 100644
--- a/rules/gpsd.in
+++ b/rules/gpsd.in
@@ -13,6 +13,7 @@ menuconfig GPSD
        select NCURSES                  if GPSD_NCURSES
        select DBUS_GLIB                if GPSD_DBUS
        select PYTHON3                  if GPSD_PYTHON
+       select PYSERIAL3                if GPSD_PYSERIAL
        prompt "gpsd                          "
        help
          gpsd is a daemon that listens to a GPS or Loran receiver
@@ -27,25 +28,15 @@ if GPSD
 config GPSD_NCURSES
        bool
 
-comment "time service     ---"
-
-config GPSD_NTP
+config GPSD_PYSERIAL
        bool
-       prompt "NTP time hinting support"
 
-config GPSD_NTPSHM
-       bool
-       depends on GPSD_NTP
-       prompt "NTP time hinting via shared memory"
+comment "time service     ---"
 
 config GPSD_OSCILLATOR
        bool
        prompt "Disciplined oscillator support"
 
-config GPSD_PPS
-       bool
-       prompt "PPS time syncing support"
-
 comment "export methods   ---"
 
 config GPSD_DBUS
@@ -111,14 +102,6 @@ config GPSD_USER
        help
          This user is used for privilege separation.
 
-config GPSD_FIXED_PORT_SPEED
-       string
-       prompt "fixed port speed"
-
-config GPSD_FIXED_PORT_BITS
-       string
-       prompt "fixed port bits"
-
 config GPSD_MAX_CLIENTS
        string
        prompt "max clients"
@@ -207,7 +190,6 @@ menu "drivers"
 
        config GPSD_DRIVER_UBX
                bool
-               select GPSD_NTPSHM
                select GPSD_DRIVER_NMEA
                prompt "ubx"
 
@@ -356,8 +338,6 @@ menu "install options"
 
        config GPSD_NTPSHMMON
                bool
-               select GPSD_NTP
-               select GPSD_PPS
                select GPSD_SHM
                prompt "ntpshmmon"
                help
@@ -420,6 +400,7 @@ menu "install options"
        config GPSD_UBXTOOL
                bool
                select GPSD_PYTHON
+               select GPSD_PYSERIAL
                prompt "ubxtool"
                help
                  ubxtool is a tool for u-blox GPS. ubxtool can decode common
@@ -430,6 +411,7 @@ menu "install options"
        config GPSD_ZERK
                bool
                select GPSD_PYTHON
+               select GPSD_PYSERIAL
                prompt "zerk"
                help
                  zerk is an all purpose GREIS fitting. zerk can decode common
diff --git a/rules/gpsd.make b/rules/gpsd.make
index ae4e0628e..741fe69ee 100644
--- a/rules/gpsd.make
+++ b/rules/gpsd.make
@@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_GPSD) += gpsd
 #
 # Paths and names
 #
-GPSD_VERSION   := 3.19
-GPSD_MD5       := b3bf88706794eb8e5f2c2543bf7ba87b
+GPSD_VERSION   := 3.20
+GPSD_MD5       := cf7fdec7ce7221d20bee1a7246362b05
 GPSD           := gpsd-$(GPSD_VERSION)
 GPSD_SUFFIX    := tar.gz
 GPSD_URL       := 
http://download.savannah.gnu.org/releases/gpsd/$(GPSD).$(GPSD_SUFFIX)
@@ -52,6 +52,9 @@ GPSD_PROGS-$(PTXCONF_GPSD_UBXTOOL)    += ubxtool
 GPSD_PROGS-$(PTXCONF_GPSD_ZERK)                += zerk
 
 GPSD_CONF_TOOL := scons
+GPSD_CONF_ENV  := \
+       $(CROSS_ENV) \
+       LD=$(COMPILER_PREFIX)gcc
 GPSD_CONF_OPT  := \
        aivdm=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_AIVDM) \
        ashtech=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_ASHTECH) \
@@ -75,10 +78,8 @@ GPSD_CONF_OPT        := \
        gpsdclients=$(GPSD_BUILD_CLIENTS) \
        greis=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_GREIS) \
        implicit_link=yes \
-       ipv6=$(call ptx/yesno, PTXCONF_GLOBAL_IPV6) \
        isync=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_ISYNC) \
        itrax=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_ITRAX) \
-       leapfetch=yes \
        libdir=/usr/$(CROSS_LIB_DIR) \
        libgpsmm=no \
        magic_hat=no \
@@ -90,16 +91,12 @@ GPSD_CONF_OPT       := \
        netfeed=yes \
        nmea0183=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_NMEA) \
        nmea2000=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_NMEA) \
-       nofloats=no \
        nostrip=yes \
-       ntp=$(call ptx/yesno, PTXCONF_GPSD_NTP) \
-       ntpshm=$(call ptx/yesno, PTXCONF_GPSD_SHM) \
        ntrip=$(call ptx/yesno, GPSD_DRIVER_NTRIP) \
        oceanserver=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_OCEANSERVER) \
        oncore=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_ONCORE) \
        oscillator=$(call ptx/yesno, PTXCONF_GPSD_OSCILLATOR) \
        passthrough=no \
-       pps=$(call ptx/yesno, PTXCONF_GPSD_PPS) \
        prefix=/usr \
        profiling=$(call ptx/yesno, PTXCONF_GPSD_PROFILING) \
        python=$(call ptx/yesno, PTXCONF_GPSD_PYTHON) \
@@ -116,12 +113,10 @@ GPSD_CONF_OPT     := \
        squelch=yes \
        superstar2=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_SUPERSTAR2) \
        sysconfdir=/etc \
-       sysroot=$(SYSROOT) \
        systemd=$(call ptx/yesno, PTXCONF_GPSD_SYSTEMD) \
        target=$(PTXCONF_GNU_TARGET) \
        target_python=$(CROSS_PYTHON3) \
        timeservice=no \
-       timing=no \
        tnt=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_TNT) \
        tripmate=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_TRIPMATE) \
        tsip=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_TSIP) \
@@ -130,13 +125,6 @@ GPSD_CONF_OPT      := \
        usb=$(call ptx/yesno, PTXCONF_GPSD_USB) \
        xgps=no
 
-ifneq ($(call remove_quotes,$(PTXCONF_GPSD_FIXED_PORT_SPEED)),)
-GPSD_CONF_OPT += fixed_port_speed=$(PTXCONF_GPSD_FIXED_PORT_SPEED)
-endif
-ifneq ($(call remove_quotes,$(PTXCONF_GPSD_FIXED_PORT_BITS)),)
-GPSD_CONF_OPT += fixed_port_bits=$(PTXCONF_GPSD_FIXED_PORT_BITS)
-endif
-
 ifneq ($(call remove_quotes,$(PTXCONF_GPSD_GROUP)),)
 GPSD_CONF_OPT += gpsd_group=$(PTXCONF_GPSD_GROUP)
 endif
-- 
2.25.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to