[Top][All Lists]

[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: Mon, 22 Jun 2020 11:48:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

Greg Troxel <> writes:
Florian Kiera <> writes:

Checkout SConstruct line 2147 and line 2158. It uses "DESTDIR +
str(python_libdir)" to give the install path. The problem here is that
python_libdir is already an absolute path to the STAGING_DIR's python
module. (in my case
Then don't do that.  python_libdir and other dir paths are in terms of
the target filesystem.  DESTDIR is about a chroot on the build host
where things should be put, either for packaging staging, cross,
I don't do that, gpsd does so. I just use DESTDIR as root for the corresponding directory for each stage. (staging and target install) I haven't set python_libdir in the

To repeat: it is an error to make python_libdir a path that includes DESTDIR.

python_libdir gets choosen by gpsd through checking who is compiling the python modules. Since the modules are build from the buildroots host-python it contains most of the DESTDIR... So as you just said DESTDIR which is supposed to be the chroot cant be used as chroot in buildroot if python_libdir contains the path from where its executed in all cases.

As example the staging stage:
DESTDIR gets set to the STAGING_DIR's root (which buildroot uses as source for libraries): /home/user/buildroot-2020.05.2/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot python_libdir contains the path from where python is building the gpsd modules because gpsd calls the executer: /home/user/buildroot-2020.05.2/output/host/lib/python3.8 (HOST_DIR) In the case building gpsd's python modules with buildroot, python_libdir is supposed to just contain lib/python3.8/site-packages because the python modules are needed in the TARGET_DIR and STAGING_DIR not in the HOST_DIR...

So the way you define DESTDIR, I use it right. Just the way python_libdir gets its value doesnt fit in.

In the end we solved it by giving python_libdir a value in the file.

        arch=$(ARCH) \
        manbuild=no \
        prefix=/usr \
        sysroot=$(STAGING_DIR) \
        strip=no \
        python=yes \
        qt=no \
        ntpshm=yes \
        systemd=$(if $(BR2_INIT_SYSTEMD),yes,no) \

From the logic of DESTDIR as root for the corresponding device/stage and python_libdir as path from the logical root to the python library its still not right, in my opinion.

Regards Florian

reply via email to

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