Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
There are two problems when cross-compiling mono3.0.2 for the target PowerPC
The used tool chain is WindRiver4.1, which finally is a gcc cross toolchain:
> powerpc-wrs-linux-gnu-gcc --version
powerpc-wrs-linux-gnu-gcc (Wind River Linux Sourcery G++ 4.4a-323) 4.4.1
First thing is that there are compiler errors when compiling mono/metadata, the preprocessor constant ARCH_NUM_REGS is undefined. The problem is located in /mono/metadata/sgen-archdep.h, line 92. The statement there is
but the configure script uses the constant "TARGET_POWERPC", so the line there should read:
Second problem is when compiling mono/mini, the final link for executable fails with the following unresolved symbol:
./.libs/libmini-static.a(libmini_static_la-aot-compiler.o): In function `mono_aot_parse_options':
...mono-3.0.2/mono/mini/aot-compiler.c:5287: undefined reference to `mini_gc_enable_gc_maps_for_aot'
...ld: mono: hidden symbol `mini_gc_enable_gc_maps_for_aot' isn't defined
...ld: final link failed: Nonrepresentable section on output
The source of the problem is within mono/mini/mini-gc.c: if MONO_ARCH_GC_MAPS_SUPPORTED is not defined (line 16), then the empty definition for mini_gc_enable_gc_maps_for_aot(void) is missing, it should be added in the #else part corresponding to line 16 "#if defined(MONO_ARCH_GC_MAPS_SUPPORTED)" starting at line 2508, for example:
diff ./mono/mini/mini-gc.c ../mono-3.0.2.linux-working/mono/mini/mini-gc.c
Fixed those in cf0bc265c48a03d37c01e6f1fb118626a1faa234. PPC is not a very strongly supported mono platform, so you might run into more problems.