Bug 30390 - mono build broken, libmonoutils fails to link
Summary: mono build broken, libmonoutils fails to link
Alias: None
Product: Runtime
Classification: Mono
Component: Build ()
Version: 4.0.0
Hardware: Other Other
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-05-24 14:45 UTC by cydhaselton
Modified: 2018-01-24 16:27 UTC (History)
6 users (show)

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

defines mono_threads_core_get_stack_bounds for android (651 bytes, patch)
2015-05-30 07:55 UTC, cydhaselton

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:

Description cydhaselton 2015-05-24 14:45:50 UTC
Please see 21520 and 22628 for similar issues

Building mono on Android device from downloaded source tarball with the following configure:

bld/mono/mono-4.0.0/mono $ ./configure --prefix=/usr/mono --mandir=/usr/share/man --enable-shared --disable-nls --disable-boehm --with-sysroot=/usr/gcc-4.9.2/sysroot --without-x --with-monodroid=yes --with-libgdiplus=no --host=arm-linux-androideabi --target=arm-linux-androideabi --build=arm-linux-androideabi

When configure is done, it displays the following:

mcs source: mcs

Host: arm-unknown-linux-androideabi
Target: arm-unknown-linux-androideabi
GC: sgen and Included Boehm GC with typed GC and parallel mark
TLS: pthread
Engine: Building and using the JIT
oprofile: no
BigArrays: no
DTrace: no
LLVM Back End: no (dynamically loaded: no)

.NET 4.5: yes
MonoDroid: yes
MonoTouch: no
Xamarin.Mac: no
JNI support: IKVM Native
libgdiplus: assumed to be installed
zlib: system zlib

configure: WARNING: Turning off static Mono is a risk

Running make proceeds until failing with the following errors:

../../mono/utils/.libs/libmonoutils.a(mono-threads.o): In function `mono_thread_info_get_stack_bounds':
/bld/mono/mono-4.0.0/mono/utils/mono-threads.c:839: undefined reference to `mono_threads_core_get_stack_bounds'
/usr/gcc-4.9.2/bin/ld: .libs/libmonosgen-2.0.so: hidden symbol `mono_threads_core_get_stack_bounds' isn't defined
/usr/gcc-4.9.2/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

Have run make clean and have also deleted/recreated source folder.  Issue persists
Comment 1 cydhaselton 2015-05-24 17:23:30 UTC
Note: Adding --with-sgen=no to ./configure allows make to continue past the previous error...however it then fails again with a different error, which complains about a missing boehm header even when --with-gc=none is used
Comment 2 Zoltan Varga 2015-05-25 19:21:59 UTC
Mono is not supported on android, only in xamarin products.
Comment 3 cydhaselton 2015-05-29 05:23:50 UTC
Apologies...but the mono supported platforms page says that ARM/Android is a supported platform


Should I edit this page and remove and/or change that info?
Comment 4 cydhaselton 2015-05-30 07:55:55 UTC
Created attachment 11397 [details]
defines mono_threads_core_get_stack_bounds for android

Copied from mono-threads-linux.c after parsing android pthreads.h to verify compatibility, and enabled by using PLATFORM_ANDROID macro
Comment 5 Marek Safar 2017-09-06 14:42:48 UTC
Is this still failing for you with the recent mono master?
Comment 6 Ludovic Henry 2018-01-24 16:27:20 UTC
Please provide information if you can still reproduce to reopen. Thank you.