Skip to contentSkip to conversation

gpsd: fix shared-only build (branch yem/autobuild)

PATCH New Yann E. MORIN 3 participants 12 messages Dec 14, 2014 – Dec 15, 2014

lore
Share & tools
lore
#0 lore raw

cover gpsd: fix shared-only build (branch yem/autobuild)

Hello All!

This series fixes gpsd for the shared-only case.

The real culprit is in fact ncurses, that does not install the appropriate symlinks for pkg-config files when it is configured for wide-chars

Regards,
Yann E. MORIN.

The following changes since commit 2fbf0a98ad3f4ae10f0c0d76d4181d2271d9789d:

package/nmap: fix shared-only build (2014-12-14 12:51:26 +0100)

are available in the git repository at:

git://git.busybox.net/~ymorin/git/buildroot yem/autobuild

for you to fetch changes up to 50b4b144f7de56b1d0a60ec133c6fbf89c265dc3:

pckage/ncurses: fix pkg-config files for ncursesw (2014-12-14 17:02:35 +0100)

----------------------------------------------------------------
Yann E. MORIN (5):
package/gpsd: remove duplicate dependency
package/ncurses: fix shared-only libs
package/ncurses: slight code re-arrangement package/ncurses: trim leading 'lib' from definition of libs to install pckage/ncurses: fix pkg-config files for ncursesw

 package/gpsd/gpsd.mk       |  2 +-
 package/ncurses/ncurses.mk | 46 +++++++++++++++++++++++++++-------------------
 2 files changed, 28 insertions(+), 20 deletions(-)
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH 1/5 package/gpsd: remove duplicate dependency

No need to duplicate the host-pkgconf dependency on the Qt case, we already depend on it in the general case.

---
 package/gpsd/gpsd.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/gpsd/gpsd.mk +1 -1
index 5092b38..3e6411b 100644
@@ -45,7 +45,7 @@ endif
 # Enable or disable Qt binding
 ifeq ($(BR2_PACKAGE_QT_NETWORK),y)
 	GPSD_SCONS_ENV += QMAKE="$(QT_QMAKE)"
-	GPSD_DEPENDENCIES += qt host-pkgconf
+	GPSD_DEPENDENCIES += qt
 else
 	GPSD_SCONS_OPTS += qt=no
 endif
Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/5 package/gpsd: remove duplicate dependency

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

No need to duplicate the host-pkgconf dependency on the Qt case, we already depend on it in the general case.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 2/5 package/ncurses: fix shared-only libs

In reply to Yann E. MORIN

For a shared-only build, do not create the symlinks to the static libraries, sonce they do not exist.

Cc Thomas Petazzoni <[email protected]>
---
 package/ncurses/ncurses.mk | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)
package/ncurses/ncurses.mk +9 -11
index f54f379..ec64663 100644
@@ -47,8 +47,7 @@ ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
 NCURSES_CONF_OPTS += --enable-widec
 NCURSES_LIB_SUFFIX = w
 
-ifeq ($(BR2_STATIC_LIBS),y)
-define NCURSES_LINK_LIBS
+define NCURSES_LINK_LIBS_STATIC
 	for lib in $(NCURSES_LIBS-y); do \
 		ln -sf $${lib}$(NCURSES_LIB_SUFFIX).a \
 			$(1)/usr/lib/$${lib}.a; \
@@ -56,23 +55,22 @@ define NCURSES_LINK_LIBS
 	ln -sf libncurses$(NCURSES_LIB_SUFFIX).a \
 		$(1)/usr/lib/libcurses.a
 endef
-else
-define NCURSES_LINK_LIBS
+
+define NCURSES_LINK_LIBS_SHARED
 	for lib in $(NCURSES_LIBS-y); do \
-		ln -sf $${lib}$(NCURSES_LIB_SUFFIX).a \
-			$(1)/usr/lib/$${lib}.a; \
 		ln -sf $${lib}$(NCURSES_LIB_SUFFIX).so \
 			$(1)/usr/lib/$${lib}.so; \
 	done
-	ln -sf libncurses$(NCURSES_LIB_SUFFIX).a \
-		$(1)/usr/lib/libcurses.a
 	ln -sf libncurses$(NCURSES_LIB_SUFFIX).so \
 		$(1)/usr/lib/libcurses.so
 endef
-endif
 
-NCURSES_LINK_TARGET_LIBS = $(call NCURSES_LINK_LIBS, $(TARGET_DIR))
-NCURSES_LINK_STAGING_LIBS = $(call NCURSES_LINK_LIBS, $(STAGING_DIR))
+NCURSES_LINK_TARGET_LIBS = \
+	$(if $(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_STATIC,$(TARGET_DIR))) \
+	$(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_SHARED,$(TARGET_DIR)))
+NCURSES_LINK_STAGING_LIBS = \
+	$(if $(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_STATIC,$(STAGING_DIR))) \
+	$(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_SHARED,$(STAGING_DIR)))
 
 NCURSES_POST_INSTALL_STAGING_HOOKS += NCURSES_LINK_STAGING_LIBS
 
