Re: [Mono-dev] FastCGI Mono Server
Hi Robert, I noticed that there is now a doc page at http://www.mono-project.com/FastCGI Is there a way to get some configuration instructions for Apache? Philippe Philippe Monnet wrote: Great news since my host has FastCGI enabled. I am not expecting an ETA and am grateful you're working on it. I'll be a guinea pig when the time comes. :-) Robert Jordan wrote: Philippe Monnet wrote: I recently read with interest Brian Nickel's project during the Google Summer Of Code on FastCGI (see http://kerrick.wordpress.com/ and http://mono-soc-2007.googlecode.com/svn/trunk/brian/FastCgi/doc/index.html). Especially since I am operating in a shared host with Apache 1.3. As such I cannot compile/install mod_mono into Apache (no access to headers / modules, etc.). Access to httpd.conf is not provided either, just .htaccess support. So mod_mono is out of reach for me. As is fastcgi in this case, unless it's already enabled by your provider. Is anyone on the core team looking to port / adapt some of his work? Or provide any other mechanism outside Apache modules? Are other users in the same situation too? I'm working on the integration of fastcgi-mono-server in Mono's build process, but I cannot give you an ETA for its landing other than "this month". 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
[Mono-dev] mono 95759 does not compile
here's the output: MONO_PATH=../class/lib/net_2_1:../class/lib/net_2_0:$MONO_PATH /home/onur/mono/mono/runtime/mono-wrapper ../mcs/gmcs.exe /codepage:65001 -d:GMCS_SOURCE -nowarn:618 -noconfig -r:mscorlib -r:System.dll -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -debug -target:exe -out:smcs.exe cs-parser.cs @ smcs.exe.sources Exception caught by the compiler while compiling: Block that caused the problem begin at: support.cs(457,28): Block being compiled: [support.cs(473,82):,support.cs (476,41):] System.MethodAccessException: Method `System.Text.StringBuilder:AppendFormat (string,object,object,object)' is inaccessible from method `AbstractMessage:Print ()' Unhandled Exception: System.MethodAccessException: Method `System.Text.StringBuilder:AppendFormat (string,object,object,object)' is inaccessible from method `AbstractMessage:Print ()' at Mono.CSharp.Report+WarningMessage.Print () [0x0] at Mono.CSharp.Report.Warning (Int32 code, Int32 level, Location loc, System.String format, System.String arg) [0x0] at Mono.CSharp.Block.UsageWarning (Mono.CSharp.UsageVector vector) [0x0] at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x0] at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x0] at Mono.CSharp.While.Resolve (Mono.CSharp.EmitContext ec) [0x0] at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x0] at Mono.CSharp.If.Resolve (Mono.CSharp.EmitContext ec) [0x0] at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x0] at Mono.CSharp.EmitContext.ResolveTopBlock (Mono.CSharp.EmitContextanonymous_method_host, Mono.CSharp.ToplevelBlock block, Mono.CSharp.Parameters ip, IM ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] FastCGI Mono Server
Hi Philippe, I was not aware about this page. Kudos to Miguel for creating it! Here a sample Apache configuration (beware of the line breaks the mail client might introduce): FastCgiServer /srv/www/cgi-bin/mono-server2 -socket /tmp/fastcgi-mono-server -initial-env MONO_FCGI_APPLICATIONS=/test:/srv/www/htdocs/test Location /test Action fastcgi-mono /cgi-bin/mono-server2 SetHandler fastcgi-mono /Location You need a copy of mono-server2 in the configured cgi-bin folder of your server and a copy of Mono's test site in /test of the document root. I'll update the wiki accordingly. Robert Philippe Monnet wrote: Hi Robert, I noticed that there is now a doc page at http://www.mono-project.com/FastCGI Is there a way to get some configuration instructions for Apache? Philippe Philippe Monnet wrote: Great news since my host has FastCGI enabled. I am not expecting an ETA and am grateful you're working on it. I'll be a guinea pig when the time comes. :-) Robert Jordan wrote: Philippe Monnet wrote: I recently read with interest Brian Nickel's project during the Google Summer Of Code on FastCGI (see http://kerrick.wordpress.com/ and http://mono-soc-2007.googlecode.com/svn/trunk/brian/FastCgi/doc/index.html). Especially since I am operating in a shared host with Apache 1.3. As such I cannot compile/install mod_mono into Apache (no access to headers / modules, etc.). Access to httpd.conf is not provided either, just .htaccess support. So mod_mono is out of reach for me. As is fastcgi in this case, unless it's already enabled by your provider. Is anyone on the core team looking to port / adapt some of his work? Or provide any other mechanism outside Apache modules? Are other users in the same situation too? I'm working on the integration of fastcgi-mono-server in Mono's build process, but I cannot give you an ETA for its landing other than this month. 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 ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Mono cross compile
2008/2/18 WebMaster [EMAIL PROTECTED]: I'm trying to cross compile mono for powerpc, compiling runtime is ok, but I was unable to compile msc and corresponding libraries. I've got sources from svn via anonymous access. Can anyone give me some suggestions how to do this? Thank for answers. The procedure that I have been using is similar to the one on the Mono ARM port page http://www.mono-project.com/Mono:ARM On the Host, build as normal (not cross compile) ./configure make install DESTDIR=`pwd`/tmptree Copy the files from tmptree to your Target platform. On the Target platform, build mono without mcs: ./configure --disable-mcs-build make install This will install over the top of the files you copied from the Host. I can't get the mcs or gmcs to work on my Target, but I can run assemblies compiled on the Host OK. I have a bug open for this issue: https://bugzilla.novell.com/show_bug.cgi?id=355025 Good luck, Bill ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] [PATCH] Cache errno for serial port
Hey, The attached patch adds a 'serial_errno' variable in mono/support/serial.c, to cache the last error related to serial port functions. At first I tried to just create a function directly retrieving errno, but it was getting a different value from the original (probably some code modified it after the pinvoke call?). This is needed to a simple but better error reporting in the System.IO.Ports.SerialPort class. 1. Carlos. Index: serial.c === --- serial.c (revisión: 96026) +++ serial.c (copia de trabajo) @@ -60,15 +60,16 @@ Rts = 16 /* Request to send */ } MonoSerialSignal; +/* Last error related to serial port */ +static int serial_errno; + int open_serial (char* devfile) { int fd; fd = open (devfile, O_RDWR | O_NOCTTY | O_NONBLOCK); + serial_errno = errno; - if (fd == -1) - return -1; - return fd; } @@ -79,11 +80,18 @@ } guint32 -read_serial (int fd, guchar *buffer, int offset, int count) +read_serial (int fd, guchar *buffer, int offset, int count, int timeout) { guint32 n; + struct pollfd ufd; + ufd.events = POLLHUP | POLLIN | POLLERR; + + poll (ufd, 1, timeout); + if ((ufd.revents POLLIN) != POLLIN) + return -1; n = read (fd, buffer + offset, count); + serial_errno = errno; return (guint32) n; } @@ -114,6 +122,7 @@ } t = write(fd, buffer + offset, count); + serial_errno = errno; if (timeout 0) { @@ -142,6 +151,7 @@ gint32 retval; if (ioctl (fd, input ? FIONREAD : TIOCOUTQ, retval) == -1) { + serial_errno = errno; return -1; } @@ -310,6 +320,7 @@ if (cfsetospeed (newtio, baud_rate) 0 || cfsetispeed (newtio, baud_rate) 0 || tcsetattr (fd, TCSANOW, newtio) 0) { + serial_errno = errno; return FALSE; } else @@ -368,6 +379,7 @@ *error = 0; if (ioctl (fd, TIOCMGET, signals) == -1) { + serial_errno = errno; *error = -1; return NoneSignal; } @@ -393,8 +405,10 @@ else signals = ~expected; - if (ioctl (fd, TIOCMSET, signals) == -1) + if (ioctl (fd, TIOCMSET, signals) == -1) { + serial_errno = errno; return -1; + } return 1; } @@ -419,6 +433,7 @@ while (poll (pinfo, 1, timeout) == -1 errno == EINTR) { /* EINTR is an OK condition, we should not throw in the upper layer an IOException */ if (errno != EINTR){ + serial_errno = errno; *error = -1; return FALSE; } @@ -427,6 +442,12 @@ return (pinfo.revents POLLIN) != 0 ? 1 : 0; } +gint32 +get_last_serial_error () +{ + return serial_errno; +} + /* * mono internals should not be used here. * this serial stuff needs to be implemented with icalls. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list