Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] dhcpcd: fix build on old toolchains (sa_family_t)
@ 2015-01-02 16:39 Luca Ceresoli
  2015-01-02 16:39 ` [Buildroot] [PATCH 2/2] Revert "dhcpcd: blacklist Sourcery PowerPC toolchains" Luca Ceresoli
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Luca Ceresoli @ 2015-01-02 16:39 UTC (permalink / raw)
  To: buildroot

Fixes error such as:
  .../sysroot/usr/include/linux/netlink.h:31:2: error: unknown type name 'sa_family_t'
  .../sysroot/usr/include/linux/netlink.h:31:2: error: expected specifier-qualifier-list before 'sa_family_t'

And autobuild failures:
  http://autobuild.buildroot.net/results/d92/d92e7f2af0e64bc40f7b5c9ea081471de98bf8e8/
  http://autobuild.buildroot.net/results/e97/e97e980a2f1e0ff4138a6dc03d86ad3ff0973e4a/
  http://autobuild.buildroot.net/results/ca3/ca32c4de8b645c96cedb80b6270a792e9601ad84/

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 ...ix-missing-sa_familiy_t-on-old-toolchains.patch | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 package/dhcpcd/0001-Fix-missing-sa_familiy_t-on-old-toolchains.patch

diff --git a/package/dhcpcd/0001-Fix-missing-sa_familiy_t-on-old-toolchains.patch b/package/dhcpcd/0001-Fix-missing-sa_familiy_t-on-old-toolchains.patch
new file mode 100644
index 0000000..f518711
--- /dev/null
+++ b/package/dhcpcd/0001-Fix-missing-sa_familiy_t-on-old-toolchains.patch
@@ -0,0 +1,35 @@
+From da2b6a5180a9620e1011f52143512b69cd518bad Mon Sep 17 00:00:00 2001
+From: Luca Ceresoli <luca@lucaceresoli.net>
+Date: Tue, 30 Dec 2014 16:08:05 +0100
+Subject: [PATCH] Fix missing sa_familiy_t on old toolchains
+
+Fixes error such as:
+  .../sysroot/usr/include/linux/netlink.h:31:2: error: unknown type name 'sa_family_t'
+  .../sysroot/usr/include/linux/netlink.h:31:2: error: expected specifier-qualifier-list before 'sa_family_t'
+
+And autobuild failures:
+  http://autobuild.buildroot.net/results/d92/d92e7f2af0e64bc40f7b5c9ea081471de98bf8e8/
+  http://autobuild.buildroot.net/results/e97/e97e980a2f1e0ff4138a6dc03d86ad3ff0973e4a/
+  http://autobuild.buildroot.net/results/ca3/ca32c4de8b645c96cedb80b6270a792e9601ad84/
+
+Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
+
+---
+ configure | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure b/configure
+index f250d01..93919df 100755
+--- a/configure
++++ b/configure
+@@ -368,6 +368,7 @@ linux*)
+ 	echo "DHCPCD_SRCS+=	if-linux.c" >>$CONFIG_MK
+ 	# for RTM_NEWADDR and friends
+ 	echo "#include <asm/types.h> /* fix broken headers */" >>$CONFIG_H
++	echo "#include <sys/socket.h> /* for sa_family_t on old toolchains */" >>$CONFIG_H
+ 	echo "#include <linux/rtnetlink.h>" >>$CONFIG_H
+ 	;;
+ kfreebsd*)
+-- 
+1.9.1
+
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/2] Revert "dhcpcd: blacklist Sourcery PowerPC toolchains"
  2015-01-02 16:39 [Buildroot] [PATCH 1/2] dhcpcd: fix build on old toolchains (sa_family_t) Luca Ceresoli
@ 2015-01-02 16:39 ` Luca Ceresoli
  2015-01-02 18:11   ` Luca Ceresoli
  2015-01-02 18:11 ` [Buildroot] [PATCH 1/2] dhcpcd: fix build on old toolchains (sa_family_t) Luca Ceresoli
  2015-01-02 18:12 ` Thomas Petazzoni
  2 siblings, 1 reply; 6+ messages in thread
From: Luca Ceresoli @ 2015-01-02 16:39 UTC (permalink / raw)
  To: buildroot

This reverts commit dfbfa6ef00ed32127bf01f5b4f525889921c3006
("dhcpcd: blacklist Sourcery PowerPC toolchains").

Blacklisting those toolchains is not useful anymore, since a patch for
dhcpcd 6.6.7 fixed the issue.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 package/dhcpcd/Config.in | 2 --
 1 file changed, 2 deletions(-)

diff --git a/package/dhcpcd/Config.in b/package/dhcpcd/Config.in
index f2ca099..ca0ad75 100644
--- a/package/dhcpcd/Config.in
+++ b/package/dhcpcd/Config.in
@@ -2,8 +2,6 @@ config BR2_PACKAGE_DHCPCD
 	bool "dhcpcd"
 	# No support for AI_ADDRCONFIG
 	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2
-	# bad headers, no sa_family_t in linux/socket.h
-	depends on !(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 || BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009)
 	help
 	  An RFC2131 compliant DHCP client
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/2] dhcpcd: fix build on old toolchains (sa_family_t)
  2015-01-02 16:39 [Buildroot] [PATCH 1/2] dhcpcd: fix build on old toolchains (sa_family_t) Luca Ceresoli
  2015-01-02 16:39 ` [Buildroot] [PATCH 2/2] Revert "dhcpcd: blacklist Sourcery PowerPC toolchains" Luca Ceresoli
