Re: [Mono-dev] [PATCH] Android Support [1/4]

2010-05-21 Thread damian

I'm also interested in this.  I'm trying to run configure with options to
make it use the android ndk tools etc. as described here:
http://warpedtimes.wordpress.com/category/technology/android-technology/

It falls over when wanting to compile test code, so I'm setting various
options to get it to go a little further, but it is painful ... any help
would be very much appreciated (such as the magic ./configure comand line).

Thanks,
Damian


JeroMiya wrote:
 
 Oops, meant to send this to the list.
 
 Just a quick question. I'm new to the mono build process - with these
 changes, how do you target the android platform when building mono/mcs?
 
 ...
 
-- 
View this message in context: 
http://mono.1490590.n4.nabble.com/PATCH-Android-Support-1-4-tp2016287p2226260.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] [PATCH] Fix for not being able to cache __thread and signalstack checks

2009-09-18 Thread Damian Kaczmarek
Good evening ladies and gentlemen,
My first message here so please indulge my lack of experience
regarding customs on this mailing list.
I am cross compiling mono for ARM and encountered a problem with
having to modify configure to skip __thread and signalstack checks.
Thinking how to do it the right way I modified configure.in to allow
caching for those checks. I attach the patch for your approval (or
not).

Now the following cache allows to cross-compile without having to run
any test programs by configure:
mono_cv___thread=${mono_cv___thread=yes}
mono_cv_signalstack=${mono_cv_signalstack=yes}
mono_cv_sizeof_sunpath=${mono_cv_sizeof_sunpath=108}
mono_cv_stack_grows=${mono_cv_stack_grows=no}
mono_cv_uscore=${mono_cv_uscore=no}

Best regards,
Damian Kaczmarek
Index: configure.in
===
--- configure.in	(wersja 142248)
+++ configure.in	(kopia robocza)
@@ -1208,146 +1208,150 @@
 	dnl ***
 	dnl *** Checks for working __thread ***
 	dnl ***
-	AC_MSG_CHECKING(for working __thread)
 	if test x$with_tls != x__thread; then
+		AC_MSG_CHECKING(for working __thread)
 		AC_MSG_RESULT(disabled)
 	else
-		AC_TRY_RUN([
-			#include pthread.h
-			__thread int i;
-			static int res1, res2;
+		AC_CACHE_CHECK(for working __thread, mono_cv___thread,
+			AC_TRY_RUN([
+#include pthread.h
+__thread int i;
+static int res1, res2;
 
-			void thread_main (void *arg)
-			{
-i = arg;
-sleep (1);
-if (arg == 1)
-	res1 = (i == arg);
-else
-	res2 = (i == arg);
-			}
+void thread_main (void *arg)
+{
+	i = arg;
+	sleep (1);
+	if (arg == 1)
+		res1 = (i == arg);
+	else
+		res2 = (i == arg);
+}
 
-			int main () {
-pthread_t t1, t2;
+int main () {
+	pthread_t t1, t2;
 
-i = 5;
+	i = 5;
 
-pthread_create (t1, NULL, thread_main, 1);
-pthread_create (t2, NULL, thread_main, 2);
+	pthread_create (t1, NULL, thread_main, 1);
+	pthread_create (t2, NULL, thread_main, 2);
 
-pthread_join (t1, NULL);
-pthread_join (t2, NULL);
+	pthread_join (t1, NULL);
+	pthread_join (t2, NULL);
 
-return !(res1 + res2 == 2);
-			}
-		], [
-AC_MSG_RESULT(yes)
-		], [
-AC_MSG_RESULT(no)
-with_tls=pthread
-		])
+	return !(res1 + res2 == 2);
+}
+			], [
+	mono_cv___thread=yes
+			], [
+	with_tls=pthread
+	mono_cv___thread=no
+			])
+		)
 	fi
 
 	dnl **
 	dnl *** Checks for working sigaltstack ***
 	dnl **
-	AC_MSG_CHECKING(for working sigaltstack)
 	if test x$with_sigaltstack != xyes; then
+		AC_MSG_CHECKING(for working sigaltstack)
 		AC_MSG_RESULT(disabled)
 	else
-		AC_TRY_RUN([
-			#include stdio.h
-			#include stdlib.h
-			#include unistd.h
-			#include signal.h
-			#include pthread.h
-			#include sys/wait.h
-			#if defined(__FreeBSD__) || defined(__NetBSD__)
-			#define SA_STACK SA_ONSTACK
-			#endif
-			static void
-			sigsegv_signal_handler (int _dummy, siginfo_t *info, void *context)
-			{
-exit (0);
-			}
+		AC_CACHE_CHECK(for working signalstack, mono_cv_signalstack,
+			AC_TRY_RUN([
+#include stdio.h
+#include stdlib.h
+#include unistd.h
+#include signal.h
+#include pthread.h
+#include sys/wait.h
+#if defined(__FreeBSD__) || defined(__NetBSD__)
+#define SA_STACK SA_ONSTACK
+#endif
+static void
+sigsegv_signal_handler (int _dummy, siginfo_t *info, void *context)
+{
+	exit (0);
+}
 
-			static void *
-			loop (void *ignored)
-			{
-char *ptr = NULL;
+static void *
+loop (void *ignored)
+{
+	char *ptr = NULL;
 
-*ptr = 0;
-return NULL;
-			}
+	*ptr = 0;
+	return NULL;
+}
 
-			static void
-			child ()
-			{
-struct sigaction sa;
-struct sigaltstack sas;
-pthread_t id;
-pthread_attr_t attr;
+static void
+child ()
+{
+	struct sigaction sa;
+	struct sigaltstack sas;
+	pthread_t id;
+	pthread_attr_t attr;
 
-sa.sa_sigaction = sigsegv_signal_handler;
-sigemptyset (sa.sa_mask);
-sa.sa_flags = SA_SIGINFO | SA_ONSTACK;
-if (sigaction (SIGSEGV, sa, NULL) == -1) {
-	perror (sigaction);
-	return;
-}
+	sa.sa_sigaction = sigsegv_signal_handler;
+	sigemptyset (sa.sa_mask);
+	sa.sa_flags = SA_SIGINFO | SA_ONSTACK;
+	if (sigaction (SIGSEGV, sa, NULL) == -1) {
+		perror (sigaction);
+		return;
+	}
 
-sas.ss_sp = malloc (SIGSTKSZ);
-sas.ss_size = SIGSTKSZ;
-sas.ss_flags = 0;
-if (sigaltstack (sas, NULL) == -1) {
-	perror (sigaltstack);
-	return;
-}
+	sas.ss_sp = malloc (SIGSTKSZ);
+	sas.ss_size = SIGSTKSZ;
+	sas.ss_flags = 0;
+	if (sigaltstack (sas, NULL) == -1) {
+		perror (sigaltstack);
+		return;
+	}
 
-pthread_attr_init (attr);
-if (pthread_create(id, attr, loop

[Mono-dev] problems config #develop

2007-03-27 Thread Kristian Damian
sorry but i'm a newby in mono and i have problems to compiling programs with 
#Develop, already add the variables GTK_BASEPATH, MONO_PATH, MONO_CFG_DIR and 
MONO_EXTERNAL_ENCODINGS with value 'default_local', but still appears the 
message 
--

GeneraciĆ³n iniciada.

C:\Archivos de 
programa\SharpDevelop\2.1\bin\SharpDevelop.Build.Mono.Gmcs.targets(82,9) : 
Error MSB6006: Gmcs.exe exited with code -1.

GeneraciĆ³n finalizada correctamente.

Gmcs.exe exited with code -1. (MSB6006) - C:\Archivos de 
programa\SharpDevelop\2.1\bin\SharpDevelop.Build.Mono.Gmcs.targets:82,9
--

i hope you can help me



Kristian 

pd. sorry but i don speke (or write) english very well

 
-- 
Notice of Confidentiality: 
The information transmitted is intended o
nly for the person or entity to 
which it is addressed and may contain confi
dential and/or privileged 
material. Any review, re-transmission, disseminat
ion or other use of, or 
taking of any action in reliance upon, this informa
tion by persons or 
entities other than the intended recipient is prohibited
. If you received 
this in error, please contact the sender immediately by r
eturn electronic 
transmission and then immediately delete this transmission
, including all 
attachments, without copying, distributing or disclosing sa
me. 
--
Aviso de Confidencialidad: 
Este correo electronico y/o el material 
adjunto es para uso exclusivo de la 
persona o entidad a la que expresamente
 se le ha enviado, y puede contener 
informacion confidencial o material pri
vilegiado. Si usted no es el 
destinatario legtimo del mismo, por favor repo
rtelo inmediatamente al 
remitente del correo y borrelo. Cualquier revision,
 retransmision, difusion 
o cualquier otro uso de este correo, por personas 
o entidades distintas a 
las del destinatario legitimo, queda expresamente p
rohibido. Este correo 
electronico no pretende ni debe ser considerado como 
constitutivo de ninguna 
relacion legal, contractual o de otra indole simila
r. 


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


RE: [Mono-devel-list] XML deserialization - System.FormatExceptionon System.DateTime.ParseExact()

2005-05-31 Thread Hickey, Damian (Exchange)
Am away from this evening for a few days, so will do when I get back.

- Damian

-Original Message-
From: Lluis Sanchez [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 30, 2005 8:43 AM
To: Hickey, Damian (Exchange)
Cc: mono-devel-list@lists.ximian.com
Subject: Re: [Mono-devel-list] XML deserialization -
System.FormatExceptionon System.DateTime.ParseExact()

Hi,

Can you please file a bug report in bugzilla.ximian.com, attaching a
simple test application that can be used to reproduce the issue?

The solution will be to be compatible with MS.NET, even if that means
not being fully compatible with the specs.

Lluis.

On dj, 2005-05-26 at 16:05 +0100, Hickey, Damian (Exchange) wrote:
 Hi All,
 
  
 
 This is my first foray into the land of Mono after a few years on
 MS .Net. and am very happy with the level of compatibility. I've just
 subbed to this mailing list, so if I break any rules do let me know...
 
  
 
 I'm having a problem with XML deserialization and am wondering if it's
 a bug related to 71290 (http://bugzilla.ximian.com/show_bug.cgi?
 id=71290) or not and if anyone can help? The code works under MS.Net
 1.1, but not Mono 1.1.7 (on Windows XP).
 
  
 
 So I have this simple piece of xml:
 
  
 
 InventoryPositionBase
 xmlns=urn:company.com:Application.Messages:v1.0
 
   ProductId9496/ProductId
 
   PortfolioId175/PortfolioId
 
   PublishDate2005-05-25-04:00/PublishDate
 
 /InventoryPositionBase
 
  
 
 And during deserialization the following exception is thrown:
 
  
 
 System.Reflection.TargetInvocationException: Exception has been thrown
 by the target of an invocation. --- System.FormatException: Invalid
 format.
 
 in 0x000fe System.DateTime:ParseExact (System.String s,
 System.String[] formats, IFormatProvider fp, DateTimeStyles style)
 
 in 0x00040 System.DateTime:ParseExact (System.String s,
 System.String format, IFormatProvider fp, DateTimeStyles style)
 
 in 0x00019 System.DateTime:ParseExact (System.String s,
 System.String format, IFormatProvider fp)
 
 in 0x0050f

Mono.GeneratedSerializers.Literal.GeneratedReader:ReadObject_InventoryPo
sitionBaseData (Boolean isNullable, Boolean checkType)
 
 in 0x00086

Mono.GeneratedSerializers.Literal.GeneratedReader:ReadRoot_InventoryPosi
tionBaseData ()
 
 in 0x0 unknown method
 
 in (wrapper managed-to-native)
 System.Reflection.MonoMethod:InternalInvoke (object,object[])
 
 in 0x0006f System.Reflection.MonoMethod:Invoke (System.Object obj,
 BindingFlags invokeAttr, System.Reflection.Binder binder ,
 System.Object[] parameters, System.Globalization.CultureInfo culture)
 
 --- End of inner exception stack trace ---
 
 in 0x00104 System.Reflection.MonoMethod:Invoke (System.Object obj,
 BindingFlags invokeAttr, System.Reflection.Binder binder,
 System.Object[] parameters, System.Globalization.CultureInfo culture)
 
 in 0x00017 System.Reflection.MethodBase:Invoke (System.Object obj,
 System.Object[] parameters)
 
 in 0x00073 System.Xml.Serialization.XmlSerializer:Deserialize
 (System.Xml.Serialization.XmlSerializationReader reader)
 
 in 0x0004a System.Xml.Serialization.XmlSerializer:Deserialize
 (System.Xml.XmlReader xmlReader)
 
 in 0x0003c System.Xml.Serialization.XmlSerializer:Deserialize
 (System.IO.TextReader textReader)
 
 in 0x00091 Messages.Utility:Deserialize (System.Byte[] msg,
 System.Type type)
 
 in 0x0009c ...
 
  
 
 I managed to grab the emitted code that performs the xml to object
 parsing and it looks like the problem occurs when parsing the
 PublishDate element during the ReadObject_InventoryPositionBaseData
 method.  The offending line of code:
 
  
 
 [EMAIL PROTECTED] = DateTime.ParseExact(Reader.ReadElementString (),
 -MM-dd, CultureInfo.InvariantCulture);
 
  
 
 The problem here is that the datetime in the xml does not, and
 probably never will, match the format (2nd parameter) in the above
 statement. This format does not take into account a time or timezone
 component i.e. 2005-05-26T16:01:36+01:00
 
  
 
 Is this a bug or have I done something completely wrong?
 
  
 
 Help and ideas appreciated.
 
  
 
 All the best,
 
  
 
 Damian
 
 
 fitxer adjunt Document de text pla (Disclaimer.txt)
 
 **
 Please be aware that, notwithstanding the fact that the person sending
 this communication has an address in Bear Stearns' e-mail system, this
 person is not an employee, agent or representative of Bear Stearns.
 Accordingly, this person has no power or authority to represent, make
 any recommendation, solicitation, offer or statements or disclose
 information on behalf of or in any way bind Bear Stearns or any of its
 affiliates.
 **
 
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

RE: [Mono-devel-list] XML deserialization - System.FormatException on System.DateTime.ParseExact()

2005-05-27 Thread Hickey, Damian (Exchange)
Hi Atsushi,

Thank you for your reply :)

I do have an XSD that describes that piece of XML and the type is
xs:date, I am using a codegen tool (a modified xsd.exe) to create
classes from the XSD; the output of which, PublishedDate type is
System.DateTime, and has an attribute
[System.Xml.Serialization.XmlElementAttribute(DataType=date)]. 

According to W3C, xs:date can have an optional timezone property
(http://www.w3.org/TR/xmlschema-2/#date) so -MM-dd pattern will
fail if a timezone is present.

Your patch seems resemble the output from MS.NET serializer on my class,
which is:

[EMAIL PROTECTED] = ToDate(Reader.ReadElementString());

Thanks again, looking forward to 1.1.8!

- Damian



-Original Message-
From: Atsushi Eno [mailto:[EMAIL PROTECTED] 
Sent: 26 May 2005 17:17
To: Hickey, Damian (Exchange)
Cc: mono-devel-list@lists.ximian.com; Lluis Sanchez
Subject: Re: [Mono-devel-list] XML deserialization -
System.FormatException on System.DateTime.ParseExact()

Hello,

 System.Reflection.TargetInvocationException: Exception has been thrown
 by the target of an invocation. --- System.FormatException: Invalid
 format.
 
 in 0x000fe System.DateTime:ParseExact (System.String s,
 System.String[] formats, IFormatProvider fp, DateTimeStyles style)
 
 in 0x00040 System.DateTime:ParseExact (System.String s,
System.String
 format, IFormatProvider fp, DateTimeStyles style)
 
 in 0x00019 System.DateTime:ParseExact (System.String s,
System.String
 format, IFormatProvider fp)
 
 in 0x0050f

Mono.GeneratedSerializers.Literal.GeneratedReader:ReadObject_InventoryPo
 sitionBaseData (Boolean isNullable, Boolean checkType)

 [EMAIL PROTECTED] = DateTime.ParseExact (Reader.ReadElementString (),
 -MM-dd, CultureInfo.InvariantCulture);
 
 The problem here is that the datetime in the xml does not, and
probably
 never will, match the format (2nd parameter) in the above statement.
 This format does not take into account a time or timezone component
i.e.
 2005-05-26T16:01:36+01:00

Maybe your PublishedDate is xs:date, since -MM-dd pattern
is used only for xs:date type. If the type is xs:dateTime, then
XmlConert.ToDateTime() will be used (and it allows many more
patterns). If it is allowed in MS.NET, maybe attached patch will
fix it.

Lluis: maybe you can check the patch sanity?

Atsushi Eno





**
Please be aware that, notwithstanding the fact that the person sending
this communication has an address in Bear Stearns' e-mail system, this
person is not an employee, agent or representative of Bear Stearns.
Accordingly, this person has no power or authority to represent, make
any recommendation, solicitation, offer or statements or disclose
information on behalf of or in any way bind Bear Stearns or any of its
affiliates.
**

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-devel-list] XML deserialization - System.FormatException on System.DateTime.ParseExact()

2005-05-26 Thread Hickey, Damian (Exchange)








Hi All,



This is my first foray into the land of Mono
after a few years on MS .Net. and am very happy with the level of
compatibility. I've just subbed to this mailing list, so if I break any rules
do let me know...



I'm having a problem with XML deserialization and am
wondering if its a bug related to 71290 (http://bugzilla.ximian.com/show_bug.cgi?id=71290)
or not and if anyone can help? The code works under MS.Net 1.1, but not Mono
1.1.7 (on Windows XP).



So I have this simple piece of xml:



InventoryPositionBase
xmlns=urn:company.com:Application.Messages:v1.0


ProductId9496/ProductId


PortfolioId175/PortfolioId


PublishDate2005-05-25-04:00/PublishDate

/InventoryPositionBase



And during deserialization the following exception is
thrown:



System.Reflection.TargetInvocationException:
Exception has been thrown by the target of an invocation. ---
System.FormatException: Invalid format.

in 0x000fe System.DateTime:ParseExact
(System.String s, System.String[] formats, IFormatProvider fp, DateTimeStyles
style)

in 0x00040 System.DateTime:ParseExact
(System.String s, System.String format, IFormatProvider fp, DateTimeStyles
style)

in 0x00019 System.DateTime:ParseExact
(System.String s, System.String format, IFormatProvider fp)

in 0x0050f
Mono.GeneratedSerializers.Literal.GeneratedReader:ReadObject_InventoryPositionBaseData
(Boolean isNullable, Boolean checkType)

in 0x00086
Mono.GeneratedSerializers.Literal.GeneratedReader:ReadRoot_InventoryPositionBaseData
()

in 0x0 unknown method

in (wrapper managed-to-native)
System.Reflection.MonoMethod:InternalInvoke (object,object[])

in 0x0006f
System.Reflection.MonoMethod:Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder , System.Object[] parameters,
System.Globalization.CultureInfo culture)

--- End of inner exception stack trace ---

in 0x00104
System.Reflection.MonoMethod:Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture)

in 0x00017
System.Reflection.MethodBase:Invoke (System.Object obj, System.Object[]
parameters)

in 0x00073
System.Xml.Serialization.XmlSerializer:Deserialize (System.Xml.Serialization.XmlSerializationReader
reader)

in 0x0004a
System.Xml.Serialization.XmlSerializer:Deserialize (System.Xml.XmlReader
xmlReader)

in 0x0003c
System.Xml.Serialization.XmlSerializer:Deserialize (System.IO.TextReader
textReader)

in 0x00091 Messages.Utility:Deserialize
(System.Byte[] msg, System.Type type)

in 0x0009c 



I managed to grab the emitted code that performs the xml to
object parsing and it looks like the problem occurs when parsing the
PublishDate element during the ReadObject_InventoryPositionBaseData method.
The offending line of code:



ob.@PublishDate = DateTime.ParseExact
(Reader.ReadElementString (), -MM-dd, CultureInfo.InvariantCulture);



The problem here is that the datetime in the xml does not, and
probably never will, match the format (2nd parameter) in the above
statement. This format does not take into account a time or timezone component
i.e. 2005-05-26T16:01:36+01:00



Is this a bug or have I done something completely wrong?



Help and ideas appreciated.



All the best,



Damian








**
Please be aware that, notwithstanding the fact that the person sending
this communication has an address in Bear Stearns' e-mail system, this
person is not an employee, agent or representative of Bear Stearns.
Accordingly, this person has no power or authority to represent, make
any recommendation, solicitation, offer or statements or disclose
information on behalf of or in any way bind Bear Stearns or any of its
affiliates.
**

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list