Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM support for Cilium #1104

Closed
scanf opened this Issue Jul 11, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@scanf
Copy link
Contributor

scanf commented Jul 11, 2017

There is probably more issues to address, but some of the ones I noticed / potential

  • New Docker images for ARM
  • Fix any ARM specific issues from the Go vendor dependencies.
  • Fix header issues, for example gnu/stubs-32.h.

@scanf scanf changed the title Add ARM support for Cilium ARM support for Cilium Jul 11, 2017

@scanf

This comment has been minimized.

Copy link
Contributor Author

scanf commented Jul 11, 2017

Just tried to run on packet.net (machine Type 2A) using Ubuntu 17.04.
Some issues observed

  • The Go project does not offer a aarch64 binary, so needed
    to compile Go. Which took some minutes.
  • The docker install script at https://get.docker.com does not support aarch64,
    but not big issue since local package manager.
  • Compile errors, see output below. Not sure how to fix these since gcc-multilib has no install candidate.
clang -DUNKNOWN -Iinclude -D__NR_CPUS__=96 -O2 -target bpf -I. -Wall -Werror -Wno-address-of-packed-member -Wno-unknown-warning-option -c bpf_lxc.c -o /dev/null;  clang -DDROP_ALL -Iinclude -D__NR_CPUS__=96 -O2 -target bpf -I. -Wall -Werror -Wno-address-of-packed-member -Wno-unknown-warning-option -c bpf_lxc.c -o /dev/null;
In file included from bpf_lxc.c:23:
In file included from include/bpf/api.h:11:
In file included from include/linux/type_mapper.h:4:
In file included from /usr/lib/llvm-4.0/bin/../lib/clang/4.0.0/include/stdint.h:61:
In file included from /usr/include/stdint.h:25:
/usr/include/features.h:364:12: fatal error: 'sys/cdefs.h' file not found
#  include <sys/cdefs.h>
           ^~~~~~~~~~~~~
1 error generated.
In file included from bpf_lxc.c:23:
In file included from include/bpf/api.h:11:
In file included from include/linux/type_mapper.h:4:
In file included from /usr/lib/llvm-4.0/bin/../lib/clang/4.0.0/include/stdint.h:61:
In file included from /usr/include/stdint.h:25:
/usr/include/features.h:364:12: fatal error: 'sys/cdefs.h' file not found
#  include <sys/cdefs.h>
           ^~~~~~~~~~~~~
1 error generated.
Makefile:40: recipe for target 'bpf_lxc.o' failed
make[1]: *** [bpf_lxc.o] Error 1
make[1]: Leaving directory '/root/opt/og/src/github.com/cilium/cilium/bpf'
Makefile:10: recipe for target 'bpf' failed
make: *** [bpf] Error 2
@scanf

This comment has been minimized.

Copy link
Contributor Author

scanf commented Dec 26, 2017

Tried reproducing the steps again on armv7l but seeing different error this time

# github.com/cilium/cilium/pkg/proxy
../pkg/proxy/proxy.go:43:2: constant 4277796864 overflows int
../pkg/proxy/proxy.go:44:2: constant 4277862400 overflows int
@scanf

This comment has been minimized.

Copy link
Contributor Author

scanf commented Dec 26, 2017

Just to see if it would otherwise compile applied

diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go
index 904cce464d9f..cd3226587aa2 100644
--- a/pkg/proxy/proxy.go
+++ b/pkg/proxy/proxy.go
@@ -40,8 +40,8 @@ var log = logging.DefaultLogger
 // the packet is coming from a proxy at ingress or egress. The lower 16 bits
 // can be used to carry the security identity.
 const (
-       magicMarkIngress int = 0xFEFA << 16
-       magicMarkEgress  int = 0xFEFB << 16
+       magicMarkIngress int = 0xFEFA << 8
+       magicMarkEgress  int = 0xFEFB << 8
 )

 // field names used while logging
@scanf

This comment has been minimized.

Copy link
Contributor Author

scanf commented Dec 26, 2017

Next failure is

msg="linking environment: NOT OK, please make sure you have 'glibc-devel.i686' if you use fedora system or 'libc6-dev-i386' if you use ubuntu system"

@scanf scanf self-assigned this Jan 4, 2018

@tgraf tgraf unassigned scanf Jul 2, 2018

@tgraf tgraf closed this Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.