-
Notifications
You must be signed in to change notification settings - Fork 51
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
Build for ARM (e.g. Raspberry PI ) #4
Comments
Hi dtrehas, I'm not familiar with ARM but I think it will be hard to compile wxGo on a Raspberry PI considering its limited performance. Perhaps we can cross-compile it. However I'm not sure whether it will work, because I have no experience on cross-compiling a Go program. |
Hi dontpanic92, first of all GREAT WORK 👍 thanks for sharing Regarding cross compilation, it is quite beautiful and builtin in golang, this post from Dave Cheney shows it very well. here is a little example # Let's say that hello.go prints "hello world". I'm on 64bit OSX
$ go build hello.go # compiles binary hello for my system
$ file hello # checking binary type
hello: Mach-O 64-bit executable x86_64 # OK, it's mine
# now let's cross compile to linux arm
$ export GOOS=linux # I set 'linux as target OS'
$ export GOARCH=arm # I set 'arm as target architecture'
$ go build hello.go # this time will cross-compile
$ file hello # checking binary type
hello: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped
# arm ! Regarding this specific project, cross-compiling this library to ARM, I guess that some specific architecture-specific assets will be required for the SWIG, wxWidget toolchain to compile. (a file setup_linux_arm.go ?) I might have time to take a look in the following weeks. In that case will post updates here. cheers |
@neonsoftware Yes, you are right. First of all we need a wxWidgets for arm, and after that the |
Yep 👍 I'll grab my arm board and try to compile the static wxWidgets libraries for arm |
@dontpanic92 did you have to manually set the static libraries to be PIC enabled with -fPIC ? Having that sort of error at first attempt of go get on ARM with the new libraries ... /usr/bin/ld: ./linux_arm/lib/libwx_gtk2u_aui-3.1.a(auilib_framemanager.o): relocation R_ARM_THM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC update: apparently yes, must be explicitly set, according to here and here |
been out for a week, will get back to it in the next days |
Dear Sir,
Your work is amazing.
Do you have any idea how this could be compiled in ARM?
Thank you in advance.
The text was updated successfully, but these errors were encountered: