diff --git a/package/gstreamer1/gst1-python/gst1-python.mk b/package/gstreamer1/gst1-python/gst1-python.mk index 23b4bbd900..122c3dd997 100644 --- a/package/gstreamer1/gst1-python/gst1-python.mk +++ b/package/gstreamer1/gst1-python/gst1-python.mk @@ -23,10 +23,16 @@ GST1_PYTHON_CONF_ENV += \ _PYTHON_SYSCONFIGDATA_NAME=$(PKG_PYTHON_SYSCONFIGDATA_NAME) \ PYTHONPATH=$(PYTHON3_PATH) -# Due to the CONF_ENV options, libpython-dir must be set to the host directory +# Due to the CONF_ENV options, libpython-dir must be set manually # or else the error: "Python dynamic library path could not be determined" -# will occure +# occurs. We set the libpython-dir to /usr/lib as this path is hard-coded +# into the resulting .so file as /usr/lib/python3.$(PYTHON3_VERSION_MAJOR).so. +# Because we provide PYTHONPATH=$(PYTHON3_PATH) above, the logic in the meson +# file uses the above python path to determine if /usr/lib/ has the proper .so +# file. Because Buildroot provides the appropriate paths, the meson file finds +# the correct .so file, and the resulting compiled library has the appropriate +# path of /usr/lib/python3.$(PYTHON3_VERSION_MAJOR).so GST1_PYTHON_CONF_OPTS += \ - -Dlibpython-dir=$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR) + -Dlibpython-dir=/usr/lib/ $(eval $(meson-package))