gpsd-users
[Top][All Lists]
Advanced

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

Re: Cross compile gpsd-3.20.1~dev for arm with buildroot


From: Florian Kiera
Subject: Re: Cross compile gpsd-3.20.1~dev for arm with buildroot
Date: Wed, 24 Jun 2020 09:20:38 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0


Am 24.06.20 um 01:55 schrieb Greg Troxel:
Florian Kiera <florian.kiera@logicway.de> writes:

    I am not quite following, but it may be that build code setting
    HOST_DIR does not grasp the concept that if it is under DESTDIR, then
    that part should be removed to get a DESTDIR relative path.  I think
    there may be trouble from mixing DESTDIR-aware build code from code
    that is not really aware but is using a path that has DESTDIR in it.
There could be a check whether DESTDIR and python_libdir contain the
same path (a huge part of it). At least for cross compiling with
buildroot it would work.
I think if any directory contains DESTDIR as a prefix that should
probably throw an error.  Not fix it up, just error.

In fact python and its library is always under
/lib|/usr/lib|/usr/lib32|/usr/lib64 isnt it? So why does it need to
check from where it is called instead of some other work arounds?
No, python can be anywhere.  On pkgsrc it is in /usr/pkg/lib.   On
FreeBSD ports I think it is in /usr/local/lib.

I don't know which environment variables you can get while using
scons, may there is one that suits better for the purpose of finding
the python path?
I am not following why you want "environment variables".  When building
cross, the python libdir has to be for the lib path on the target, which
is going to be within the DESTDIR on the build host.   It has no
relation to where python's libdir is on the build host.  So you have to
pass it explicitly to the cross build anyway.

python_libdir gets its value from an environmental variable (sysconfig.get_python_lib() ), else you couldn't use it dynamically. The environment variable it uses right now is not suited for cross compiling. There are probably more environment variables, that could help if you want to cross compile. Or you just cut down the python_lib to a collection of paths. Like you just mentioned about different paths, its possible to make an array containing all possible paths and just use the one that suits the best for it. Search for the longest first, shortest last and replace python_libdir with the value of them that is matching the path the most. At least would make it possible to cross compile with less errors and wouldn't harm normal usage. Or you can cut python_lib with sysroot. There are many ways, I am just not sure which would suit the best.




reply via email to

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