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

Doesn't build on armhf #6

Closed
sokoow opened this issue Feb 6, 2016 · 9 comments
Closed

Doesn't build on armhf #6

sokoow opened this issue Feb 6, 2016 · 9 comments

Comments

@sokoow
Copy link

sokoow commented Feb 6, 2016

I'm getting a following when trying to build on armhf:

go build ./apps/docker-slim
# github.com/cloudimmunity/system
../system/system_linux.go:24: cannot use unameInfo.Sysname (type [65]uint8) as type [65]int8 in argument to nativeCharsToString
../system/system_linux.go:25: cannot use unameInfo.Nodename (type [65]uint8) as type [65]int8 in argument to nativeCharsToString
../system/system_linux.go:26: cannot use unameInfo.Release (type [65]uint8) as type [65]int8 in argument to nativeCharsToString
../system/system_linux.go:27: cannot use unameInfo.Version (type [65]uint8) as type [65]int8 in argument to nativeCharsToString
../system/system_linux.go:28: cannot use unameInfo.Machine (type [65]uint8) as type [65]int8 in argument to nativeCharsToString
../system/system_linux.go:29: cannot use unameInfo.Domainname (type [65]uint8) as type [65]int8 in argument to nativeCharsToString
@kcq
Copy link
Member

kcq commented Feb 6, 2016

Sorry about that! And thank you for trying to build it on a new platform! Do you have a netbook? Can you share a bit more about your environment?

@sokoow
Copy link
Author

sokoow commented Feb 6, 2016

Sure,

I have armhf all over the place : Chromebook 2 arm and odroid-U3 platforms, all running ubuntu 15.10 and go 1.5.1. Can't beat 9 hours of battery on chromebook :D

@kcq
Copy link
Member

kcq commented Feb 7, 2016

This is due to architecture differences... These tickets (in Go and Docker) provide a good overview: golang/go#13318 , moby/moby#18064 Doing the same thing Docker did should fix it :)

The syscall/seccomp functionality needs enhancements to support ARM architectures... That needs to be done in the "system" library (which covers only ArchName386 and ArchNameAmd64 at this point in time).

@kcq
Copy link
Member

kcq commented Feb 7, 2016

This should be fixed, but there are a couple of other arm build errors that need to be addressed too:

docker-slim/sensor/monitors/fanotify/monitor.go:30: nd.Mark undefined (type *fanotify.NotifyFD has no field or method Mark)

docker-slim/sensor/monitors/ptrace/monitor.go:91: regs.Orig_rax undefined (type syscall.PtraceRegs has no field or method Orig_rax)

docker-slim/sensor/monitors/ptrace/monitor.go:99: regs.Rax undefined (type syscall.PtraceRegs has no field or method Rax)

@vanloswang
Copy link

@kcq @sokoow
docker-slim/sensor/monitors/fanotify/monitor.go:30: nd.Mark undefined (type *fanotify.NotifyFD has no field or method Mark)
caused by missing bitbucket.org/madmo/fanotify/fanotify_arm.go or bitbucket.org/madmo/fanotify/fanotify_arm64.go

docker-slim/sensor/monitors/ptrace/monitor.go:91: regs.Orig_rax undefined (type syscall.PtraceRegs has no field or method Orig_rax)

docker-slim/sensor/monitors/ptrace/monitor.go:99: regs.Rax undefined (type syscall.PtraceRegs has no field or method Rax)

I did not found a solution now.

@kcq
Copy link
Member

kcq commented Aug 10, 2017

Moving ARM support to the Wishlist. Ping me if you want to help :-)

@kcq kcq closed this as completed Aug 10, 2017
@0xD8C4A475
Copy link

Ping? :)

@jishminor
Copy link

I have built and tested out dockerslim on armhf, but had a make a few changes specific to the arm architecture in the ptrace module, as well as some of the packages in the vendor directory. Do you have any regression tests suites to run to ensure that nothing has broken for the x86 builds?

@kcq
Copy link
Member

kcq commented Apr 13, 2019

Thank you for working on this Josh! This is great! There's no automated regression test suite at this point in time, but there's a set of sample applications you can minify and confirm everything is still working. The examples are now in a separate repo ( https://github.com/docker-slim/examples ). Checking if the minified ruby_ubuntu, ruby_rails_standard, ruby_alpine, python_alpine and python_centos7_py27_standard apps work is a good way to confirm. I'll be happy to help with the process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants