lowpan-tools_0.2.2;: fix build with static libnl1
PATCH v2 1/1 lowpan-tools_0.2.2;: fix build with static libnl1
* add NL_CFLAGS to a few Makefiles.am
* git version not fixed
* build and runtime tested, although only in qemuarm
--- .../0001-Add-NL_CFLAGS-to-libcommon.patch | 65 ++++++++++++++++++++ recipes/lowpan-tools/lowpan-tools.inc | 4 +- recipes/lowpan-tools/lowpan-tools_0.2.2.bb | 6 ++- 3 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 recipes/lowpan-tools/lowpan-tools-0.2.2/0001-Add-NL_CFLAGS-to-libcommon.patch
recipes/lowpan-tools/lowpan-tools-0.2.2/0001-Add-NL_CFLAGS-to-libcommon.patch new file +65 -0
@@ -0,0 +1,65 @@ +From 7fa435ea775b1410d9ccb95d2e315847f5a0f09c Mon Sep 17 00:00:00 2001 +From: Anders Darander <[email protected]> +Date: Tue, 5 Apr 2011 20:24:54 +0200 +Subject: [PATCH] Add-NL_CFLAGS-to-libcommon + +Signed-off-by: Anders Darander <[email protected]> +--- + iplink/Makefile.am | 1 + + lib/Makefile.am | 1 + + src/Makefile.am | 4 ++-- + tests/Makefile.am | 2 +- + 4 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/iplink/Makefile.am b/iplink/Makefile.am +index bbed7ba..6e87ae0 100644 +--- a/iplink/Makefile.am ++++ b/iplink/Makefile.am +@@ -4,3 +4,4 @@ noinst_HEADERS = iplink.h + iproute_LTLIBRARIES = link_wpan.la + link_wpan_la_LDFLAGS = -module -avoid-version -shared + ++link_wpan_la_CFLAGS = $(NL_CFLAGS) -D_GNU_SOURCE +\ No newline at end of file +diff --git a/lib/Makefile.am b/lib/Makefile.am +index 5e15018..6936ebb 100644 +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -3,3 +3,4 @@ include $(top_srcdir)/Makefile.common + noinst_LTLIBRARIES = libcommon.la + libcommon_la_SOURCES = printbuf.c genl.c parse.c shash.c logging.c nl_policy.c + ++libcommon_la_CFLAGS = $(NL_CFLAGS) -D_GNU_SOURCE +diff --git a/src/Makefile.am b/src/Makefile.am +index 555e214..46c4017 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -20,11 +20,11 @@ iz_SOURCES = iz.c iz-common.c iz-mac.c iz-phy.c + noinst_HEADERS = iz.h + + izcoordinator_SOURCES = coordinator.c +-izcoordinator_CFLAGS = $(AM_CFLAGS) $(NL_CFLAGS) -DLEASE_FILE=\"$(leasefile)\" ++izcoordinator_CFLAGS = $(AM_CFLAGS) $(NL_CFLAGS) -DLEASE_FILE=\"$(leasefile)\" -D_GNU_SOURCE + izcoordinator_CFLAGS += -DPID_FILE=\"$(pidfile)\" + izcoordinator_LDADD = ../addrdb/libaddrdb.la $(LDADD) $(NL_LIBS) $(LEXLIB) + +-iz_CFLAGS = $(AM_CFLAGS) $(NL_CFLAGS) ++iz_CFLAGS = $(AM_CFLAGS) $(NL_CFLAGS) -D_GNU_SOURCE + iz_LDADD = $(LDADD) $(NL_LIBS) + + izattach.8: $(izattach_SOURCES) $(top_srcdir)/configure.ac +diff --git a/tests/Makefile.am b/tests/Makefile.am +index d491be5..00621ca 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -4,6 +4,6 @@ zbtest_PROGRAMS = listen-packet test test2 test3 test4 test5 test6 test7 gnl izl + + izlisten_SOURCES = listen.c + +-gnl_CFLAGS = $(AM_CFLAGS) $(NL_CFLAGS) ++gnl_CFLAGS = $(AM_CFLAGS) $(NL_CFLAGS) -D_GNU_SOURCE + gnl_LDADD = $(LDADD) $(NL_LIBS) + +-- +1.7.4.1 +
recipes/lowpan-tools/lowpan-tools.inc +2 -2
@@ -1,7 +1,7 @@ DESCRIPTION = "LoWPAN utilities (IEEE802.15.4)" LICENSE = "GPLv2" -DEPENDS = "libnl bison-native flex-native python-native" -INC_PR = "r11" +DEPENDS = "libnl1 bison-native flex-native python-native" +INC_PR = "r12" SRC_URI = "http://prdownloads.sourceforge.net/linux-zigbee/linux-zigbee-sources/${PV}/lowpan-tools-${PV}.tar.gz"
recipes/lowpan-tools/lowpan-tools_0.2.2.bb +5 -1
@@ -1,6 +1,10 @@ require lowpan-tools.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" + +SRC_URI_append = " \ + file://0001-Add-NL_CFLAGS-to-libcommon.patch \ + " EXTRA_OECONF = "--enable-ip-plugin"
Signature · 1 line
1.7.4.1
Re: [PATCH v2] lowpan-tools_0.2.2; : fix build with static libnl1
Hi,
I'm replying to my own mail...
This patch is intended for th org.openembedded.dev branch, as it requires the libnl -> libnl1 patch by Martin Jansa, wich is applied to that branch.
This to solves the problem of using lowpan-tools on a system which otherwise uses libnl2.
Quoted 3 lines · Anders Darander
* add
NL_CFLAGSto a few Makefiles.am
* git version not fixed
* build and runtime tested, although only in qemuarm
I forgot to mention that the difference between v2 and v1, is that I forgot to update PR in the first version. This is corrected in the current version.
I hope that this patch can be ACK'ed and pushed.
Regards,
Anders
Signature · 2 lines
Anders Darander ChargeStorm AB
Re: [PATCH v2] lowpan-tools_0.2.2; : fix build with static libnl1
In reply to Anders DaranderQuoted 1 line · Anders Darander
* add
NL_CFLAGSto a few Makefiles.am
look like adding -D_GNU_SOURCE not $(NL_CFLAGS) except iplink/Makefile.am and lib/Makefile.am, why was -D_GNU_SOURCE needed?
and lowpan-tools_0.2.2.bb gets PR bump from INC_PR, no need to bump .1 too.
but otherwise looks ok (I haven't tested it - never used lowpan-tools).
Regards,
Quoted 120 lines
* git version not fixed
* build and runtime tested, although only in qemuarmSigned-off-by Anders Darander <[email protected]>--- .../0001-Add-NL_CFLAGS-to-libcommon.patch | 65 ++++++++++++++++++++ recipes/lowpan-tools/lowpan-tools.inc | 4 +- recipes/lowpan-tools/lowpan-tools_0.2.2.bb | 6 ++- 3 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 recipes/lowpan-tools/lowpan-tools-0.2.2/0001-Add-NL_CFLAGS-to-libcommon.patchrecipes/lowpan-tools/lowpan-tools-0.2.2/0001-Add-NL_CFLAGS-to-libcommon.patch new file +65
-0@@ -0,0 +1,65 @@ +From 7fa435ea775b1410d9ccb95d2e315847f5a0f09c Mon Sep 17 00:00:00 2001 +From: Anders Darander <[email protected]> +Date: Tue, 5 Apr 2011 20:24:54 +0200 +Subject: [PATCH] Add-NL_CFLAGS-to-libcommon + +Signed-off-by: Anders Darander <[email protected]> +--- + iplink/Makefile.am | 1 + + lib/Makefile.am | 1 + + src/Makefile.am | 4 ++-- + tests/Makefile.am | 2 +- + 4 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/iplink/Makefile.am b/iplink/Makefile.am +index bbed7ba..6e87ae0 100644 +--- a/iplink/Makefile.am ++++ b/iplink/Makefile.am +@@ -4,3 +4,4 @@ noinst_HEADERS = iplink.h + iproute_LTLIBRARIES = link_wpan.la + link_wpan_la_LDFLAGS = -module -avoid-version -shared + ++link_wpan_la_CFLAGS = $(NL_CFLAGS) -D_GNU_SOURCE +\ No newline at end of file +diff --git a/lib/Makefile.am b/lib/Makefile.am +index 5e15018..6936ebb 100644 +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -3,3 +3,4 @@ include $(top_srcdir)/Makefile.common + noinst_LTLIBRARIES = libcommon.la + libcommon_la_SOURCES = printbuf.c genl.c parse.c shash.c logging.c nl_policy.c + ++libcommon_la_CFLAGS = $(NL_CFLAGS) -D_GNU_SOURCE +diff --git a/src/Makefile.am b/src/Makefile.am +index 555e214..46c4017 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -20,11 +20,11 @@ iz_SOURCES = iz.c iz-common.c iz-mac.c iz-phy.c + noinst_HEADERS = iz.h + + izcoordinator_SOURCES = coordinator.c +-izcoordinator_CFLAGS = $(AM_CFLAGS) $(NL_CFLAGS) -DLEASE_FILE=\"$(leasefile)\" ++izcoordinator_CFLAGS = $(AM_CFLAGS) $(NL_CFLAGS) -DLEASE_FILE=\"$(leasefile)\" -D_GNU_SOURCE + izcoordinator_CFLAGS += -DPID_FILE=\"$(pidfile)\" + izcoordinator_LDADD = ../addrdb/libaddrdb.la $(LDADD) $(NL_LIBS) $(LEXLIB) + +-iz_CFLAGS = $(AM_CFLAGS) $(NL_CFLAGS) ++iz_CFLAGS = $(AM_CFLAGS) $(NL_CFLAGS) -D_GNU_SOURCE + iz_LDADD = $(LDADD) $(NL_LIBS) + + izattach.8: $(izattach_SOURCES) $(top_srcdir)/configure.ac +diff --git a/tests/Makefile.am b/tests/Makefile.am +index d491be5..00621ca 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -4,6 +4,6 @@ zbtest_PROGRAMS = listen-packet test test2 test3 test4 test5 test6 test7 gnl izl + + izlisten_SOURCES = listen.c + +-gnl_CFLAGS = $(AM_CFLAGS) $(NL_CFLAGS) ++gnl_CFLAGS = $(AM_CFLAGS) $(NL_CFLAGS) -D_GNU_SOURCE + gnl_LDADD = $(LDADD) $(NL_LIBS) + +-- +1.7.4.1 +recipes/lowpan-tools/lowpan-tools.inc +2
-2@@ -1,7 +1,7 @@ DESCRIPTION = "LoWPAN utilities (IEEE802.15.4)" LICENSE = "GPLv2" -DEPENDS = "libnl bison-native flex-native python-native" -INC_PR = "r11" +DEPENDS = "libnl1 bison-native flex-native python-native" +INC_PR = "r12" SRC_URI = "http://prdownloads.sourceforge.net/linux-zigbee/linux-zigbee-sources/${PV}/lowpan-tools-${PV}.tar.gz"recipes/lowpan-tools/lowpan-tools_0.2.2.bb +5
-1@@ -1,6 +1,10 @@ require lowpan-tools.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" + +SRC_URI_append = " \ + file://0001-Add-NL_CFLAGS-to-libcommon.patch \ + " EXTRA_OECONF = "--enable-ip-plugin"Signature · 7 lines
1.7.4.1 _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Re: [PATCH v2] lowpan-tools_0.2.2; : fix build with static libnl1
Quoted 5 lines · Martin Jansa
Quoted 1 line · Anders Darander
* add
NL_CFLAGSto a few Makefiles.amlook like adding -D_GNU_SOURCE not $(NL_CFLAGS) except iplink/Makefile.am and
lib/Makefile.am, why was -D_GNU_SOURCE needed?
Hm, I should probably update that patch description to reflect that NL_CFLAGS is only added on a couple of places, while _GNU_SOURCE is added on a few more places.
-D_GNU_SOURCE was added as otherwise a struct, ucred if I remember correctly, was undefined. (I don't currently have access to that computer.)
Quoted 2 lines
and lowpan-tools_0.2.2.bb gets PR bump from
INC_PR, no need to bump .1 too.
Ok, I bumped PR in lowpan-tools_0.2.2.bb as I modified that file also...
Quoted 2 lines
but otherwise looks ok (I haven't tested it - never used lowpan-tools).
I'll try to make a somewhat better explanation in the included patch during the evening, and I can also remove the PR bump before submitting a third revision of the patch. Hopefully I can find some time this evening.
Regards,
Anders
Re: [PATCH v2] lowpan-tools_0.2.2; : fix build with static libnl1
Hello.
Quoted 17 lines · Anders Darander
Quoted 5 lines · Martin Jansa
Quoted 1 line · Anders Darander
* add
NL_CFLAGSto a few Makefiles.amlook like adding -D_GNU_SOURCE not $(NL_CFLAGS) except iplink/Makefile.am and
lib/Makefile.am, why was -D_GNU_SOURCE needed?Hm, I should probably update that patch description to reflect that
NL_CFLAGSis only added on a couple of places, while_GNU_SOURCEis added on a few more places.-D_GNU_SOURCE was added as otherwise a struct, ucred if I remember correctly, was undefined. (I don't currently have access to that computer.)
Quoted 2 lines
and lowpan-tools_0.2.2.bb gets PR bump from
INC_PR, no need to bump .1 too.
Quoted 6 lines
Ok, I bumped PR in lowpan-tools_0.2.2.bb as I modified that file also...
Quoted 2 lines
but otherwise looks ok (I haven't tested it - never used lowpan-tools).
I'll try to make a somewhat better explanation in the included patch during the evening, and I can also remove the PR bump before submitting a third revision of the patch. Hopefully I can find some time this evening.
Thanks for this. I will test your patch and push it out after this.
While I still want to get lowpan-tools fixed for libnl2 I think this is a good solution for the current releases.
regards
Stefan Schmidt
Re: [PATCH v2] lowpan-tools_0.2.2; : fix build with static libnl1
Hi,
Quoted 4 lines · Stefan Schmidt
Quoted 1 line · Anders Darander
I'll try to make a somewhat better explanation in the included patch during the evening, and I can also remove the PR bump before submitting a third revision of the patch. Hopefully I can find some time this evening.
Thanks for this. I will test your patch and push it out after this.
Thanks, I make sure to send a v3 this evening (at the latest tomorrow evening).
Quoted 2 lines
While I still want to get lowpan-tools fixed for libnl2 I think this is a good solution for the current releases.
Yes, I agree with you that the correct fix is to update lowpan-tools to use libnl2. However, due to time constraints, we opted for the interim solution.
Regards,
Anders
Re: [PATCH v2] lowpan-tools_0.2.2; : fix build with static libnl1
Hello.
Quoted 8 lines · Anders Darander
Quoted 4 lines · Stefan Schmidt
Quoted 1 line · Anders Darander
I'll try to make a somewhat better explanation in the included patch during the evening, and I can also remove the PR bump before submitting a third revision of the patch. Hopefully I can find some time this evening.
Thanks for this. I will test your patch and push it out after this.
Thanks, I make sure to send a v3 this evening (at the latest tomorrow evening).
Thanks
Quoted 6 lines
Quoted 2 lines
While I still want to get lowpan-tools fixed for libnl2 I think this is a good solution for the current releases.
Yes, I agree with you that the correct fix is to update lowpan-tools to use libnl2. However, due to time constraints, we opted for the interim solution.
Yup, no problem. I'm going to touch the ieee802154 kernel stack and maybe lowpan-tools the next weeks anyway I will try to squeeze in the change to libnl2.
regards
Stefan Schmidt
Re: [PATCH v2] lowpan-tools_0.2.2; : fix build with static libnl1
Hi,
A third version has just been posted.
Quoted 8 lines · Stefan Schmidt
Quoted 3 lines · Anders Darander
Yes, I agree with you that the correct fix is to update lowpan-tools to use libnl2. However, due to time constraints, we opted for the interim solution.
Yup, no problem. I'm going to touch the ieee802154 kernel stack and maybe lowpan-tools the next weeks anyway I will try to squeeze in the change to libnl2.
Good news, such a change will definitely be appreciated. We had the same idea, however, we won't be able to find the time for it for quite a while...
Regarding your work touching the ieee802154 kernel stack, is the version from the linux-zigbee-kernel tree? Or is it something getting mainlined? We are currently in a prototype phase, especially when it comes to zigbee, and both kernel version and additional kernel patches are open...
Regards,
Anders
Signature · 2 lines
Anders Darander ChargeStorm AB
Re: [PATCH v2] lowpan-tools_0.2.2; : fix build with static libnl1
Hello.
Quoted 17 lines · Anders Darander
A third version has just been posted.
Quoted 8 lines · Stefan Schmidt
Quoted 3 lines · Anders Darander
Yes, I agree with you that the correct fix is to update lowpan-tools to use libnl2. However, due to time constraints, we opted for the interim solution.
Yup, no problem. I'm going to touch the ieee802154 kernel stack and maybe lowpan-tools the next weeks anyway I will try to squeeze in the change to libnl2.
Good news, such a change will definitely be appreciated. We had the same idea, however, we won't be able to find the time for it for quite a while...
Quoted 5 lines
Regarding your work touching the ieee802154 kernel stack, is the version from the linux-zigbee-kernel tree? Or is it something getting mainlined? We are currently in a prototype phase, especially when it comes to zigbee, and both kernel version and additional kernel patches are open...
Taking this off list as it does not have anything to do with OE.
regards
Stefan Schmidt