[Mono-dev] Mono runtime on ARM920t with many assertions
Rob Wilkens
robwilkens at gmail.com
Fri Jun 1 11:44:15 UTC 2012
I don't have a similar failure with the same version as build by the
debian package that ubuntu ships with (which is the same version
2.10.8.1).... But i'm on a different platform i believe (x86-64).
I looked at the ubuntu source, and it appears to be failing here for you:
g_return_val_if_fail (hash != NULL, FALSE);
In Line 293 it's at method:
g_hash_table_lookup_extended (GHashTable *hash, gconstpointer key,
gpointer *orig_key, gpointer *value)
In line 236 it's at method:
g_hash_table_insert_replace (GHashTable *hash, gpointer key, gpointer
value, gboolean replace)
You could try to debug that with gdb or something, but It looks like
eglib (from the README in that directory) is a compatible glib that is
built separately and not always installed except under conditions where
novell needs a custom glib that is compatible with the regular glib but
under a different license. Is there a reason you are using eglib? Is
the regular glib not installed? Maybe try instead apt-get source
libglib2.0-dev and build and install that instead? (and don't use eglib
unless necessary?)
On 06/01/2012 06:29 AM, Dennis Krzyzaniak wrote:
>
> Hi all,
>
> I am trying to get Mono running on a spider III device including an
> ARM920t processor with Linux as OS.
>
> /host $ uname -a
>
> Linux Spider-III 2.6.17.3-axo-s07.2 #1425 Fri Jul 25 10:59:30 CEST
> 2008 armv4tl unknown
>
> When I try to invoke a simple hello_world.exe I get 399 assertions in
> eglib (always the same asserts):
>
> /host $ ./mono hello_world.exe
>
> ../../../../eglib/src/ghashtable.c:293: assertion 'hash != NULL' failed
>
> ../../../../eglib/src/ghashtable.c:236: assertion 'hash != NULL' failed
>
> ../../../../eglib/src/ghashtable.c:293: assertion 'hash != NULL' failed
>
> ../../../../eglib/src/ghashtable.c:236: assertion 'hash != NULL' failed
>
> ...
>
> The 'Hello World' is also displayed:
>
> ../../../../eglib/src/ghashtable.c:293: assertion 'hash != NULL' failed
>
> ../../../../eglib/src/ghashtable.c:236: assertion 'hash != NULL' failed
>
> Hello World../../../../eglib/src/ghashtable.c:293: assertion 'hash !=
> NULL' failed
>
> ...
>
> The hello world code:
>
> using System;
>
> namespace foobar {
>
> public class foo {
>
> public static void Main(string[] args) {
>
> Console.WriteLine("Hello World");
>
> }
>
> }
>
> }
>
> I am absolutely new to Mono and completely lost with this behavior.
> Maybe someone knows the reason or can point me to a direction to find
> the issue?
>
> I attached a trace (./mono --trace hello_world.exe), maybe this helps?
> The trace is cut to fit into this mail, please let me know if a full
> trace is needed.
>
> I am using the debian source package of Mono 2_10_8.1-1 because in the
> official release a unittest fails.
>
> To get Mono build with the 'old' ARM toolchain provided by the vendor
> I made a few changes in the project please see below.
>
> I am calling configure with the following parameters:
>
> configure --build=i686-pc-linux-gnu --host=arm-axotec-linux-gnu
> LD=arm-axotec-linux-gnu-ld OBJDUMP=arm-axotec-linux-gnu-objdump
> --prefix=/host --disable-mcs-build --srcdir=../..
>
> configure.in:
>
> +
>
> +dnl
>
> +dnl BEGIN Conworx Spider III ARMv4t settings
>
> +dnl there are already arm-*-linux* settings below but the place is to
> late, checks which
>
> +dnl tested before fails. So I added my specific stuff here without
> changing the old
>
> +dnl settings.
>
> +dnl
>
> +if test "x$host" = "xarm-axotec-linux-gnu"; then
>
> +dnl looks like this are all needed settings, the rest is redundant.
>
> + TARGET=ARM;
>
> + cross_compiling=yes
>
> + dnl which defines are needed? just copied some
>
> + dnl CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE
> -D_REENTRANT -DARM_FPU_NONE -D__ARM_EABI__"
>
> + CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_REENTRANT -DARM_FPU_NONE
> -mcpu=arm920t -D__ARM_ARCH_4__"
>
> + CPPFLAGS="$CPPFLAGS -DNO_THUMB2_INSTRUCTIONS"
>
> + arch_target=arm;
>
> + ACCESS_UNALIGNED="no"
>
> + JIT_SUPPORTED=yes
>
> + jit_wanted=true
>
> + sgen_supported=true
>
> + dnl Can't use tls, since it depends on the runtime detection of tls
> offsets
>
> + dnl in mono-compiler.h
>
> + libgc_threads=pthreads
>
> + with_tls=pthread
>
> + use_sigposix=yes
>
> + dnl Enable support for using sigaltstack for SIGSEGV and
>
> + dnl stack overflow handling (TODO not sure if it works on my arm)
>
> + with_sigaltstack=no
>
> + dnl to bypass the underscore linker check, can't work when
> cross-compiling
>
> + mono_cv_uscore=yes
>
> + dnl support ahead of time compilation
>
> + AOT_SUPPORTED="yes"
>
> + libdl="-ldl"
>
> + dnl I need some define to enable my hacks oO
>
> + AC_DEFINE(PLATFORM_AXOTEC_LINUX,1,[Targeting axotec linux on arm920t])
>
> +fi
>
> +
>
> +# Added LT_OUTPUT to generate libtool script by config.lt before
> calling it.
>
> +LT_OUTPUT
>
> export_ldflags=`(./libtool --config; echo eval echo
> \\$export_dynamic_flag_spec) | sh`
>
> AC_SUBST(export_ldflags)
>
> +dnl the check for cross compiling is included in the mono release but
> removed
>
> +dnl in the debian source package because for the debian distribution
> no cross
>
> +dnl compiling is used.
>
> +if test ${TARGET} = ARM && test x$cross_compiling = xno; then
>
> dnl ******************************************
>
> dnl *** Check to see what FPU is available ***
>
> dnl ******************************************
>
> mono/metadata/sgen-archdep.h:
>
> /* We dont store ip, sp */
>
> #define ARCH_NUM_REGS 14
>
> +/* arm920t does not support thumb2 instructions */
>
> +#if !defined (NO_THUMB2_INSTRUCTIONS)
>
> +/* THUMB2 instuctions */
>
> #define ARCH_STORE_REGS(ptr) \
>
> __asm__ __volatile__( \
>
> "push {lr}\n" \
>
> @@ -145,6 +148,17 @@
>
> : \
>
> : "r" (ptr) \
>
> )
>
> +#else /* NO_THUMB2_INSTRUCTIONS */
>
> +/* ARM instuctions */
>
> +#define ARCH_STORE_REGS(ptr) \
>
> + __asm__ __volatile__( \
>
> + "stmfd sp!, {lr}\n" \
>
> + "mov lr, %0\n" \
>
> + "stmia lr!, {r0-r12}\n" \
>
> + "ldmfd sp!, {lr}\n" \
>
> + : \
>
> + : "r" (ptr))
>
> +#endif /* NO_THUMB2_INSTRUCTIONS */
>
> mono/mini/jit-icalls.c:
>
> #if defined(__arm__) && MONO_ARCH_SOFT_FLOAT
>
> +#if defined (PLATFORM_AXOTEC_LINUX)
>
> + /* ULLONG_MAX is not defined, just define here the max size of an
> unsigend
>
> + * long long int. */
>
> +#ifndef ULLONG_MAX
>
> +#define ULLONG_MAX 18446744073709551615ULL
>
> +#endif /* !ULLONG_MAX */
>
> +#endif /* PLATFORM_AXOTEC_LINUX */
>
> if (isnan (v) || !(v >= -0.5 && v <= ULLONG_MAX+0.5)) {
>
> mono_raise_exception (mono_get_exception_overflow ());
>
> Would be great to get some help!
>
> Best regards,
>
> Dennis Krzyzaniak
>
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120601/55564a2d/attachment-0001.html>
More information about the Mono-devel-list
mailing list