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: Ladislav Michl
Subject: Re: master fails to build/check
Date: Fri, 31 Jan 2020 17:01:54 +0100

On Fri, Jan 31, 2020 at 12:16:25PM +0100, Ladislav Michl wrote:
> (SConstruct line 642):
> # while this makes perfect sense
> if env['target']:
>     for (name, toolname) in devenv:
>         env[name] = env['target'] + '-' + toolname
> # why this?
> if env['sysroot']:
>     env.MergeFlags({"CFLAGS": ["--sysroot=%s" % env['sysroot']]})
>     env.MergeFlags({"LINKFLAGS": ["--sysroot=%s" % env['sysroot']]})
> 
> Every single cross-compiler I've worked with so far is aware of it's
> own headers and passing --sysroot= here makes it blind.
> 
> - if SConstruct uses sysroot as a toolchain sysroot it is the only
>   tool doing so this way and question is why it is doing so.
>   However it will work if:
>   - all libraries gpsd depends on are installed into toolchains sysroot.
>     This pollutes toolchain installation.
>   - toolchain sysroot is installed into staging area and then all
>     libraries are installed here. Unusual.
> - if SConstruct is using sysroot as all other packages, passing --sysroot
>   to toolchain is just wrong.
 - sysroot is indeed toolchain --sysroot= and all libraries gpsd depends
   on are discoverable using pkg-config. Then most people do not need to
   use sysroot at all, but then we need something like this:
--- a/SConstruct
+++ b/SConstruct
@@ -2749,7 +2749,7 @@ udev_install = Utility('udev-install', 'install', [
 
 if env['systemd']:
     env.Requires(udev_install, systemd_install)
-    if not env["sysroot"]:
+    if not env['target']:
         systemctl_daemon_reload = Utility('systemctl-daemon-reload', '',
                                           ['systemctl daemon-reload || true'])
         env.AlwaysBuild(systemctl_daemon_reload)

and then this code is still questionable:
# Honor the specified installation prefix in link paths.
if env["sysroot"]:
    env.Prepend(LIBPATH=[env["sysroot"] + installdir('libdir',
                add_destdir=False)])

Knowing what sysroot is will help fixing python modules cross-build.
Thank you.

        ladis



reply via email to

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