Skip to contentSkip to conversation

package/softether: Fix build error on ARC

PATCH New Bernd Kuhls 3 participants 5 messages Apr 2, 2015 – Apr 3, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/softether: Fix build error on ARC

ifaddrs.h is not included in the toolchain, this patch informs softether about this.

Fixes
http://autobuild.buildroot.net/results/199/19992951da34a703a476dc62ea92e12927c8a02d/
http://autobuild.buildroot.net/results/fa7/fa77579aa6502ef1d84976d355637513f38c39c9/
http://autobuild.buildroot.net/results/ec8/ec853d4b8d8e91d6d3cdb46bcc15a400d2fcd5d8/
http://autobuild.buildroot.net/results/e13/e13ee90bd15a7bba99b3c54de596c8fcb14e60c0/

---
 package/softether/0007-arc.patch |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 package/softether/0007-arc.patch
package/softether/0007-arc.patch new file +20 -0
new file mode 100644
index 0000000..c2acd40
@@ -0,0 +1,20 @@
+Fix ARC build
+
+../../src/Mayaqua/Mayaqua.h:289:21: fatal error: ifaddrs.h: No such file or directory
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+
+--- a/src/Mayaqua/Mayaqua.h.org	2015-04-02 21:52:44.911083674 +0200
++++ b/src/Mayaqua/Mayaqua.h	2015-04-02 21:51:52.075081069 +0200
+@@ -235,9 +235,11 @@
+ #ifdef	OS_UNIX
+ #ifndef	UNIX_SOLARIS
+ #ifndef	CPU_SH4
++#ifndef	__arc__
+ // Getifaddrs system call is supported on UNIX other than Solaris.
+ // However, it is not supported also by the Linux on SH4 CPU
+ #define	MAYAQUA_SUPPORTS_GETIFADDRS
++#endif	// __arc__
+ #endif	// CPU_SH4
+ #endif	// UNIX_SOLARIS
+ #endif	// OS_UNIX
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/2 package/softether: bump version

---
 package/softether/softether.mk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/softether/softether.mk +1 -1
index d73d33c..17a450f 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-SOFTETHER_VERSION = 64fd19e6f849247e3daee765ad278c6bf072afcb
+SOFTETHER_VERSION = 18b120e5f747a84d26302ec706f6c1c91d642ace
 SOFTETHER_SITE = $(call github,SoftEtherVPN,SoftEtherVPN,$(SOFTETHER_VERSION))
 SOFTETHER_PATCH = \
 	https://github.com/dajhorn/SoftEtherVPN/commit/c5e5d7e93c6f3302adf5821c29c4efdb7630e418.patch \
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 2/2 package/softether: bump version

Dear Bernd Kuhls,

Quoted 5 lines · Bernd Kuhls
---
 package/softether/softether.mk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks!

Thomas

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

PATCH 1/2 package/softether: Fix build error on ARC

In reply to Bernd Kuhls
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Bernd" == Bernd Kuhls <[email protected]> writes:

ifaddrs.h is not included in the toolchain, this patch informs softether about this. Fixes
http://autobuild.buildroot.net/results/199/19992951da34a703a476dc62ea92e12927c8a02d/
http://autobuild.buildroot.net/results/fa7/fa77579aa6502ef1d84976d355637513f38c39c9/
http://autobuild.buildroot.net/results/ec8/ec853d4b8d8e91d6d3cdb46bcc15a400d2fcd5d8/
http://autobuild.buildroot.net/results/e13/e13ee90bd15a7bba99b3c54de596c8fcb14e60c0/

Hmm, I wanted to apply both patches, but the patch doesn't seem to apply (dos/unix newlines issue perhaps?)

Applying 0007-arc.patch using patch:
patching file src/Mayaqua/Mayaqua.h
Hunk #1 FAILED at 235 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/Mayaqua/Mayaqua.h.rej Patch failed! Please fix 0007-arc.patch!

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

PATCH 1/2 package/softether: Fix build error on ARC

In reply to Bernd Kuhls

Dear Bernd Kuhls,

Quoted 7 lines · Bernd Kuhls

+--- a/src/Mayaqua/Mayaqua.h.org 2015-04-02 21:52:44.911083674 +0200
++++ b/src/Mayaqua/Mayaqua.h 2015-04-02 21:51:52.075081069 +0200
+@@ -235,9 +235,11 @@
+ #ifdef OS_UNIX
+ #ifndef UNIX_SOLARIS
+ #ifndef CPU_SH4
++#ifndef __arc__

This is not the correct fix. The fact that the toolchain used in the build tests that failed does not have ifaddrs support is completely unrelated to the fact that it's an ARC toolchain.

It's simply because this specific toolchain is an external toolchain that doesn't have the ifaddrs support. The internal ARC toolchain will have ifaddrs support, and other external toolchains may not have it.

So the right fix is to actually test whether ifaddrs support is available or not. I've pushed a fix that implements this (hopefully correctly) :

http://git.buildroot.net/buildroot/commit/?id=d9cf0a76db5e428692f2489901c9787b1fd30eee

Thanks,

Thomas

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