[m-dev.] Cross-Compiling for Android

Peter Wang novalazy at gmail.com
Sat Apr 11 12:45:57 AEST 2020


On Wed, 08 Apr 2020 19:14:00 -0400, null at nowhere-dense.com wrote:
> 
> Thanks Peter,
> 
> I tried tests today using binfmt_misc/QEMU for armv7a-linux-androideabi.
> 
> I needed to add `--linkage static` to TESTS_FLAGS and invoked mmake with 
> the following settings:
> 
> mmake \
>      MMAKE_USE_MMC_MAKE=yes \
>      MERCURY_CONFIG_DIR=$MERCURYDIR/lib/mercury \
>      MERCURY_STDLIB_DIR=$MERCURYDIR/lib/mercury \
>      MERCURY_DEFAULT_GRADE=hlc.gc
> 
> A number of tests failed, but I believe many to be an artifact of my 
> setup (eg, all of `recompilation` failed, many tests in `warnings`,
> etc).  I think most of these are due to mmake or mmc being invoked in
> a way that is incompatible with cross-compiling.  I don't think
> anything can be gleaned from these.

Right.

> 
> This test printed an empty string instead of a zero in one location:
> - string_format/string_format_o in grade hlc.gc

Something like "%#0o", right? Seems to be a common bug in C libraries.

> There were a total of 54 failures, many of which were in 
> `recompilation`.
> Here is a full list of failures, with those from `recompilation`
> omitted:
> 
> hard_coded/dst_test in grade hlc.gc
> hard_coded/system_sort in grade hlc.gc
> hard_coded/target_mlobjs in grade hlc.gc
> hard_coded/test_pretty_printer_defaults in grade hlc.gc
> hard_coded/weak_ptr in grade hlc.gc
> invalid_purity/purity_nonsense2-nodepend in grade hlc.gc
> mmc_make/complex_test in grade hlc.gc
>   ----- recompilation -----
> string_format/string_format_o in grade hlc.gc
> tabling/boyer in grade hlc.gc
> tabling/expand_poly in grade hlc.gc
> tabling/expand_tuple in grade hlc.gc
> tabling/expand_tuple2 in grade hlc.gc
> tabling/fast_loose in grade hlc.gc
> tabling/fib_list in grade hlc.gc
> tabling/fib_string in grade hlc.gc
> valid_seq/opt_det_warn in grade hlc.gc
> warnings/arg_order_rearrangment in grade hlc.gc
> warnings/foreign_term_invalid in grade hlc.gc
> warnings/non_term_user_special in grade hlc.gc
> warnings/pragma_term_conflict in grade hlc.gc
> warnings/term_indirect_warning in grade hlc.gc
> warnings/unused_args_analysis in grade hlc.gc
> warnings/warn_dead_procs in grade hlc.gc
> warnings/warn_dead_procs_trace in grade hlc.gc
> 
> It may be a bit early to do anything with this information, but I
> thought it may be of interest.

It looks like the core system works. Have you looked in the .log files?
You can attach them here or perhaps copy them onto a pastebin site.

Peter


More information about the developers mailing list