Skip to contentSkip to conversation

package/dbus-python: fix build failure due to wrong auto-detected extra libs

PATCH New Giulio Benetti 2 participants 3 messages Apr 4, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/dbus-python: fix build failure due to wrong auto-detected extra libs

Using Python 3, during configuration, if PYTHON_EXTRA_LIBS is not defined, ./configure will launch a python script to retrieve LIBS and SYSLIBS variables, but this is done using host-python resulting in obtaining libraries that are not present in target. So while trying to link configuration test it fails complaining it can't find a library(i.e. libintl).

Set PYTHON_EXTRA_LIBS the same as PYTHON_LIBS to be sure host libs are not used at all.

Fixes:
http://autobuild.buildroot.net/results/4078ee9e8aa304f044dc92e9345c28341349d468/

---
 package/dbus-python/dbus-python.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/dbus-python/dbus-python.mk +2 -1
index d6af7454af..49f0de5455 100644
@@ -25,7 +25,8 @@ DBUS_PYTHON_DEPENDENCIES += python3 host-python3
 DBUS_PYTHON_CONF_ENV += \
 	PYTHON=$(HOST_DIR)/bin/python3 \
 	PYTHON_INCLUDES="`$(STAGING_DIR)/usr/bin/python3-config --includes`" \
-	PYTHON_LIBS="`$(STAGING_DIR)/usr/bin/python3-config --ldflags`"
+	PYTHON_LIBS="`$(STAGING_DIR)/usr/bin/python3-config --ldflags`" \
+	PYTHON_EXTRA_LIBS="`$(STAGING_DIR)/usr/bin/python3-config --ldflags`"
 endif
 
 $(eval $(autotools-package))
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 package/dbus-python: fix build failure due to wrong auto-detected extra libs

Hello all,

Il 04/04/2019 20:52, Giulio Benetti ha scritto:

Quoted 24 lines

Using Python 3, during configuration, if PYTHON_EXTRA_LIBS is not defined, ./configure will launch a python script to retrieve LIBS and SYSLIBS variables, but this is done using host-python resulting in obtaining libraries that are not present in target. So while trying to link configuration test it fails complaining it can't find a library(i.e. libintl).

Set PYTHON_EXTRA_LIBS the same as PYTHON_LIBS to be sure host libs are not used at all.

Fixes:
http://autobuild.buildroot.net/results/4078ee9e8aa304f044dc92e9345c28341349d468/

---
  package/dbus-python/dbus-python.mk | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
package/dbus-python/dbus-python.mk +0 -0
index d6af7454af..49f0de5455 100644

package/dbus-python/dbus-python.mk DBUS_PYTHON_DEPENDENCIES += python3 host-python3 · line 32

Quoted 9 lines
package/dbus-python/dbus-python.mk +2 -1
@@ -25,7 +25,8 @@ DBUS_PYTHON_DEPENDENCIES += python3 host-python3
  DBUS_PYTHON_CONF_ENV += \
  	PYTHON=$(HOST_DIR)/bin/python3 \
  	PYTHON_INCLUDES="`$(STAGING_DIR)/usr/bin/python3-config --includes`" \
-	PYTHON_LIBS="`$(STAGING_DIR)/usr/bin/python3-config --ldflags`"
+	PYTHON_LIBS="`$(STAGING_DIR)/usr/bin/python3-config --ldflags`" \
+	PYTHON_EXTRA_LIBS="`$(STAGING_DIR)/usr/bin/python3-config --ldflags`"
  endif
 
  $(eval $(autotools-package))

I'm not very happy about this solution, but I couldn't find a better one with my experience.

Does anyone have suggestion about it?

Thanks in advance

Signature · 10 lines
Giulio Benetti
CTO

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale ? 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642
#2 lore raw

PATCH 1/1 package/dbus-python: fix build failure due to wrong auto-detected extra libs

In reply to Giulio Benetti

Hello,

Quoted 7 lines · On Thu, 4 Apr 2019 20:52:28 +0200 Giulio Benetti…

Using Python 3, during configuration, if PYTHON_EXTRA_LIBS is not defined, ./configure will launch a python script to retrieve LIBS and SYSLIBS variables, but this is done using host-python resulting in obtaining libraries that are not present in target. So while trying to link configuration test it fails complaining it can't find a library(i.e. libintl).

Quoted 7 lines

Set PYTHON_EXTRA_LIBS the same as PYTHON_LIBS to be sure host libs are not used at all.

Fixes:
http://autobuild.buildroot.net/results/4078ee9e8aa304f044dc92e9345c28341349d468/

So it started failing with the introduction of gettext-tiny ? Do we understand why it makes a difference for dbus-python ?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com