Signature · 1 line
1.9.1
#4 lore raw

PATCH 2/5 package/ncurses: fix shared-only libs

Yann,

Quoted 2 lines · Yann E. MORIN

For a shared-only build, do not create the symlinks to the static libraries, sonce they do not exist.

s/sonce/since/

Quoted 56 lines
Cc Thomas Petazzoni <[email protected]>
---
 package/ncurses/ncurses.mk | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)
package/ncurses/ncurses.mk +9 -12
index f54f379..ec64663 100644
@@ -47,8 +47,7 @@ ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
 NCURSES_CONF_OPTS += --enable-widec
 NCURSES_LIB_SUFFIX = w
 
-ifeq ($(BR2_STATIC_LIBS),y)
-define NCURSES_LINK_LIBS
+define NCURSES_LINK_LIBS_STATIC
        for lib in $(NCURSES_LIBS-y); do \
                ln -sf $${lib}$(NCURSES_LIB_SUFFIX).a \
                        $(1)/usr/lib/$${lib}.a; \
@@ -56,23 +55,22 @@ define NCURSES_LINK_LIBS
        ln -sf libncurses$(NCURSES_LIB_SUFFIX).a \
                $(1)/usr/lib/libcurses.a
 endef
-else
-define NCURSES_LINK_LIBS
+
+define NCURSES_LINK_LIBS_SHARED
        for lib in $(NCURSES_LIBS-y); do \
-               ln -sf $${lib}$(NCURSES_LIB_SUFFIX).a \
-                       $(1)/usr/lib/$${lib}.a; \
                ln -sf $${lib}$(NCURSES_LIB_SUFFIX).so \
                        $(1)/usr/lib/$${lib}.so; \
        done
-       ln -sf libncurses$(NCURSES_LIB_SUFFIX).a \
-               $(1)/usr/lib/libcurses.a
        ln -sf libncurses$(NCURSES_LIB_SUFFIX).so \
                $(1)/usr/lib/libcurses.so
 endef
-endif
 
-NCURSES_LINK_TARGET_LIBS = $(call NCURSES_LINK_LIBS, $(TARGET_DIR))
-NCURSES_LINK_STAGING_LIBS = $(call NCURSES_LINK_LIBS, $(STAGING_DIR))
+NCURSES_LINK_TARGET_LIBS = \
+       $(if $(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_STATIC,$(TARGET_DIR))) \
+       $(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_SHARED,$(TARGET_DIR)))
+NCURSES_LINK_STAGING_LIBS = \
+       $(if $(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_STATIC,$(STAGING_DIR))) \
+       $(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_SHARED,$(STAGING_DIR)))
 
 NCURSES_POST_INSTALL_STAGING_HOOKS += NCURSES_LINK_STAGING_LIBS
 
--

1.9.1

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Otherwise:

Signature · 1 line
Samuel
#6 lore raw

PATCH 3/5 package/ncurses: slight code re-arrangement

In reply to Yann E. MORIN

Move the definition of libraries to install before it is actually used.

Also, in a coming changeset, it will also be used to know which pkg-config files to symlink.

Cc Thomas Petazzoni <[email protected]>
---
 package/ncurses/ncurses.mk | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
package/ncurses/ncurses.mk +5 -5
index ec64663..b870aa4 100644
@@ -43,6 +43,11 @@ else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
 NCURSES_CONF_OPTS += --with-shared --with-normal
 endif
 
+NCURSES_LIBS-y = libncurses
+NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_MENU) += libmenu
+NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_PANEL) += libpanel
+NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_FORM) += libform
+
 ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
 NCURSES_CONF_OPTS += --enable-widec
 NCURSES_LIB_SUFFIX = w
@@ -76,11 +81,6 @@ NCURSES_POST_INSTALL_STAGING_HOOKS += NCURSES_LINK_STAGING_LIBS
 
 endif
 
-NCURSES_LIBS-y = libncurses
-NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_MENU) += libmenu
-NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_PANEL) += libpanel
-NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_FORM) += libform
-
 ifneq ($(BR2_ENABLE_DEBUG),y)
 NCURSES_CONF_OPTS += --without-debug
 endif
Signature · 1 line
1.9.1
#7 lore raw

PATCH 3/5 package/ncurses: slight code re-arrangement

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Move the definition of libraries to install before it is actually used. Also, in a coming changeset, it will also be used to know which pkg-config files to symlink.

Cc Thomas Petazzoni <[email protected]>

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#8 lore raw

PATCH 4/5 package/ncurses: trim leading 'lib' from definition of libs to install

In reply to Yann E. MORIN

Currently, ncurses creates symlinks from the non-'w' variants to the equivalent 'w' variant, but forgets to do so for pkg-config files.

To be able to share the same list between the libraries and the pkg-config files to symlink, just trim the 'lib' prefix of libraries in the definition, and just add it back at the time we need it.

Cc Thomas Petazzoni <[email protected]>
---
 package/ncurses/ncurses.mk | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