@ 2015-01-02 18:11 ` Luca Ceresoli
  2015-01-02 18:12 ` Thomas Petazzoni
  2 siblings, 0 replies; 6+ messages in thread
From: Luca Ceresoli @ 2015-01-02 18:11 UTC (permalink / raw)
  To: buildroot

Hi Baruch, All,

Luca Ceresoli wrote:
> Fixes error such as:
>    .../sysroot/usr/include/linux/netlink.h:31:2: error: unknown type name 'sa_family_t'
>    .../sysroot/usr/include/linux/netlink.h:31:2: error: expected specifier-qualifier-list before 'sa_family_t'
>
> And autobuild failures:
>    http://autobuild.buildroot.net/results/d92/d92e7f2af0e64bc40f7b5c9ea081471de98bf8e8/
>    http://autobuild.buildroot.net/results/e97/e97e980a2f1e0ff4138a6dc03d86ad3ff0973e4a/
>    http://autobuild.buildroot.net/results/ca3/ca32c4de8b645c96cedb80b6270a792e9601ad84/
>
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Ouch, this should be instead:
Cc: Baruch Siach <baruch@tkos.co.il>

Sorry, that was a silly copy-paste mistake!

-- 
Luca

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/2] Revert "dhcpcd: blacklist Sourcery PowerPC toolchains"
  2015-01-02 16:39 ` [Buildroot] [PATCH 2/2] Revert "dhcpcd: blacklist Sourcery PowerPC toolchains" Luca Ceresoli
@ 2015-01-02 18:11   ` Luca Ceresoli
  0 siblings, 0 replies; 6+ messages in thread
From: Luca Ceresoli @ 2015-01-02 18:11 UTC (permalink / raw)
  To: buildroot

Hi Baruch, All,

Luca Ceresoli wrote:
> This reverts commit dfbfa6ef00ed32127bf01f5b4f525889921c3006
> ("dhcpcd: blacklist Sourcery PowerPC toolchains").
>
> Blacklisting those toolchains is not useful anymore, since a patch for
> dhcpcd 6.6.7 fixed the issue.
>
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Ouch, this should be instead:
Cc: Baruch Siach <baruch@tkos.co.il>

Sorry, that was a silly copy-paste mistake!

-- 
Luca

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/2] dhcpcd: fix build on old toolchains (sa_family_t)
  2015-01-02 16:39 [Buildroot] [PATCH 1/2] dhcpcd: fix build on old toolchains (sa_family_t) Luca Ceresoli
  2015-01-02 16:39 ` [Buildroot] [PATCH 2/2] Revert "dhcpcd: blacklist Sourcery PowerPC toolchains" Luca Ceresoli
  2015-01-02 18:11 ` [Buildroot] [PATCH 1/2] dhcpcd: fix build on old toolchains (sa_family_t) Luca Ceresoli
