X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=web%2Ffaq;h=d34f5809fec7021d487e832ad2aae12337108e60;hb=57bb76d648c7bc42d55c9d30e46dacbe8abc6600;hp=485651dd247a3fbeb6ad5c3d427e90a670c4e8be;hpb=07ef78ce0790cccccc05d53ab341effad6c77c84;p=mono.git diff --git a/web/faq b/web/faq index 485651dd247..d34f5809fec 100644 --- a/web/faq +++ b/web/faq @@ -3,6 +3,8 @@ Mono and GNOME
Building GUI applications with Mono
Mono and Microsoft
+Mono platforms
+Compatibility
Mono and the Portable.NET Project
Web Services
Mono and ASP.NET
@@ -128,6 +130,17 @@ A: Different parts of Mono will achieve usability at different stages, Other higher level class libraries (ASP.NET, ADO.NET, WinForms) will be released when they become stable. +Q: When will Mono 1.0 ship? + +A: We are planning on releasing Mono 1.0 (Mono Core) which will ship all the + components of Mono that are known to be stable in Q4 2003. + + This release will lack System.Windows.Forms and + Enterprise.Services, as they will not be production ready on this timeframe. + + Mono 1.2 should come in Q2 2004 and include the missing components + libraries that will make Mono feature-compatible with .NET 1.0 + Q: What major components will you include in Mono? A: Hopefully everything that Microsoft ships on their Framework @@ -270,6 +283,30 @@ A: Gtk# is a set of bindings for the Gtk+ toolkit for C# (and other CIL-enabled languages). System.Windows.Forms is an API defined by Microsoft to build GUI applications. +Q: Why not implement System.Windows.Forms on top of Gtk# or Qt#? + +A: There are several reasons for this. + + First of all, Gtk+ and Qt are standard toolkits on Linux, and their + proponents want to use their favorite toolkits when writing + applications. + + Related to this is the idea that System.Windows.Forms is + brain-dead in certain areas, such as internationalization. + System.Windows.Forms uses explicit sizes for all controls, as opposed + to Gtk+ and Qt which use a box/packing model, which can better deal with + the different string lengths different languages will have. + + Next is compatibility. It is not possible to implement + System.Windows.Forms on top of Gtk+/Qt and have 100% compatibility, + because System.Windows.Forms exposes some Win32-isms, such as the + Win32 message loop. In order to maintain compatibility, Wine must be used, + and this is being done; see the + System.Windows.Forms effort page. + + Additionally, Wine apps don't currently fit in -- visually -- with + Gtk+ or Qt apps. + Q: Will I be able to run my smart clients on systems powered by Mono? A: As long as your applications are 100% .NET and do not make use @@ -314,14 +351,16 @@ A: We do not know, volunteers are working on this, but there is no set Q: Is Microsoft helping Ximian with this project? -A: No. Ximian CTO Miguel de Icaza had a friendly conversation with - Microsoft software architect David Stutz, but that's about the - extent of the contact. Microsoft is interested in other - implementations of .NET and are willing to help make the ECMA spec - more accurate for this purpose. +A: There is no high level communication between Ximian and Microsoft + at this point, but engineers who work on .NET or the ECMA groups + have been very friendly, and very nice to answer our questions, or + clarify part of the specification for us. + + Microsoft is interested in other implementations of .NET and are + willing to help make the ECMA spec more accurate for this purpose. - Ximian representatives have also spoken with Sam Ruby at the ECMA - TG3 committee to discuss the same issues. + Ximian was also invited to participate in the ECMA committee + meetings for C# and the CLI. Q: Is Microsoft or Corel paying Ximian to do this? @@ -425,6 +464,82 @@ A: Not yet, but the client side API for authentication is not the problem. Alliance APIs. The problem is people on the web provider end that might use this for authentication. + +** Mono Platforms + +Q: What operating systems does Mono run on? + +A: Mono is known to run on Linux, Unix and Windows systems. + +Q: What architectures does Mono support? + +A: Mono today ships with a Just-in-Time compiler for x86-based + systems. It is tested regularly on Linux, FreeBSD and Windows + (with the XP/NT core). + + There is also an interpreter, which is slower that runs on the + s390, SPARC and PowerPC architectures. + +Q: Can Mono run on Windows 9x, or ME editions? + +A: Mono requires Unicode versions of Win32 APIs to run, + and only a handful of *W functions is supported under Win9x. + + There is Microsoft Layer for Unicode that provides implementation + of these APIs on 9x systems. + + Unfortunately it uses linker trick for delayed load that is not + supported by ld, so some sort of adapter is necessary. + + You will need MSLU and one of the following libs to link Mono to + unicows.dll http://mono.eurosoft.od.ua/files/unimono.zip + or alternatively search the net for "libunicows". + + No changes to Mono source code required, the only thing is to make + sure that linker will resolve imports to adapter library instead of + Win32 libs. This is achieved by inserting -lunimono before + -lkerner32/user32 in the linker's specs file. + + +** Compatibility + +Q: Can Mono run applications developed with the Microsoft.NET fraemwork? + +A: Yes, Mono can run applications developed with the Microsft .NET Framework + on Unix. There are a few caveats to keep in mind: Mono has not + been completed yet, so a few API calls might be missing; And in + some cases the Mono behavior *might* be incorrect. + +Q: Will missing API entry points be implemented? + +A: Yes, the goal of Mono is to implement precisely the .NET Framework + API (as well as compile-time selectable subsets, for those + interested in a lighter version of Mono). + +Q: If the behavior of an API call is different, will you fix it? + +A: Yes, we will. But we will need your assistance for this. If you find a bug + in the Mono implementation, please fill a bug report in http://bugzilla.ximian.com. + Do not assume we know about the problem, we might not, and using the bug tracking + system helps us organize the development process. + +Q: Can I develop my applications on Windows, and deploy on a supported + Mono platform (like Linux)? + +A: Yes, you can. + + As of today, Mono is not 100% finished, so it is sometimes useful + to compile the code with Mono, to find out if your application + depends on unimplemented functionality. + +Q: Will applications run out the box with Mono? + +A: Sometimes they will. But sometimes a .NET application might invoke + Win32 API calls, or assume certain patterns that are not correct + for cross-platform applications. + ** Mono and Portable.NET @@ -436,45 +551,72 @@ A: Most of Mono is being written using C#, with only It is easier to describe what is unique about Mono: + In general, Mono is more mature and complete since it has been used + to develop itself, which is a big motivator for stability and + correctness, while Portable.NET remains pretty much an untested + platform. + +Q: I hear Mono keeps changing the P/Invoke API, why? + +A: We are just fixing our implementation to be compatible with the + Microsoft implementation. In other words, the Mono P/Invoke API is + more complete when compared to the Portable.NET version, hence + various pieces of software that depend on this extended + functionality fail to work properly with Portable.NET. + ** Web Services @@ -512,10 +654,11 @@ A: Yes. The CLI contains enough information about a class that exposing it to other RPC systems (like CORBA) is really simple, and does not even require support from an object. - We will be implementing CORBA inter-operation as an extension to the - Mono classes so that we can integrate with Bonobo, just like - Microsoft provides COM inter-operation classes and support - mechanisms. + Remoting.CORBA is + a CORBA implementation that is gaining momentum. + + Building an implementation of the Bonobo interfaces once this is ready + should be relatively simple. Q: Can I serialize my objects to other things other than XML? @@ -524,21 +667,49 @@ A: Yes, although the serializing tools have not yet been planned, and Q: Will Mono use ORBit? -A: No. Mono will be using a new implementation of CORBA that isn't still started. +A: There are a few advantages in using ORBit, like reusing existing code + and leveraging all the work done on it. Michael Meeks has posted + a few reasons, + as well as some ideas + that could be used to reuse ORBit. + + Most users are likely to choose a native .NET solution, like Remoting.CORBA + ** MonoDoc Q: What is MonoDoc? -A: MonoDoc is a graphical documentation editor and viewer. Currently, MonoDoc - consists of a Gtk# application and is in heavy development. There is also a - Qt# version of it. - +A: MonoDoc is a graphical documentation browser for the Mono class + libraries. Currently, monodoc consists of a Gtk# application and is + in heavy development. ** Development Tools and Issues +Q: I am having trouble compiling a new version of Mono from CVS, it + complains about my runtime being out of sync. + +A: Jonathan Pryor has provided the following answer: + + To upgrade your class libraries and compiler, see the See + README.building in the MCS directory. + + The single biggest source of confusion seems to be the "Your + runtime is out of sync" messages. Realize that this is *normal* + while BUILDING. Think about it: you're building a new class + library with the old runtime. If the new class library references + a function that the old runtime knows nothing about, the runtime + system issues this warning. + + Basically what needs to happen is for a new mono runtime to be + compiled, then the corlib class library be compiled, and once this + is done, install the new runtime, followed by corlib. + + Once this is done, you can continue building your entire + environment. + Q: Will it be possible to use the CLI features without using byte codes or the JIT? @@ -555,6 +726,9 @@ A: With any luck, Free Software enthusiasts will contribute tools to initially using the Microsoft implementation of the CLI and then executed later with Mono. + We are recommending people to use and contribute to existing + projects like SharpDevelop, Anjuta and Eclipse. + Q: What kind of rules make the Common Intermediate Language useful for JITers? @@ -582,32 +756,14 @@ A: In Mono, xsp is just the name of the C# code generator for ASP.NET Pages" technology so as they are very different things, they don't conflict. -Q: What about using something like Jabber instead of the System.Messaging - namespace?. - -A: In short, MSMQ is not something like Jabber, but asynchronous messaging - through queues. Useful queues do more than serialize messages, they are - also platform bridges. - -Q: Are you supporting XMLDocument and relatives?. - -A: Currently, we aren't implementing them yet. It would require updates to - most of the XmlNode derivatives so it's not a trivial task. We are - currently focusing on getting XPath support working. - Q: Is there any plan to develop an aspx server for Mono?. -A: The web server turned out to be very simple compared to the rest of the - work. Gonzalo has got the page generator mostly done (a module called - xsp, who has nothing to do with the XSP term used in the Apache Project). - Patrik has done a lot of the work to get the ProcessRequest to work. - You can try to help in the final touches to the System.Web classes and - writing regression tests for the widgets we have. +A: The XSP reference server is available and you can also use mod_mono + with Apache. Q: Is there any way I can develop the class libraries using Linux yet? -A: Yes. Some class libraries can be developed on Linux. Search for - Paolo's post (he lists which classes can be compiled fine now). +A: Yes. Mono has been self hosting since May 2002. Q: Is there any way I can install a known working copy of mono in /usr, and an experimental copy somewhere else, and have both copies use @@ -627,61 +783,115 @@ Q: Would it be too terrible to have another corlib signed as mscorlib? A: We rename corlib to mscorlib also when saving the PE files, in fact, the runtime can execute program created by mono just fine. -Q: Is there a relatively straightforward way to repeat the steps taken - by Paolo to get Mono completely self-hosted on Linux? - -A: To build the compiler and class libraries in Linux, run: - - - If you want to produce and distribute a monocharge tarball, run: - make -f makefile.gnu dist - Of course you have to run these in the top level mcs directory. - Q: Is it possible to build a C# file to some sort of intermediate format which can linked into a final module, like the traditional .c -> .o -> .so path? -A: You could do: mcs /target:module file1.cs, mcs /target:module file2.cs, - mcs /target:exe file1.dll file2.dll /out:mybin.exe +A: You can use: + + mcs /target:library file1.cs, mcs /target:library file2.cs, + mcs /target:exe file1.dll file2.dll /out:mybin.exe + +Q: Is there any plans for implementing remoting in the near future? + +A: The remoting infrastructure is in place. We have implementations + of the TcpChannel, HttpChannel and the Soap and Binary Formatters. + They are compatible with .NET. + + However, some classes from the library may have a different binary + representation, because they may have a different internal data + structure, so for example you won't be able to exchange a Hastable + object between Mono and MS.NET. It should not be a problem if you + are using primitive types, arrays or your own classes. In any case, + could you post a test case? + + +Q: My C code uses the __stdcall which is not availble on Linux, how can I + make the code portable Windows/Unix across platforms? + +A: Replace the __stdcall attribute with the STDCALL macro, and include this + in your C code for newer gcc versions: + + #ifndef STDCALL + #define STDCALL __attribute__((stdcall)) + #endif + +Q: I want to be able to execute Mono binaries, without having to use the "mono" + command. How can I do this? + +A: From Carlos Perelló: + + I think that the best solution is the binfmt feature with the + wrapper that exists with Debian packages at: -Q: Is there any plans for implementing remoting in the near future?, When will - work in System.Runtime.Remoting.dll start? + http://www.debianplanet.org/mono/dists/unstable/main/source/admin/ -A: The remoting infrastructure is in place. Some of the channels and - formatters are not. + If you want use it with Big endian machines, you should apply a patch + (http://carlos.pemas.net/debian/mono/binfmt-detector-cli.c.diff) -Q: I'm wondering if there are any plans to start using nant to build the - class lib + test lib. i think that every project need/should use an - automated build process and nant + a couple of tools enables this. is - the problem that the compiler can't run nant yet? + It works really good and lets you use wine also, it reads the .exe file + headers and check if it's a .net executable. -A: Maybe well be doing some sort of automated build process + testing when - the summer finish. + This way you just execute: ./my-cool-mono-application.exe and it works + without the need of any wrapper. + +Q: I see funny characters when I run programs, what is the problem? + +A: (From Peter Williams and Gonzalo Paniagua): + + This is Red Hat 9 (probably) using UTF8 on its console; the bytes are + the UTF8 endianness markers. You can do: + + LC_ALL=C mono myexe.exe + + And they wont show up. + + Alternatively, you can do: + + $ echo -e "\033%G" + + to enable UTF-8 on the console. ** Mono and ASP.NET -Q: Is Mono supporting ASP.NET? +Q: Does Mono support ASP.NET? + +A: Yes. -A: Yes. The development of the support for ASP.NET comes in various stages, - here is what Gonzalo has been working on: 1. The Parser. 2. Getting the - parser to generate output compatible with ASP.NET. 3. Running the sample - output with the real Microsoft runtime but using our generated page. 4. - Running the sample with our classes with the .NET runtime. 5. Running - our sample code with our classes with our runtime. This is the process - we are following. Currently Gonzalo has reached point 5. + Mono supports ASP.NET, we have shown an unmodified IBuySpy + installation running on Mono as well as various other programs. You can + try it yourself downloading the XSP server. Q: Do I need install cygwin to work on ASP.NET in mono or Linux is enough since it is self host right now. A: Linux is enough. +Q: How can I run ASP.NET-based applications with Mono? + +A: You need the Mono runtime and a hosting web server. Currently we distribute a + small web server called `xsp' which is used to debug applications, or you can choose + to use Daniel's Apache 2 module. + Q: Any plan to make ASP.NET in mono works with Apache in Linux?. -A: Yes, we have plans to do so, but we need to wait for Patrik's patches to - HttpRuntime. Once that is there, writing a mod_mono should be trivial - (look at mono/samples/embed for a sample embedded application). +A: Daniel has authored an Apache2 Module for Mono that hosts the ASP.NET runtime + and is available here: http://apacheworld.org/modmono/ + +Q: Will you support Apache 1? + +A: Modules developed for Apache 2 are not compatible with Apache 1.3 + Daniel plans to support Apache 1.3 in the future but the current focus is on + Apache 2, because of the better support for threading and Windows. + +Q: Can I run Apache 1 and Apache 2 on the same machine? + + You can always keep a copy of Apache 2 running in paralell with your Apache + 1.3 (either different port or using a reverse proxy). + + You can also bind the two servers to different IP addresses on the + same physical machine. ** Mono and ADO.NET @@ -734,12 +944,12 @@ A: You can get very good tools for doing Java development on free Q: Could Java target the CLI? -A: Yes, Java could target the CLI. We have details on a project that someone could take on to - make this happen. +A: Yes, Java could target the CLI, Microsoft's J# compiler does that. - Microsoft has an implementation of the Java language called J# that - can target the CIL execution engine. + The IKVM project builds a + Java runtime that works on top of .NET and on top of Mono. IKVM is + essentially a JIT compiler that translates from JVM bytecodes into + CIL instructions, and then lets the native JIT engine take over. Q: Is it possible to write a JVM byte code to CIL converter? @@ -761,6 +971,8 @@ A: Yes, it is possible. Here are a few starting point: be translated into the equivalent "meaning" in CLR-land. + See also the IKVM project + Q: Could mono become a hybrid CIL/java platform? A: No. It is quite far from the philosophy of the project. The idea of Mono @@ -775,9 +987,8 @@ A: No. It is quite far from the philosophy of the project. The idea of Mono Q: Do you plan to implement a Javascript compiler? -A: Yes. Eto Demerzal has started a Rhino port to C#. - After this is completed, we will begin developing - the JavaScript compiler. +A: Yes. The beginnings of the JScript compiler can be found on CVS. + Cesar coordinates this effort. Q: Can Mono or .NET share system classes (loaded from mscore.dll and other libs) or will it behave like Sun's Java VM? @@ -819,10 +1030,13 @@ A: Embracing a good technology is good. Extending technologies in encourage you to make those classes operate correctly well in both Mono and .NET. + Today Mono ships with a number of extra libraries that were + developed either by members of the Mono community, or other + groups. + Q: Is there any way I can develop the class libraries using Linux yet? -A: Yes. Some class libraries can be developed on Linux. Search for - Paolo's post (he lists which classes can be compiled fine now). +A: Yes. Mono has been selfhosting since March 2002. Q: Is there any way I can install a known working copy of mono in /usr, and an experimental copy somewhere else, and have both copies use @@ -1047,9 +1261,6 @@ A: We will have to evaluate the licenses for compatibility first, but as a general rule, we will accept the code under the same terms of the "container" module. -Q: Is the Mono - - ** Patents @@ -1057,27 +1268,61 @@ Q: Could patents be used to completely disable Mono (either submarine patents filed now, or changes made by Microsoft specifically to create patent problems)? -A: No. First, its basic functional capabilities have pre-existed too - long to be held up by patents. The basic components of Mono are - technologically equivalent to Sun's Java technology, which has been - around for years. - - Mono will also implement multi-language and - multi-architecture support, but there are previous technologies - such as UCSD p-code and ANDF that also support multiple languages - using a common intermediate language. The libraries are similar - to other language's libraries, so again, they're too similar to - be patentable in large measure. - - However, if Microsoft does patent some technology, then our plan is - to either (1) work around it, (2) chop out patented pieces, (3) - find prior art that would render the patent useless. +A: First some background information. + + The .NET Framework is divided in two parts: the ECMA/ISO covered + technologies and the other technologies developed on top of it like + ADO.NET, ASP.NET and Windows.Forms. + + Mono implements the ECMA/ISO covered parts, as well as being a + project that aims to implement the higher level blocks like + ASP.NET, ADO.NET and Windows.Forms. + + The Mono project has gone beyond both of those components and has + developed and integrated third party class libraries, the most + important being: Debugging APIs, integration with the Gnome + platform (Accessibility, Pango rendering, Gdk/Gtk, Glade, GnomeUI), + Mozilla, OpenGL, extensive database support (Microsoft only + supports a couple of providers out of the box, while Mono has + support for 11 different providers), our POSIX integration + libraries and finally the embedded API (used to add scripting to + applications and host the CLI, or for example as an embedded + runtime in Apache). + + The core of the .NET Framework, and what has been patented by + Microsoft falls under the ECMA/ISO submission. Jim Miller at + Microsoft has made a statement on the patents covering ISO/ECMA, + (he is one of the inventors listed in the patent): here. + + Basically a grant is given to anyone who want to implement those + components for free and for any purpose. + + The controversial elements are the ASP.NET, ADO.NET and + Windows.Forms subsets. Those are convenient for people who need + full compatibility with the Windows platform, but are not required + for the open source Mono platform, nor integration with today's + Mono's rich support of Linux. + + The Mono strategy for dealing with these technologies is as + follows: (1) work around the patent by using a different + implementation techinque that retains the API, but changes the + mechanism; if that is not possible, we would (2) remove the pieces + of code that were covered by those patents, and also (3) find prior + art that would render the patent useless. Not providing a patented capability would weaken the interoperability, but it would still provide the free software / open source software community with good development tools, which is the primary reason for developing Mono. + The patents do not apply in countries where software patents are + not allowed. + + For Linux server and desktop development, we only need the ECMA + components, and things that we have developed (like Gtk#) or Apache + integration. + ** Miscellaneous Questions @@ -1164,7 +1409,8 @@ A: There are several but one that is free software and uses MCS is the one Q: Is it possible to use Visual C++ with Mono?. -A: Well, It's possible to run VC++ generated apps under Mono though. +A: It's possible to run VC++ generated apps under Mono, but we do not + provide a Manager C++ compiler ourselves. ** Mono Common Problems @@ -1173,3 +1419,6 @@ A: Well, It's possible to run VC++ generated apps under Mono though. or if you think that you found a bug, etc. Please visit the Mono Common Problems document and try there. +** Credits + + The FAQ contains material contributed by Miguel de Icaza, Jaime Anguiano, Lluis Sánchez. \ No newline at end of file