[Mono-dev] libMonoPosixHelper and libMonoSupportW not being built when --disable-mcs-build
I am cross compiling mono and have success with it. The process as described is: 1) Compile mono on build/host machine for the libraries 2) Cross Compile mono with --disable-mcs-build and copy the .NET libraries to the target system. However, I have to use --disable-mcs-build mono_cv_uscore=no --with-tls=pthread --with-sigaltstack=no for configuration. Then I copy over both the etc/mono and usr/lib/mono directories to the target system At this point of time, I am able to get all the runtime tests to pass and almost all the mscorlib and System.dll tests to pass. The problem is that when I try to execute a .NET app that uses Windows Forms, I get a DllNotFoundException for these (unmanaged) libraries. I have verified that libMonoPosixHelper.* and libMonoSupportW.* are not being built, even when we just compile (not necessarily cross compile) mono with --disable-mcs-build So, whats going on what can I do to force build this? I am using the latest stable version 2.10.8.1 Thanks Autif ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] libMonoPosixHelper and libMonoSupportW not being built when --disable-mcs-build
I believe that support directory is intentionally being left out during cross compilation. I wonder why? Does anyone know? Excerpts from root Makefile.in - notice how support is missing when @CROSS_COMPILING_FALSE @CROSS_COMPILING_FALSE@@ONLY_MOONLIGHT_FALSE@SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir) @CROSS_COMPILING_FALSE@@ONLY_MOONLIGHT_TRUE@SUBDIRS = $(MOONLIGHT_SUBDIRS) runtime @CROSS_COMPILING_TRUE@SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) data runtime scripts man samples msvc $(docs_dir) # Keep in sync with SUBDIRS @CROSS_COMPILING_FALSE@@ONLY_MOONLIGHT_FALSE@DIST_SUBDIRS = po libgc eglib mono ikvm-native support data runtime scripts man samples tools msvc docs # Keep in sync with SUBDIRS @CROSS_COMPILING_TRUE@DIST_SUBDIRS = po libgc eglib mono ikvm-native data runtime scripts man samples tools msvc docs On Wed, Jan 25, 2012 at 11:19 AM, autif khan autif.ml...@gmail.com wrote: I am cross compiling mono and have success with it. The process as described is: 1) Compile mono on build/host machine for the libraries 2) Cross Compile mono with --disable-mcs-build and copy the .NET libraries to the target system. However, I have to use --disable-mcs-build mono_cv_uscore=no --with-tls=pthread --with-sigaltstack=no for configuration. Then I copy over both the etc/mono and usr/lib/mono directories to the target system At this point of time, I am able to get all the runtime tests to pass and almost all the mscorlib and System.dll tests to pass. The problem is that when I try to execute a .NET app that uses Windows Forms, I get a DllNotFoundException for these (unmanaged) libraries. I have verified that libMonoPosixHelper.* and libMonoSupportW.* are not being built, even when we just compile (not necessarily cross compile) mono with --disable-mcs-build So, whats going on what can I do to force build this? I am using the latest stable version 2.10.8.1 Thanks Autif ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] libMonoPosixHelper and libMonoSupportW not being built when --disable-mcs-build
I looked thru git to see how this evolved. It lead me to commit 9c48ce0cec7f37fd9f90be75cf7887d014048b25 by Gonzalo. I was hoping he could shed some light on this. I just dont want this to bite me down the road. On Wed, Jan 25, 2012 at 12:59 PM, autif khan autif.ml...@gmail.com wrote: I believe that support directory is intentionally being left out during cross compilation. I wonder why? Does anyone know? Excerpts from root Makefile.in - notice how support is missing when @CROSS_COMPILING_FALSE @CROSS_COMPILING_FALSE@@ONLY_MOONLIGHT_FALSE@SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir) @CROSS_COMPILING_FALSE@@ONLY_MOONLIGHT_TRUE@SUBDIRS = $(MOONLIGHT_SUBDIRS) runtime @CROSS_COMPILING_TRUE@SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) data runtime scripts man samples msvc $(docs_dir) # Keep in sync with SUBDIRS @CROSS_COMPILING_FALSE@@ONLY_MOONLIGHT_FALSE@DIST_SUBDIRS = po libgc eglib mono ikvm-native support data runtime scripts man samples tools msvc docs # Keep in sync with SUBDIRS @CROSS_COMPILING_TRUE@DIST_SUBDIRS = po libgc eglib mono ikvm-native data runtime scripts man samples tools msvc docs On Wed, Jan 25, 2012 at 11:19 AM, autif khan autif.ml...@gmail.com wrote: I am cross compiling mono and have success with it. The process as described is: 1) Compile mono on build/host machine for the libraries 2) Cross Compile mono with --disable-mcs-build and copy the .NET libraries to the target system. However, I have to use --disable-mcs-build mono_cv_uscore=no --with-tls=pthread --with-sigaltstack=no for configuration. Then I copy over both the etc/mono and usr/lib/mono directories to the target system At this point of time, I am able to get all the runtime tests to pass and almost all the mscorlib and System.dll tests to pass. The problem is that when I try to execute a .NET app that uses Windows Forms, I get a DllNotFoundException for these (unmanaged) libraries. I have verified that libMonoPosixHelper.* and libMonoSupportW.* are not being built, even when we just compile (not necessarily cross compile) mono with --disable-mcs-build So, whats going on what can I do to force build this? I am using the latest stable version 2.10.8.1 Thanks Autif ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] How to access AOTed assembly code?
Thanks, Robert, that worked very well. I have one more question, if I may. So I'm embedding Mono on Android on ARM. Up until now, I've been AOT compiling the libraries by running a little app on the Android device itself. Obviously, in the long term, this is not really a good option. So now, I'm trying to build a Mono cross compiler for Android ARM on my Mac OS X machine (gcc --arch returns i686-apple-darwin11-llvm-gcc-4.2 if that is useful). I do the following configure: ./configure --target=armv5-linux-androideabi --enable-nls=no --prefix=/Users/kamal/mono-cross --disable-mcs-build I also have the CC environment variable and CXX environment variable set to gcc -m32 and g++ -m32, respectively, as I believe I read that the cross compiler cannot work if built for 64-bit. Whenever I run make, I quickly get the following errors: mach-support-arm.c: In function ‘mono_mach_arch_get_ip’: mach-support-arm.c:24: error: ‘arm_thread_state_t’ undeclared (first use in this function) mach-support-arm.c:24: error: (Each undeclared identifier is reported only once mach-support-arm.c:24: error: for each function it appears in.) mach-support-arm.c:24: error: ‘arch_state’ undeclared (first use in this function) mach-support-arm.c:24: error: expected expression before ‘)’ token mach-support-arm.c:27: warning: control reaches end of non-void function mach-support-arm.c: In function ‘mono_mach_arch_get_sp’: mach-support-arm.c:32: error: ‘arm_thread_state_t’ undeclared (first use in this function) mach-support-arm.c:32: error: ‘arch_state’ undeclared (first use in this function) mach-support-arm.c:32: error: expected expression before ‘)’ token mach-support-arm.c:35: warning: control reaches end of non-void function mach-support-arm.c: In function ‘mono_mach_arch_get_mcontext_size’: mach-support-arm.c:40: error: invalid application of ‘sizeof’ to incomplete type ‘struct __darwin_mcontext’ mach-support-arm.c: In function ‘mono_mach_arch_thread_state_to_mcontext’: mach-support-arm.c:46: error: ‘arm_thread_state_t’ undeclared (first use in this function) mach-support-arm.c:46: error: ‘arch_state’ undeclared (first use in this function) mach-support-arm.c:46: error: expected expression before ‘)’ token mach-support-arm.c:49: error: dereferencing pointer to incomplete type mach-support-arm.c: In function ‘mono_mach_arch_get_thread_state_size’: mach-support-arm.c:55: error: ‘arm_thread_state_t’ undeclared (first use in this function) mach-support-arm.c:56: warning: control reaches end of non-void function mach-support-arm.c: In function ‘mono_mach_arch_get_thread_state’: mach-support-arm.c:61: error: ‘arm_thread_state_t’ undeclared (first use in this function) mach-support-arm.c:61: error: ‘arch_state’ undeclared (first use in this function) mach-support-arm.c:61: error: expected expression before ‘)’ token mach-support-arm.c:64: error: ‘ARM_THREAD_STATE_COUNT’ undeclared (first use in this function) make[4]: *** [mach-support-arm.lo] Error 1 Does anyone know how to overcome these errors? Much appreciated! Kamal On Jan 24, 2012, at 4:08 PM, Robert Jordan wrote: On 24.01.2012 19:39, Kamal Aboul-Hosn wrote: Hi, everyone, If I call mono --aot=static,asmonly on a dll to generate a .s file, how can I get Mono to load the generated AOT'ed assembly if I include the .s in a native .so I'm building myself as part of an application? It seems Mono normally just goes looking for a .so file for the AOT'ed code. Is it possible to get Mono to use the linked in AOT'ed code in the same native library as the rest of my application? Please let me know if I can provide any more details. First, you must embed the runtime as described here: http://mono-project.com/Embedding_Mono Second, you must register the static AOT assembly with mono_aot_register_module. See the description of --aot=static on mono's man page. This assembly can be consumed like any other file-based assembly using the embedding API. Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Problems compiling mono 2.10.5 for ARM
Hi,I'm trying to create a new mono 2.10.5 ipk package for cs08q1armel toinstall on a Synology DS211. (ARM processor)I have modified the mono.mk template to get the new source and I have remove theglib dependency (I have try with this dependency too) and always I have the sameerror when I check the ipk.The make mono and make mono-ipk works great, but not the check of the ipk. I have compiled with gcc and g++ (it's necessary with this version) 3.3 and4.2.4 versions, I'm using ubuntu 8.04.03, and always the same error.The libtool's version is 1.5.26.After that, I have try to create the actual package for cso8q1armel, mono 2.4 and works fine. Noerrors with mono-check.I have try to create mono 2.6 too, and works fine the mono-check.With mono 2.8 I have the same errors with 2.10.5These are the errors when I execute the ipk's check with mono 2.8 and mono2.10.5:perl scripts/optware-check-package.pl --target=cs08q1armel/home/prova/optware/cs08q1armel/builds/mono_2.10.5-1_arm.ipkmono_2.10.5-1_arm/opt/bin/monograph: is not an 32-bit LSB .* ARM binarymono_2.10.5-1_arm/opt/bin/mprof-report: is not an 32-bit LSB .* ARM binarymono_2.10.5-1_arm/opt/bin/mprof-report: has no rpath (libm.so.6 librt.so.1libdl.so.2 libpthread.so.0 libc.so.6)mono_2.10.5-1_arm/opt/lib/libmono-profiler-aot.so.0.0.0: is not an 32-bit LSB .*ARM binarymono_2.10.5-1_arm/opt/lib/libmono-profiler-cov.so.0.0.0: is not an 32-bit LSB .*ARM binarymono_2.10.5-1_arm/opt/lib/libmono-profiler-iomap.so.0.0.0: is not an 32-bit LSB.* ARM binarymono_2.10.5-1_arm/opt/lib/libmono-profiler-log.so.0.0.0: is not an 32-bit LSB .*ARM binarymono_2.10.5-1_arm/opt/lib/libMonoPosixHelper.so: is not an 32-bit LSB .* ARMbinarymono_2.10.5-1_arm/opt/lib/libMonoPosixHelper.so: has no rpath (libm.so.6librt.so.1 libdl.so.2 libpthread.so.0 libc.so.6)mono_2.10.5-1_arm/opt/lib/libMonoSupportW.so: is not an 32-bit LSB .* ARM binarymono_2.10.5-1_arm/opt/lib/libMonoSupportW.so: has no rpath (libm.so.6 librt.so.1libdl.so.2 libpthread.so.0 libc.so.6)mono_2.10.5-1_arm/opt/lib/mono/2.0/mcs.exe.so: is not strippedmono_2.10.5-1_arm/opt/lib/mono/2.0/mcs.exe.so: is not an 32-bit LSB .* ARMbinarymono_2.10.5-1_arm/opt/lib/mono/2.0/mscorlib.dll.so: is not strippedmono_2.10.5-1_arm/opt/lib/mono/2.0/mscorlib.dll.so: is not an 32-bit LSB .* ARMbinaryThere were 15 errorsmake: *** [mono-check] Error 2Any ideas what's wrong?Thanks ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] How to access AOTed assembly code?
On 25.01.2012 21:45, Kamal Aboul-Hosn wrote: Thanks, Robert, that worked very well. I have one more question, if I may. So I'm embedding Mono on Android on ARM. Up until now, I've been AOT compiling the libraries by running a little app on the Android device itself. Obviously, in the long term, this is not really a good option. So now, I'm trying to build a Mono cross compiler for Android ARM on my Mac OS X machine (gcc --arch returns i686-apple-darwin11-llvm-gcc-4.2 if that is useful). I do the following configure: ./configure --target=armv5-linux-androideabi --enable-nls=no --prefix=/Users/kamal/mono-cross --disable-mcs-build Hmm, I'm inclined to say that targeting armv5-linux-androideabi with a GCC whose arch is i686-apple-darwin11-llvm-gcc-4.2 is doomed to fail. You need a cross build toolchain for armv5-linux-androideabi. Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] How to access AOTed assembly code?
Kamal, Can you please include the following: 1) which gcc 2) output of gcc --version 3) gcc helloworld.c - and then the output of file a.out (just have main(){printf(HW\n;)} in helloworld.c These will eliminate cross compiler as an issue. 4) The full command that is executed before you get this output - it is above this output On Wed, Jan 25, 2012 at 3:45 PM, Kamal Aboul-Hosn ka...@sooloos.com wrote: Thanks, Robert, that worked very well. I have one more question, if I may. So I'm embedding Mono on Android on ARM. Up until now, I've been AOT compiling the libraries by running a little app on the Android device itself. Obviously, in the long term, this is not really a good option. So now, I'm trying to build a Mono cross compiler for Android ARM on my Mac OS X machine (gcc --arch returns i686-apple-darwin11-llvm-gcc-4.2 if that is useful). I do the following configure: ./configure --target=armv5-linux-androideabi --enable-nls=no --prefix=/Users/kamal/mono-cross --disable-mcs-build I also have the CC environment variable and CXX environment variable set to gcc -m32 and g++ -m32, respectively, as I believe I read that the cross compiler cannot work if built for 64-bit. Whenever I run make, I quickly get the following errors: mach-support-arm.c: In function ‘mono_mach_arch_get_ip’: mach-support-arm.c:24: error: ‘arm_thread_state_t’ undeclared (first use in this function) mach-support-arm.c:24: error: (Each undeclared identifier is reported only once mach-support-arm.c:24: error: for each function it appears in.) mach-support-arm.c:24: error: ‘arch_state’ undeclared (first use in this function) mach-support-arm.c:24: error: expected expression before ‘)’ token mach-support-arm.c:27: warning: control reaches end of non-void function mach-support-arm.c: In function ‘mono_mach_arch_get_sp’: mach-support-arm.c:32: error: ‘arm_thread_state_t’ undeclared (first use in this function) mach-support-arm.c:32: error: ‘arch_state’ undeclared (first use in this function) mach-support-arm.c:32: error: expected expression before ‘)’ token mach-support-arm.c:35: warning: control reaches end of non-void function mach-support-arm.c: In function ‘mono_mach_arch_get_mcontext_size’: mach-support-arm.c:40: error: invalid application of ‘sizeof’ to incomplete type ‘struct __darwin_mcontext’ mach-support-arm.c: In function ‘mono_mach_arch_thread_state_to_mcontext’: mach-support-arm.c:46: error: ‘arm_thread_state_t’ undeclared (first use in this function) mach-support-arm.c:46: error: ‘arch_state’ undeclared (first use in this function) mach-support-arm.c:46: error: expected expression before ‘)’ token mach-support-arm.c:49: error: dereferencing pointer to incomplete type mach-support-arm.c: In function ‘mono_mach_arch_get_thread_state_size’: mach-support-arm.c:55: error: ‘arm_thread_state_t’ undeclared (first use in this function) mach-support-arm.c:56: warning: control reaches end of non-void function mach-support-arm.c: In function ‘mono_mach_arch_get_thread_state’: mach-support-arm.c:61: error: ‘arm_thread_state_t’ undeclared (first use in this function) mach-support-arm.c:61: error: ‘arch_state’ undeclared (first use in this function) mach-support-arm.c:61: error: expected expression before ‘)’ token mach-support-arm.c:64: error: ‘ARM_THREAD_STATE_COUNT’ undeclared (first use in this function) make[4]: *** [mach-support-arm.lo] Error 1 Does anyone know how to overcome these errors? Much appreciated! Kamal On Jan 24, 2012, at 4:08 PM, Robert Jordan wrote: On 24.01.2012 19:39, Kamal Aboul-Hosn wrote: Hi, everyone, If I call mono --aot=static,asmonly on a dll to generate a .s file, how can I get Mono to load the generated AOT'ed assembly if I include the .s in a native .so I'm building myself as part of an application? It seems Mono normally just goes looking for a .so file for the AOT'ed code. Is it possible to get Mono to use the linked in AOT'ed code in the same native library as the rest of my application? Please let me know if I can provide any more details. First, you must embed the runtime as described here: http://mono-project.com/Embedding_Mono Second, you must register the static AOT assembly with mono_aot_register_module. See the description of --aot=static on mono's man page. This assembly can be consumed like any other file-based assembly using the embedding API. Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] How to access AOTed assembly code?
Certainly. Inlining the answers. Thanks! On Jan 25, 2012, at 5:02 PM, autif khan wrote: Kamal, Can you please include the following: 1) which gcc /usr/bin/gcc 2) output of gcc --version i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 3) gcc helloworld.c - and then the output of file a.out (just have main(){printf(HW\n;)} in helloworld.c a.out: Mach-O 64-bit executable x86_64 These will eliminate cross compiler as an issue. 4) The full command that is executed before you get this output - it is above this output ../../doltcompile gcc -m32 -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../mono -I../../libgc/include -I../../eglib/src -I../../eglib/src -no-cpp-precomp -D_THREAD_SAFE -DGC_MACOSX_THREADS -DPLATFORM_MACOSX -DUSE_MMAP -DUSE_MUNMAP -DGetCurrentProcess=MonoGetCurrentProcess -DGetCurrentThread=MonoGetCurrentThread -DCreateEvent=MonoCreateEvent -arch i386 -D_XOPEN_SOURCE -mmacosx-version-min=10.5 -D__default_codegen__ -D__ARM_EABI__ -DARM_FPU_NONE=1 -DNO_UNALIGNED_ACCESS -arch i386 -D_XOPEN_SOURCE -mmacosx-version-min=10.5 -fno-strict-aliasing -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wwrite-strings -MT mach-support-arm.lo -MD -MP -MF .deps/mach-support-arm.Tpo -c -o mach-support-arm.lo mach-support-arm.c On Wed, Jan 25, 2012 at 3:45 PM, Kamal Aboul-Hosn ka...@sooloos.com wrote: Thanks, Robert, that worked very well. I have one more question, if I may. So I'm embedding Mono on Android on ARM. Up until now, I've been AOT compiling the libraries by running a little app on the Android device itself. Obviously, in the long term, this is not really a good option. So now, I'm trying to build a Mono cross compiler for Android ARM on my Mac OS X machine (gcc --arch returns i686-apple-darwin11-llvm-gcc-4.2 if that is useful). I do the following configure: ./configure --target=armv5-linux-androideabi --enable-nls=no --prefix=/Users/kamal/mono-cross --disable-mcs-build I also have the CC environment variable and CXX environment variable set to gcc -m32 and g++ -m32, respectively, as I believe I read that the cross compiler cannot work if built for 64-bit. Whenever I run make, I quickly get the following errors: mach-support-arm.c: In function ‘mono_mach_arch_get_ip’: mach-support-arm.c:24: error: ‘arm_thread_state_t’ undeclared (first use in this function) mach-support-arm.c:24: error: (Each undeclared identifier is reported only once mach-support-arm.c:24: error: for each function it appears in.) mach-support-arm.c:24: error: ‘arch_state’ undeclared (first use in this function) mach-support-arm.c:24: error: expected expression before ‘)’ token mach-support-arm.c:27: warning: control reaches end of non-void function mach-support-arm.c: In function ‘mono_mach_arch_get_sp’: mach-support-arm.c:32: error: ‘arm_thread_state_t’ undeclared (first use in this function) mach-support-arm.c:32: error: ‘arch_state’ undeclared (first use in this function) mach-support-arm.c:32: error: expected expression before ‘)’ token mach-support-arm.c:35: warning: control reaches end of non-void function mach-support-arm.c: In function ‘mono_mach_arch_get_mcontext_size’: mach-support-arm.c:40: error: invalid application of ‘sizeof’ to incomplete type ‘struct __darwin_mcontext’ mach-support-arm.c: In function ‘mono_mach_arch_thread_state_to_mcontext’: mach-support-arm.c:46: error: ‘arm_thread_state_t’ undeclared (first use in this function) mach-support-arm.c:46: error: ‘arch_state’ undeclared (first use in this function) mach-support-arm.c:46: error: expected expression before ‘)’ token mach-support-arm.c:49: error: dereferencing pointer to incomplete type mach-support-arm.c: In function ‘mono_mach_arch_get_thread_state_size’: mach-support-arm.c:55: error: ‘arm_thread_state_t’ undeclared (first use in this function) mach-support-arm.c:56: warning: control reaches end of non-void function mach-support-arm.c: In function ‘mono_mach_arch_get_thread_state’: mach-support-arm.c:61: error: ‘arm_thread_state_t’ undeclared (first use in this function) mach-support-arm.c:61: error: ‘arch_state’ undeclared (first use in this function) mach-support-arm.c:61: error: expected expression before ‘)’ token mach-support-arm.c:64: error: ‘ARM_THREAD_STATE_COUNT’ undeclared (first use in this function) make[4]: *** [mach-support-arm.lo] Error 1 Does anyone know how to overcome these errors? Much appreciated! Kamal On Jan 24, 2012, at 4:08 PM, Robert Jordan wrote: On 24.01.2012 19:39, Kamal Aboul-Hosn wrote: Hi, everyone, If I call mono