@ 2015-01-02 18:12 ` Thomas Petazzoni
  2015-01-02 21:56   ` Luca Ceresoli
  2 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2015-01-02 18:12 UTC (permalink / raw)
  To: buildroot

Dear Luca Ceresoli,

On Fri,  2 Jan 2015 17:39:04 +0100, Luca Ceresoli wrote:
> Fixes error such as:
>   .../sysroot/usr/include/linux/netlink.h:31:2: error: unknown type name 'sa_family_t'
>   .../sysroot/usr/include/linux/netlink.h:31:2: error: expected specifier-qualifier-list before 'sa_family_t'
> 
> And autobuild failures:
>   http://autobuild.buildroot.net/results/d92/d92e7f2af0e64bc40f7b5c9ea081471de98bf8e8/
>   http://autobuild.buildroot.net/results/e97/e97e980a2f1e0ff4138a6dc03d86ad3ff0973e4a/
>   http://autobuild.buildroot.net/results/ca3/ca32c4de8b645c96cedb80b6270a792e9601ad84/
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

But if it's actually the toolchain that is broken, should we instead
have a patch against the toolchain headers? There are other packages
that had similar problems with these toolchains.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/2] dhcpcd: fix build on old toolchains (sa_family_t)
  2015-01-02 18:12 ` Thomas Petazzoni
@ 2015-01-02 21:56   ` Luca Ceresoli
  0 siblings, 0 replies; 6+ messages in thread
From: Luca Ceresoli @ 2015-01-02 21:56 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

Thomas Petazzoni wrote:
> Dear Luca Ceresoli,
>
> On Fri,  2 Jan 2015 17:39:04 +0100, Luca Ceresoli wrote:
>> Fixes error such as:
>>    .../sysroot/usr/include/linux/netlink.h:31:2: error: unknown type name 'sa_family_t'
>>    .../sysroot/usr/include/linux/netlink.h:31:2: error: expected specifier-qualifier-list before 'sa_family_t'
>>
>> And autobuild failures:
>>    http://autobuild.buildroot.net/results/d92/d92e7f2af0e64bc40f7b5c9ea081471de98bf8e8/
>>    http://autobuild.buildroot.net/results/e97/e97e980a2f1e0ff4138a6dc03d86ad3ff0973e4a/
>>    http://autobuild.buildroot.net/results/ca3/ca32c4de8b645c96cedb80b6270a792e9601ad84/
>>
>> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
>> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
>
> But if it's actually the toolchain that is broken, should we instead
> have a patch against the toolchain headers? There are other packages
> that had similar problems with these toolchains.

Honestly I don't know. A few days ago I had the same problem with
dhcpcd 6.6.7 and a pretty old custom toolchain. The issue only emerged
since dhcpcd 6.6.6 (BWHAHAHA!). Changing toolchain was not an option
here, so I came up with this quick fix.

When I saw Baruch's patch today on the list I thought I'd propose my
patch. Maybe I was too quick and should have asked before sending...

At least my solution (o workaround, or whatever) is in the archives,
and anybody with the same problem can find this workaround until a
better solution is available.

-- 
Luca

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-02 21:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-02 16:39 [Buildroot] [PATCH 1/2] dhcpcd: fix build on old toolchains (sa_family_t) Luca Ceresoli
2015-01-02 16:39 ` [Buildroot] [PATCH 2/2] Revert "dhcpcd: blacklist Sourcery PowerPC toolchains" Luca Ceresoli
2015-01-02 18:11   ` Luca Ceresoli
2015-01-02 18:11 ` [Buildroot] [PATCH 1/2] dhcpcd: fix build on old toolchains (sa_family_t) Luca Ceresoli
2015-01-02 18:12 ` Thomas Petazzoni
2015-01-02 21:56   ` Luca Ceresoli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox