* [Buildroot] [PATCH 1/2] iproute2: fix no-thread build
@ 2016-08-05 17:07 Thomas Petazzoni
2016-08-05 17:08 ` [Buildroot] [PATCH 2/2] iproute2: use @D instead of IPROUTE2_DIR Thomas Petazzoni
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2016-08-05 17:07 UTC (permalink / raw)
To: buildroot
iproute2 believes that it needs to link with libpthread for its arpd
binary, because "some db implementations require thread". Therefore, our
iproute2.mk explicitly disables the build of arpd when thread support is
not available.
However, the sed expression it uses no longer works. The Makefile used
to look like:
TARGETS = foo baz baz arpd foobar
so replacing " arpd " with a space was working fine. However, the
Makefile got changed in iproute2 to:
ifeq (... berkeleydb available ...)
TARGETS += arpd
endif
i.e, with no space at the end of the line. This made our sed expression
ineffective, causing build issues with no-thread configurations since
arpd was no longer disabled.
To address this, instead of sed-ing the Makefile, we overwrite the
berkeleydb detection of iproute2, by writing to the "Config" file, like
we're doing for other aspects of the package.
Fixes:
http://autobuild.buildroot.net/results/03a37a2372a4c2e438a073e015c49d9e554b86b7/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/iproute2/iproute2.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/iproute2/iproute2.mk b/package/iproute2/iproute2.mk
index 91d5033..edc17ad 100644
--- a/package/iproute2/iproute2.mk
+++ b/package/iproute2/iproute2.mk
@@ -42,7 +42,7 @@ ifeq ($(BR2_PACKAGE_BERKELEYDB_COMPAT185)$(BR2_TOOLCHAIN_HAS_THREADS),yy)
IPROUTE2_DEPENDENCIES += berkeleydb
else
define IPROUTE2_DISABLE_ARPD
- $(SED) "/^TARGETS=/s: arpd : :" $(IPROUTE2_DIR)/misc/Makefile
+ echo "HAVE_BERKELEY_DB:=n" >> $(IPROUTE2_DIR)/Config
endef
endif
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] iproute2: use @D instead of IPROUTE2_DIR
2016-08-05 17:07 [Buildroot] [PATCH 1/2] iproute2: fix no-thread build Thomas Petazzoni
@ 2016-08-05 17:08 ` Thomas Petazzoni
2016-08-07 20:20 ` Yann E. MORIN
2016-08-07 20:17 ` [Buildroot] [PATCH 1/2] iproute2: fix no-thread build Yann E. MORIN
2016-08-07 21:05 ` Thomas Petazzoni
2 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2016-08-05 17:08 UTC (permalink / raw)
To: buildroot
We more generally use $(@D) instead of $(pkg_DIR) to refer to the
package source directory, so this commit updates iproute2 to also use
$(@D) everywhere.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/iproute2/iproute2.mk | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/package/iproute2/iproute2.mk b/package/iproute2/iproute2.mk
index edc17ad..09e68c5 100644
--- a/package/iproute2/iproute2.mk
+++ b/package/iproute2/iproute2.mk
@@ -27,13 +27,13 @@ ifeq ($(BR2_PACKAGE_IPTABLES)x$(BR2_STATIC_LIBS),yx)
IPROUTE2_DEPENDENCIES += iptables
define IPROUTE2_WITH_IPTABLES
# Makefile is busted so it never passes IPT_LIB_DIR properly
- $(SED) "s/-DIPT/-DXT/" $(IPROUTE2_DIR)/tc/Makefile
+ $(SED) "s/-DIPT/-DXT/" $(@D)/tc/Makefile
endef
else
define IPROUTE2_WITH_IPTABLES
# em_ipset needs xtables, but configure misdetects it
- echo "TC_CONFIG_IPSET:=n" >>$(IPROUTE2_DIR)/Config
- echo "TC_CONFIG_XT:=n" >>$(IPROUTE2_DIR)/Config
+ echo "TC_CONFIG_IPSET:=n" >>$(@D)/Config
+ echo "TC_CONFIG_XT:=n" >>$(@D)/Config
endef
endif
@@ -42,7 +42,7 @@ ifeq ($(BR2_PACKAGE_BERKELEYDB_COMPAT185)$(BR2_TOOLCHAIN_HAS_THREADS),yy)
IPROUTE2_DEPENDENCIES += berkeleydb
else
define IPROUTE2_DISABLE_ARPD
- echo "HAVE_BERKELEY_DB:=n" >> $(IPROUTE2_DIR)/Config
+ echo "HAVE_BERKELEY_DB:=n" >> $(@D)/Config
endef
endif
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] iproute2: fix no-thread build
2016-08-05 17:07 [Buildroot] [PATCH 1/2] iproute2: fix no-thread build Thomas Petazzoni
2016-08-05 17:08 ` [Buildroot] [PATCH 2/2] iproute2: use @D instead of IPROUTE2_DIR Thomas Petazzoni
@ 2016-08-07 20:17 ` Yann E. MORIN
2016-08-07 21:05 ` Thomas Petazzoni
2 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2016-08-07 20:17 UTC (permalink / raw)
To: buildroot
Thomas, All,
On 2016-08-05 19:07 +0200, Thomas Petazzoni spake thusly:
> iproute2 believes that it needs to link with libpthread for its arpd
> binary, because "some db implementations require thread". Therefore, our
> iproute2.mk explicitly disables the build of arpd when thread support is
> not available.
>
> However, the sed expression it uses no longer works. The Makefile used
> to look like:
>
> TARGETS = foo baz baz arpd foobar
>
> so replacing " arpd " with a space was working fine. However, the
> Makefile got changed in iproute2 to:
>
> ifeq (... berkeleydb available ...)
> TARGETS += arpd
> endif
>
> i.e, with no space at the end of the line. This made our sed expression
> ineffective, causing build issues with no-thread configurations since
> arpd was no longer disabled.
>
> To address this, instead of sed-ing the Makefile, we overwrite the
> berkeleydb detection of iproute2, by writing to the "Config" file, like
> we're doing for other aspects of the package.
>
> Fixes:
>
> http://autobuild.buildroot.net/results/03a37a2372a4c2e438a073e015c49d9e554b86b7/
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Regards,
Yann E. MORIN.
> ---
> package/iproute2/iproute2.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/iproute2/iproute2.mk b/package/iproute2/iproute2.mk
> index 91d5033..edc17ad 100644
> --- a/package/iproute2/iproute2.mk
> +++ b/package/iproute2/iproute2.mk
> @@ -42,7 +42,7 @@ ifeq ($(BR2_PACKAGE_BERKELEYDB_COMPAT185)$(BR2_TOOLCHAIN_HAS_THREADS),yy)
> IPROUTE2_DEPENDENCIES += berkeleydb
> else
> define IPROUTE2_DISABLE_ARPD
> - $(SED) "/^TARGETS=/s: arpd : :" $(IPROUTE2_DIR)/misc/Makefile
> + echo "HAVE_BERKELEY_DB:=n" >> $(IPROUTE2_DIR)/Config
> endef
> endif
>
> --
> 2.7.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] iproute2: use @D instead of IPROUTE2_DIR
2016-08-05 17:08 ` [Buildroot] [PATCH 2/2] iproute2: use @D instead of IPROUTE2_DIR Thomas Petazzoni
@ 2016-08-07 20:20 ` Yann E. MORIN
0 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2016-08-07 20:20 UTC (permalink / raw)
To: buildroot
Thomas, All,
On 2016-08-05 19:08 +0200, Thomas Petazzoni spake thusly:
> We more generally use $(@D) instead of $(pkg_DIR) to refer to the
> package source directory, so this commit updates iproute2 to also use
> $(@D) everywhere.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Regards,
Yann E. MORIN.
> ---
> package/iproute2/iproute2.mk | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/package/iproute2/iproute2.mk b/package/iproute2/iproute2.mk
> index edc17ad..09e68c5 100644
> --- a/package/iproute2/iproute2.mk
> +++ b/package/iproute2/iproute2.mk
> @@ -27,13 +27,13 @@ ifeq ($(BR2_PACKAGE_IPTABLES)x$(BR2_STATIC_LIBS),yx)
> IPROUTE2_DEPENDENCIES += iptables
> define IPROUTE2_WITH_IPTABLES
> # Makefile is busted so it never passes IPT_LIB_DIR properly
> - $(SED) "s/-DIPT/-DXT/" $(IPROUTE2_DIR)/tc/Makefile
> + $(SED) "s/-DIPT/-DXT/" $(@D)/tc/Makefile
> endef
> else
> define IPROUTE2_WITH_IPTABLES
> # em_ipset needs xtables, but configure misdetects it
> - echo "TC_CONFIG_IPSET:=n" >>$(IPROUTE2_DIR)/Config
> - echo "TC_CONFIG_XT:=n" >>$(IPROUTE2_DIR)/Config
> + echo "TC_CONFIG_IPSET:=n" >>$(@D)/Config
> + echo "TC_CONFIG_XT:=n" >>$(@D)/Config
> endef
> endif
>
> @@ -42,7 +42,7 @@ ifeq ($(BR2_PACKAGE_BERKELEYDB_COMPAT185)$(BR2_TOOLCHAIN_HAS_THREADS),yy)
> IPROUTE2_DEPENDENCIES += berkeleydb
> else
> define IPROUTE2_DISABLE_ARPD
> - echo "HAVE_BERKELEY_DB:=n" >> $(IPROUTE2_DIR)/Config
> + echo "HAVE_BERKELEY_DB:=n" >> $(@D)/Config
> endef
> endif
>
> --
> 2.7.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] iproute2: fix no-thread build
2016-08-05 17:07 [Buildroot] [PATCH 1/2] iproute2: fix no-thread build Thomas Petazzoni
2016-08-05 17:08 ` [Buildroot] [PATCH 2/2] iproute2: use @D instead of IPROUTE2_DIR Thomas Petazzoni
2016-08-07 20:17 ` [Buildroot] [PATCH 1/2] iproute2: fix no-thread build Yann E. MORIN
@ 2016-08-07 21:05 ` Thomas Petazzoni
2 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2016-08-07 21:05 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 5 Aug 2016 19:07:59 +0200, Thomas Petazzoni wrote:
> iproute2 believes that it needs to link with libpthread for its arpd
> binary, because "some db implementations require thread". Therefore, our
> iproute2.mk explicitly disables the build of arpd when thread support is
> not available.
>
> However, the sed expression it uses no longer works. The Makefile used
> to look like:
>
> TARGETS = foo baz baz arpd foobar
>
> so replacing " arpd " with a space was working fine. However, the
> Makefile got changed in iproute2 to:
>
> ifeq (... berkeleydb available ...)
> TARGETS += arpd
> endif
>
> i.e, with no space at the end of the line. This made our sed expression
> ineffective, causing build issues with no-thread configurations since
> arpd was no longer disabled.
>
> To address this, instead of sed-ing the Makefile, we overwrite the
> berkeleydb detection of iproute2, by writing to the "Config" file, like
> we're doing for other aspects of the package.
>
> Fixes:
>
> http://autobuild.buildroot.net/results/03a37a2372a4c2e438a073e015c49d9e554b86b7/
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> package/iproute2/iproute2.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Both patches applied.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-08-07 21:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-05 17:07 [Buildroot] [PATCH 1/2] iproute2: fix no-thread build Thomas Petazzoni
2016-08-05 17:08 ` [Buildroot] [PATCH 2/2] iproute2: use @D instead of IPROUTE2_DIR Thomas Petazzoni
2016-08-07 20:20 ` Yann E. MORIN
2016-08-07 20:17 ` [Buildroot] [PATCH 1/2] iproute2: fix no-thread build Yann E. MORIN
2016-08-07 21:05 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox