Skip to contentSkip to conversation

Fix gcrypt library linker option on collectd.

PATCH New Yu-Ting 3 participants 3 messages Dec 29, 2016 – Jan 27, 2017

lore
Share & tools
lore

Yu-Ting

#0 lore raw

PATCH 1/1 Fix gcrypt library linker option on collectd.

---
 package/collectd/collectd.mk | 1 +
 1 file changed, 1 insertion(+)
package/collectd/collectd.mk +1 -0
index 28c1b31..c2d6f37 100644
@@ -177,6 +177,7 @@ ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
 COLLECTD_DEPENDENCIES += libgcrypt
 COLLECTD_CONF_OPTS += --with-libgcrypt=$(STAGING_DIR)/usr
 COLLECTD_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config
+COLLECTD_CONF_ENV += LIBS="-lgcrypt"
 else
 COLLECTD_CONF_OPTS += --with-libgcrypt=no
 endif
Signature · 1 line
2.4.8
#1 lore raw

PATCH 1/1 Fix gcrypt library linker option on collectd.

Quoted 9 lines · Kao
package/collectd/collectd.mk +0 -0
@@ -177,6 +177,7 @@ ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
 COLLECTD_DEPENDENCIES += libgcrypt
 COLLECTD_CONF_OPTS += --with-libgcrypt=$(STAGING_DIR)/usr
 COLLECTD_CONF_ENV += 

LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config +COLLECTD_CONF_ENV += LIBS="-lgcrypt"
else
COLLECTD_CONF_OPTS += --with-libgcrypt=no endif

Hi.
This won't work as expected since you're potentially stomping over LIBS which is defined at the beginning of the package makefile, and also over the re-stomping when the postgresql option is turned on (which doesn't break the first one since it's defining both).
Probably better to do something like, at the beginning:

COLLECTD_CONF_ENV = LIBS="-lm $(COLLECTD_LIBS)"

And then:

ifeq ($(BR2_PACKAGE_POSTGRESQL,y)
COLLECTD_LIBS += -lpthread
....

ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
COLLECTD_LIBS += -lgcrypt
....

Regards.

#2 lore raw

PATCH 1/1 Fix gcrypt library linker option on collectd.

In reply to Yu-Ting

Hello,

Quoted 3 lines · Kao
---
 package/collectd/collectd.mk | 1 +
 1 file changed, 1 insertion(+)

What problem is this commit fixing? An autobuilder failure? If so, there should be a reference to it. I don't see any collectd issue reported by the autobuilders:
http://autobuild.buildroot.net/?reason=collectd-5.7.1. Maybe this issue has already been fixed?

Also, the commit title should always have the format:

<package>: <short description>

so in your case, it should be:

	collectd: ...

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com