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

Building CouchDB on arm64-v8a #892

Closed
VladimirCores opened this issue Oct 17, 2017 · 8 comments
Closed

Building CouchDB on arm64-v8a #892

VladimirCores opened this issue Oct 17, 2017 · 8 comments

Comments

@VladimirCores
Copy link

I'm trying to run CouchDB on my Odroid C2 (arm64)
After "./configure" I run "make release" but it gives me an error

Current Behavior

image

Your Environment

Linux odroid64 3.14.79-116 #1 SMP PREEMPT Tue Sep 26 01:19:06 BRT 2017 aarch64 aarch64 aarch64 GNU/Linux

@kxepal
Copy link
Member

kxepal commented Oct 17, 2017

Seems like the -m64 is not supported by ARM build toolchain. Try to remove it or replace with analogue. As @wohali saild we don't have ARM's in our infra to test and support builds for them.

However, any contributions to fix that are welcome! Happy hacking!

@koleto
Copy link

koleto commented Oct 19, 2017

Just manage to comile on Linaro ARMv8.

  1. Open the file ~/apache-couchdb-2.1.0$ vim src/rebar/src/rebar_port_compiler.erl

  2. Remove the '-m64' flag from Line 608 and 609. The output should be:
    %% Linux specific flags for multiarch {"linux.*-64$", "CFLAGS", "$CFLAGS"}, {"linux.*-64$", "CXXFLAGS", "$CXXFLAGS"}, {"linux.*-64$", "LDFLAGS", "$LDFLAGS"},

  3. Recompile rebar: cd src/rebar
    ./bootstrap

  4. Rebuild couchdb:
    make release

@janl
Copy link
Member

janl commented Oct 19, 2017

That means this needs to be fixed in rebar, not CouchDB. cc @davisp any opinions?

@wohali
Copy link
Member

wohali commented Oct 19, 2017

If it's a rebar problem, we should look at the rebar3 change using paul's enc and make this patch over there.

@koleto
Copy link

koleto commented Oct 19, 2017

But unfortunately after I was able to build couchdb, there are still some issues with the replication and views on ARMv8.

@wohali
Copy link
Member

wohali commented Jan 16, 2018

Sounds like JavaScript didn't build correctly. You will need libmozjs185 specifically, and it MUST be built 32-bit -- see https://bugzilla.mozilla.org/show_bug.cgi?id=589735 and https://bugzilla.mozilla.org/show_bug.cgi?id=577056 for the gory details.

@wohali
Copy link
Member

wohali commented Jul 9, 2018

Based on apache/couchdb-pkg#24 if we just pull in the very last changes to rebar (v2) from https://github.com/rebar/rebar we should be able to fix this problem. We just need to be sure to keep @davisp's patch in the 2.6.0-couchdb branch around, assuming it's not already patched upstream.

Would still like to see us move to proper rebar - will file that as a new ticket.

@janl
Copy link
Member

janl commented Jul 14, 2018

closing in favour of #1428

@janl janl closed this as completed Jul 14, 2018
kulturpessimist added a commit to kulturpessimist/couchdb-rebar that referenced this issue Aug 21, 2018
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