package/ncurses/ncurses.mk +7 -7
index b870aa4..9b660fd 100644
@@ -43,17 +43,17 @@ else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
 NCURSES_CONF_OPTS += --with-shared --with-normal
 endif
 
-NCURSES_LIBS-y = libncurses
-NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_MENU) += libmenu
-NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_PANEL) += libpanel
-NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_FORM) += libform
+NCURSES_LIBS-y = ncurses
+NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_MENU) += menu
+NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_PANEL) += panel
+NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_FORM) += form
 
 ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
 NCURSES_CONF_OPTS += --enable-widec
 NCURSES_LIB_SUFFIX = w
 
 define NCURSES_LINK_LIBS_STATIC
-	for lib in $(NCURSES_LIBS-y); do \
+	for lib in $(NCURSES_LIBS-y:%=lib%); do \
 		ln -sf $${lib}$(NCURSES_LIB_SUFFIX).a \
 			$(1)/usr/lib/$${lib}.a; \
 	done
@@ -62,7 +62,7 @@ define NCURSES_LINK_LIBS_STATIC
 endef
 
 define NCURSES_LINK_LIBS_SHARED
-	for lib in $(NCURSES_LIBS-y); do \
+	for lib in $(NCURSES_LIBS-y:%=lib%); do \
 		ln -sf $${lib}$(NCURSES_LIB_SUFFIX).so \
 			$(1)/usr/lib/$${lib}.so; \
 	done
@@ -95,7 +95,7 @@ endef
 
 ifneq ($(BR2_STATIC_LIBS),y)
 define NCURSES_INSTALL_TARGET_LIBS
-	for lib in $(NCURSES_LIBS-y); do \
+	for lib in $(NCURSES_LIBS-y:%=lib%); do \
 		cp -dpf $(NCURSES_DIR)/lib/$${lib}$(NCURSES_LIB_SUFFIX).so* \
 			$(TARGET_DIR)/usr/lib/; \
 	done
Signature · 1 line
1.9.1
#9 lore raw

PATCH 4/5 package/ncurses: trim leading 'lib' from definition of libs to install

Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Currently, ncurses creates symlinks from the non-'w' variants to the equivalent 'w' variant, but forgets to do so for pkg-config files.

To be able to share the same list between the libraries and the pkg-config files to symlink, just trim the 'lib' prefix of libraries in the definition, and just add it back at the time we need it.

Cc Thomas Petazzoni <[email protected]>

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#10 lore raw

PATCH 5/5 pckage/ncurses: fix pkg-config files for ncursesw

In reply to Yann E. MORIN

Currently, ncurses creates symlinks from the non-'w' variants to the equivalent 'w' variant, but forgets to do so for pkg-config files.

Do that for the pkg-config files too.

Should fix numerous autobuild failures:

    http://autobuild.buildroot.net/results/3c4/3c44dfc6e3f151bef751f39cac336fef3d6a0099/
    http://autobuild.buildroot.net/results/38c/38c81407bb8d0677e87b3a01f9a1fc1372ab4738/
    ...
Cc Thomas Petazzoni <[email protected]>
---
 package/ncurses/ncurses.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)
package/ncurses/ncurses.mk +10 -0
index 9b660fd..7febed6 100644
@@ -70,6 +70,13 @@ define NCURSES_LINK_LIBS_SHARED
 		$(1)/usr/lib/libcurses.so
 endef
 
+define NCURSES_LINK_PC
+	for pc in $(NCURSES_LIBS-y); do \
+		ln -sf $${pc}$(NCURSES_LIB_SUFFIX).pc \
+			$(1)/usr/lib/pkgconfig/$${pc}.pc; \
+	done
+endef
+
 NCURSES_LINK_TARGET_LIBS = \
 	$(if $(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_STATIC,$(TARGET_DIR))) \
 	$(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_SHARED,$(TARGET_DIR)))
@@ -77,7 +84,10 @@ NCURSES_LINK_STAGING_LIBS = \
 	$(if $(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_STATIC,$(STAGING_DIR))) \
 	$(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_SHARED,$(STAGING_DIR)))
 
+NCURSES_LINK_STAGING_PC = $(call NCURSES_LINK_PC,$(STAGING_DIR))
+
 NCURSES_POST_INSTALL_STAGING_HOOKS += NCURSES_LINK_STAGING_LIBS
+NCURSES_POST_INSTALL_STAGING_HOOKS += NCURSES_LINK_STAGING_PC
 
 endif
 
Signature · 1 line
1.9.1
#11 lore raw

PATCH 5/5 pckage/ncurses: fix pkg-config files for ncursesw

Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Currently, ncurses creates symlinks from the non-'w' variants to the equivalent 'w' variant, but forgets to do so for pkg-config files.

Do that for the pkg-config files too.

Quoted 7 lines

Should fix numerous autobuild failures:

    http://autobuild.buildroot.net/results/3c4/3c44dfc6e3f151bef751f39cac336fef3d6a0099/
    http://autobuild.buildroot.net/results/38c/38c81407bb8d0677e87b3a01f9a1fc1372ab4738/
    ...
Cc Thomas Petazzoni <[email protected]>

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard