Bug 40627 - crosscompilation for arm64 fails with linking errors
Summary: crosscompilation for arm64 fails with linking errors
Status: NEW
Alias: None
Product: Runtime
Classification: Mono
Component: General (show other bugs)
Version: 4.5.X
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-04-21 21:06 UTC by Eduard Bloch
Modified: 2016-05-15 07:00 UTC (History)
3 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Eduard Bloch 2016-04-21 21:06:15 UTC
Hi,
I cannot build mono from current master with a crosscompiler toolchain. I tried disabling mcs build and libmono shared lib, same result (i.e. missing the same symbols while linking, sooner or later).

The toolchain itself is fine (typical Yocto based SDK), everything else works. Settings:
ARCH=arm64
CFLAGS=' -O2 -pipe -g -feliminate-unused-debug-types -fno-omit-frame-pointer -march=armv8-a -funwind-tables'
$CC -v
Using built-in specs.
COLLECT_GCC=aarch64-gnu-linux-gcc
COLLECT_LTO_WRAPPER=/work/userdata/sdk/sysroots/x86_64-oesdk-linux/usr/bin/aarch64-gnu-linux/../../libexec/aarch64-gnu-linux/gcc/aarch64-gnu-linux/4.9.2/lto-wrapper
Target: aarch64-gnu-linux
...
gcc version 4.9.2 (GCC)


./configure --host=aarch64-gnu-linux --build=x86_64-linux
...
  CCLD     mono-sgen
libtool: link: warning: library `/work/userdata/sdk/sysroots/aarch64-gnu-linux/usr/lib/libstdc++.la' was moved.
libtool: link: warning: library `/work/userdata/sdk/sysroots/aarch64-gnu-linux/usr/lib/libstdc++.la' was moved.
./.libs/libmini-static.a(libmini_static_la-aot-compiler.o): In function `emit_trampolines':
/data/temp/mono/mono/mono/mini/aot-compiler.c:6718: undefined reference to `mono_arch_get_gsharedvt_trampoline'
../../mono/sgen/.libs/libmonosgen-static.a(libmonosgen_static_la-sgen-marksweep.o): In function `sweep_job_func':
/data/temp/mono/mono/mono/sgen/sgen-marksweep.c:1634: undefined reference to `sgen_array_list_remove_nulls'
../../mono/sgen/.libs/libmonosgen-static.a(libmonosgen_static_la-sgen-marksweep.o): In function `ms_alloc_block':
/data/temp/mono/mono/mono/sgen/sgen-marksweep.c:559: undefined reference to `sgen_array_list_add'
./.libs/libmini-static.a(libmini_static_la-mini-generic-sharing.o): In function `mini_get_gsharedvt_wrapper':
/data/temp/mono/mono/mono/mini/mini-generic-sharing.c:1457: undefined reference to `mono_arch_get_gsharedvt_call_info'
/data/temp/mono/mono/mono/mini/mini-generic-sharing.c:1486: undefined reference to `mono_arch_get_gsharedvt_arg_trampoline'
./.libs/libmini-static.a(libmini_static_la-mini-arm64.o): In function `mono_arch_init':
/data/temp/mono/mono/mono/mini/mini-arm64.c:240: undefined reference to `mono_arm_gsharedvt_init'
./.libs/libmini-static.a(libmini_static_la-mini.o): In function `mini_method_compile':
/data/temp/mono/mono/mono/mini/mini.c:3725: undefined reference to `mono_cfg_dump_create_context'
/data/temp/mono/mono/mono/mini/mini.c:3726: undefined reference to `mono_cfg_dump_begin_group'
/data/temp/mono/mono/mono/mini/mini.c:3729: undefined reference to `mono_cfg_dump_ir'
/data/temp/mono/mono/mono/mini/mini.c:4107: undefined reference to `mono_cfg_dump_ir'
/data/temp/mono/mono/mono/mini/mini.c:4177: undefined reference to `mono_cfg_dump_close_group'
/data/temp/mono/mono/mono/mini/mini.c:3791: undefined reference to `mono_cfg_dump_ir'
/data/temp/mono/mono/mono/mini/mini.c:3794: undefined reference to `mono_cfg_dump_ir'
/data/temp/mono/mono/mono/mini/mini.c:3800: undefined reference to `mono_cfg_dump_ir'
/data/temp/mono/mono/mono/mini/mini.c:3825: undefined reference to `mono_cfg_dump_ir'
/data/temp/mono/mono/mono/mini/mini.c:3837: undefined reference to `mono_cfg_dump_ir'
./.libs/libmini-static.a(libmini_static_la-mini.o):/data/temp/mono/mono/mono/mini/mini.c:3828: more undefined references to `mono_cfg_dump_ir' follow
./.libs/libmini-static.a(libmini_static_la-mini.o): In function `mono_jit_compile_method_inner':
/data/temp/mono/mono/mono/mini/mini.c:4377: undefined reference to `mono_arch_get_gsharedvt_trampoline'
../../mono/sgen/.libs/libmonosgen-static.a(libmonosgen_static_la-sgen-gchandles.o): In function `alloc_handle':
/data/temp/mono/mono/mono/sgen/sgen-gchandles.c:153: undefined reference to `sgen_array_list_add'
collect2: error: ld returned 1 exit status

The source is, as said, mono master branch, at

commit 0de3ceb482d700563b931bcd5bb599e372d0b274
Merge: f3ed954 2fedf04
Author: Alex Rønne Petersen <alex@alexrp.com>
Date:   Tue Apr 19 11:48:24 2016 +0200
Comment 1 Zoltan Varga 2016-05-15 07:00:49 UTC
Those functions are in newly added files, perhaps you need to run autogen.sh ?

Note You need to log in before you can comment on or make changes to this bug.