All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla at busybox.net <bugzilla@busybox.net>
To: buildroot@busybox.net
Subject: [Buildroot] [Bug 11166] Erlang bad argument on valid uint64 when crosscompiled on 64-bit host
Date: Fri, 03 Aug 2018 22:35:16 +0000	[thread overview]
Message-ID: <bug-11166-163-Q8jL5YpRLJ@https.bugs.busybox.net/> (raw)
In-Reply-To: <bug-11166-163@https.bugs.busybox.net/>

https://bugs.busybox.net/show_bug.cgi?id=11166

--- Comment #2 from Frank Vasquez <frankv@helium.com> ---
Thank you for your prompt reply, Frank.  I was away on vacation and am just
getting back to this now.

>  I assume bitcask was cross-compiled outside of Buildroot, right?

Yes and no.  Our application is being built using rebar3 as opposed to
Buildroot's built-in rebar-package support.  Our package .mk file looks like
this.

define BEAMCOIN_BUILD_CMDS
    $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) compile \
        PATH='$(BR2_EXTERNAL_HELIUM_PATH)/output/host/lib/erlang/bin:$(PATH)' \
       
CPATH='$(BR2_EXTERNAL_HELIUM_PATH)/output/target/usr/lib/erlang/usr/include:$(CPATH)'
\
       
LDFLAGS='-L$(BR2_EXTERNAL_HELIUM_PATH)/output/build/erlang-20.0/lib/erl_interface/obj/arm-buildroot-linux-gnueabihf
-fPIC -shared'
endef

$(eval $(generic-package))

And the underlying Makefile looks like this.

REBAR=./rebar3

compile:
        $(REBAR) compile

You can see from FOOBAR_BUILD_CMDS that I set PATH, CPATH and LDFLAGS so that
the NIFs cross-compile correctly.  Don't know if I am going about that the
right way.  At least the NIFs appear to build fine on x86 32-bit hosts.  My
team is doing bleeding edge blockchain work in Erlang (much of it already open
source) so they really want to use rebar3.

> Is it possible to reproduce this with a small Erlang application?

I believe so.  I will try to assemble a small repro using just rebar3 and
bitcask.

Cheers,
Frank

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2018-08-03 22:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-21  5:43 [Buildroot] [Bug 11166] New: Erlang bad argument on valid uint64 when crosscompiled on 64-bit host bugzilla at busybox.net
2018-07-21  5:45 ` [Buildroot] [Bug 11166] " bugzilla at busybox.net
2018-07-21  6:35 ` bugzilla at busybox.net
2018-08-03 22:35 ` bugzilla at busybox.net [this message]
2018-08-14 20:31 ` bugzilla at busybox.net
2018-08-16 18:51 ` bugzilla at busybox.net
2018-08-16 22:45 ` bugzilla at busybox.net
2018-08-17 21:34 ` bugzilla at busybox.net
2018-08-20 17:16 ` bugzilla at busybox.net
2018-10-20  7:36 ` bugzilla at busybox.net
2018-10-20  7:39 ` bugzilla at busybox.net

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-11166-163-Q8jL5YpRLJ@https.bugs.busybox.net/ \
    --to=bugzilla@busybox.net \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.