Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Cross-compiling fails from 64-bit linux to arm linux #142

Closed
nuclearsandwich opened this issue Jan 17, 2017 · 8 comments
Closed

Cross-compiling fails from 64-bit linux to arm linux #142

nuclearsandwich opened this issue Jan 17, 2017 · 8 comments

Comments

@nuclearsandwich
Copy link

I get the following output when trying to create a buffalo build for another target using

env GOOS=linux GOARCH=arm GOARM=7 buffalo build

https://gist.github.com/nuclearsandwich/a429552a22420939ca7ad1951d924b2e

I'm pretty green so it could very well be user error with the compiler toolchain but I also don't know how to get more info beyond Error: exit status 2.

Thanks!

@cdrx
Copy link

cdrx commented Jan 18, 2017

I get the same error when attempting to build a linux binary from a Mac

@markbates
Copy link
Member

I haven't had a chance to run this yet. I build Linux binaries no problem, but not arm. My gut says it's an arm/SQLite issue judging by the output. I'm traveling so I haven't been able to run the exact same command yet. I'll post when I do.

@cdrx
Copy link

cdrx commented Jan 18, 2017

Do Linux binaries build for you, from a Mac?

@markbates
Copy link
Member

Yes, but I haven't tried arm yet. I think it's a problem with arm and SQLite. But not sure.

@markbates
Copy link
Member

I've worked the maintainer of the sqlite driver, and helped him fix the build issues.

See mattn/go-sqlite3#374 and mattn/go-sqlite3#372

If you do a go get -u github.com/mattn/go-sqlite3 this issue should be fixed.

If someone else could test, I've tested locally, but I don't like to close until a 3rd party has confirmed.

@cdrx
Copy link

cdrx commented Jan 18, 2017

Thanks! That fixed my problem building linux binaries from the Mac

@markbates
Copy link
Member

Woot!! Yay!!

@nuclearsandwich
Copy link
Author

Yes, but I haven't tried arm yet. I think it's a problem with arm and SQLite. But not sure.

I did some additional digging last night and found the same thing, I was lacking gcc compilers for my target ARM platform, rectifying that fixed the build issue, which I think means the overall issue here is closed, but I wonder if it's possible to get better feedback from buffalo build as I figured this out by running

env GOARM=7 GOARCH=arm GOOS=linux go build
# github.com/mattn/go-sqlite3
../github.com/mattn/go-sqlite3/tracecallback_noimpl.go:39: undefined: Error

Then guessing from there.

As a secondary issue, when I got the built binary to my target platform (Raspberry Pi 3) it couldn't find the assets. Some poking around after that revealed that the initial go get -u github.com/gobuffalo/buffalo/buffalo didn't install the rice command line tool.

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

No branches or pull requests

3 participants