From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Stefan Hellermann <stefan@the2masters.de>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] <DKIM> Application crashing when build with cross-compiler
Date: Wed, 14 Oct 2015 17:59:29 +0200 [thread overview]
Message-ID: <561E7BE1.9070402@inria.fr> (raw)
In-Reply-To: <CAANYUdBFY2AQ1k_gpXibNAHcXgqYBgObae+=MfruTZUja_9sBA@mail.gmail.com>
On 14/10/15 14:29, Stefan Hellermann wrote:
> I tried to reproduce this on a x86_32 cross-compiled target, but failed. I
> tried to create exactly the same environment for x86_32, same libc, same
> compiler, same kernel. Only difference to compiling for my target is
> endianess, mips is big endian and x86_32 is little endian.
Well, MIPS can also run in little-endian ("mipsel" in Debian speak),
but I'm assuming you run a big-endian MIPS kernel.
I see Debian has a Unison package for mips and other big-endian
platforms, which I presume works, so it's not an endianness dependency
in Unison itself nor in the OCaml libraries that Unison depends on.
> Is there anything else I can try?
You could build the OCaml runtime in debug mode:
cd /path/to/ocaml/sources/byterun && make ocamlrund
Then use it to run Unison:
/path/to/ocaml/sources/byterun/ocamlrund unison file1 file2
ocamlrund is compiled without C optimizations and with a lot of
internal checks, so it could help find possible problems with your
cross C compiler or target C library.
> Can someone point me to a few test scripts
> which I could run on the mips target and see if something fails?
There's always the testsuite/ part of the OCaml source distribution,
which you could run either on the target or on the host through qemu.
cd /path/to/ocaml/sources/testsuite && make BYTECODE_ONLY=true all
Adrien Nader adds:
> Hmmmm, endianess is indeed likely to cause troubles.
I'm skeptical. Wrong endianness in config/m.h would cause ocamlrun to
crash immediately.
> Do the cross-build from x86_64 to ix86 (or the other way round) and
> look for warnings from as (need the end of the build iirc).
The original poster is using bytecode, as native-code generation is
not available for MIPS anyway.
- Xavier Leroy
next prev parent reply other threads:[~2015-10-14 15:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-13 11:50 [Caml-list] " Stefan Hellermann
[not found] ` <561CFDBE.5090708@ocamlpro.com>
2015-10-14 12:29 ` [Caml-list] <DKIM> " Stefan Hellermann
2015-10-14 15:19 ` Adrien Nader
2015-10-14 15:59 ` Xavier Leroy [this message]
2015-10-14 20:10 ` Adrien Nader
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=561E7BE1.9070402@inria.fr \
--to=xavier.leroy@inria.fr \
--cc=caml-list@inria.fr \
--cc=stefan@the2masters.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox