* [Caml-list] Yet Another Compilation Question: lablgtk for windows + cygwin-mingw @ 2002-08-05 13:49 Kontra, Gergely 2002-08-05 14:40 ` Xavier Leroy 0 siblings, 1 reply; 6+ messages in thread From: Kontra, Gergely @ 2002-08-05 13:49 UTC (permalink / raw) To: caml-list Hi! I'm keep trying compiling ocaml to be able to produce optimized code. When I try to configure lablgtk, it complains about not to find gtk-config. I know there is such an executable under linux, but I couldn't find this for the cygwin environment. While reading the manual, I realized, that I cannot exactly know what is the difference between cygwin and mingw, because the mingw compilation needs cygwin. My idea is to provide fallbacks for some utility, which doesn't exists for mingw. And I don't understand why cygwin compiled code is faster, because such tiny utilities like grep, sed, awk runs _VERY_ slowly on my Duron. The distributed binary ocaml version is for MSVC, am I right? Can I hack this version to use my mingw-gcc compiler? Gergo +-[Kontra, Gergely @ Budapest University of Technology and Economics]-+ | Email: kgergely@mcl.hu, kgergely@turul.eet.bme.hu | | URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 | +-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+ . Magyar php mirror es magyar php dokumentacio: http://hu.php.net ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] Yet Another Compilation Question: lablgtk for windows + cygwin-mingw 2002-08-05 13:49 [Caml-list] Yet Another Compilation Question: lablgtk for windows + cygwin-mingw Kontra, Gergely @ 2002-08-05 14:40 ` Xavier Leroy 2002-08-05 17:05 ` fred 2002-08-08 14:07 ` Alan Schmitt 0 siblings, 2 replies; 6+ messages in thread From: Xavier Leroy @ 2002-08-05 14:40 UTC (permalink / raw) To: Kontra, Gergely; +Cc: caml-list > I'm keep trying compiling ocaml to be able to produce optimized code. > When I try to configure lablgtk, it complains about not to find > gtk-config. I know there is such an executable under linux, but I > couldn't find this for the cygwin environment. > > While reading the manual, I realized, that I cannot exactly know what is > the difference between cygwin and mingw, because the mingw compilation > needs cygwin. My idea is to provide fallbacks for some utility, which > doesn't exists for mingw. I can't help you with the GTK issues, but let me try to clarify the Mingw/Cygwin issue. Mingw, at least as we use it in OCaml, is just an option on the Cygwin compilers and tools that instruct them to generate executables that do not depend on the Cygwin DLLs, but use standard Microsoft libraries instead. However, it is still possible, and indeed recommended, to use the full Cygwin development environment to build those Cygwin-free executables. Think of it as a cross-compiler: from within the Cygwin environment, you generate executables that can run without the Cygwin environment. So, I think there is no need to "provide fallbacks for some utilities", at least if these utilities are used only during the build process: just install the full Cygwin environment and be done with it. > And I don't understand why cygwin compiled > code is faster, because such tiny utilities like grep, sed, awk runs > _VERY_ slowly on my Duron. Yes, file accesses are a bit slow under Cygwin, due to the Unix emulation layer they have to cross. The OCaml bytecode interpreter is faster than in the native Win32 port, though, because it is compiled by gcc and takes advantage of gcc-specific tricks. > The distributed binary ocaml version is for MSVC, am I right? Yes. > Can I hack this version to use my mingw-gcc compiler? No. To install the Mingw version of OCaml, you need to compile OCaml from sources. One last, general comment. (Climbing on my soapbox.) The GNU compilers, OCaml, GTK. lablgtk, etc, are all software projects that are developed primarily under Unix, and then ported to Windows. While each of these ports are done carefully and with considerable ingenuity, Windows is not Unix and minor differences or inconsistencies remain in each port. These minor issues are usually workable when you use only one port, but can become a real headache when you pile up port over port over port. What I am coming at is that unless you like to suffer and are ready to solve these issues yourself, it doesn't make much sense to develop an OCaml+lablgtk+GTK program under Windows. Hope this helps, - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] Yet Another Compilation Question: lablgtk for windows + cygwin-mingw 2002-08-05 14:40 ` Xavier Leroy @ 2002-08-05 17:05 ` fred 2002-08-06 8:59 ` Xavier Leroy 2002-08-06 9:52 ` Nicolas Cannasse 2002-08-08 14:07 ` Alan Schmitt 1 sibling, 2 replies; 6+ messages in thread From: fred @ 2002-08-05 17:05 UTC (permalink / raw) Cc: caml-list On Mon, Aug 05, 2002 at 04:40:38PM +0200, Xavier Leroy wrote: > One last, general comment. (Climbing on my soapbox.) The GNU > compilers, OCaml, GTK. lablgtk, etc, are all software projects that > are developed primarily under Unix, and then ported to Windows. While > each of these ports are done carefully and with considerable ingenuity, > Windows is not Unix and minor differences or inconsistencies remain in > each port. These minor issues are usually workable when you use only > one port, but can become a real headache when you pile up port over > port over port. What I am coming at is that unless you like to suffer > and are ready to solve these issues yourself, it doesn't make much > sense to develop an OCaml+lablgtk+GTK program under Windows. I've been planning to build an interactive application with OCaml that will be deployed primarily on Windows, so I'd like to understand your warning better. 1. Is the risk just in developing (compiling, packaging) on Windows, or also in deploying to Windows? 2. What do you mean by "piling port after port"? Do you mean reworking the application to track changes as the various tools (GNU+OCaml+labltk+GTK) evolve in successive releases? Has this been a big problem in applications such as Unison? (Or any other broadly deployed OCaml app? I don't know of others.) 3. Is there some other GUI framework that you expect will entail less suffering than lablgtk+GTK? 4. As the porting problem applies to the GNU compilers and OCaml itself, are you warning us against developing OCaml applications for use on Windows? -- Fred Yankowski fred@ontosys.com tel: +1.630.879.1312 OntoSys, Inc PGP keyID: 7B449345 fax: +1.630.879.1370 www.ontosys.com 38W242 Deerpath Rd, Batavia, IL 60510-9461, USA ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] Yet Another Compilation Question: lablgtk for windows + cygwin-mingw 2002-08-05 17:05 ` fred @ 2002-08-06 8:59 ` Xavier Leroy 2002-08-06 9:52 ` Nicolas Cannasse 1 sibling, 0 replies; 6+ messages in thread From: Xavier Leroy @ 2002-08-06 8:59 UTC (permalink / raw) To: fred; +Cc: caml-list > I've been planning to build an interactive application with OCaml that > will be deployed primarily on Windows, so I'd like to understand your > warning better. I know I haven't made myself very clear, but basically what I'm suggesting is: if you develop a Windows application using many tools and libraries that come from a Unix background (e.g. gcc, ocaml, GTK), it might be more effective to develop the application first under Unix, then port it to Windows. This way, during development, you don't get bitten by potential quirks in the Windows ports of the tools and libraries. > 1. Is the risk just in developing (compiling, packaging) on Windows, > or also in deploying to Windows? I think deployment under Windows is OK -- binary distributions work well under Windows, better than under Unix :-) I was really thinking about development and setting up the development environment -- just installing the necessary development software under Windows can be significantly harder than under Unix. > 2. What do you mean by "piling port after port"? Do you mean > reworking the application to track changes as the various tools > (GNU+OCaml+labltk+GTK) evolve in successive releases? I was mostly thinking about working around bugs and quirks in the Windows ports of the tools and libraries. For instance, while OCaml tries hard to be OS-neutral, some libraries (e.g. Unix) have an API that is slanted towards Unix, and are only 95% implemented under Windows. (For instance: Unix.select can take a mixture of pipe and socket descriptors under Unix, but only sockets under Windows.) Another issue is getting support from developers. This is especially true if the original software and the Windows port are maintained by separate teams. The core (Unix) developers tend to brush your questions aside as "Windows lossage", while the porting team may not fully understand the original software... These are minor inconveniences, but they pile up if you use several "ported to Windows" components. > Has this > been a big problem in applications such as Unison? (Or any > other broadly deployed OCaml app? I don't know of others.) The examples that I have in mind were all developed first under Unix, then ported to Windows. > 3. Is there some other GUI framework that you expect will entail less > suffering than lablgtk+GTK? I can't really comment here, since I don't do GUIs :-) > 4. As the porting problem applies to the GNU compilers and OCaml > itself, are you warning us against developing OCaml applications > for use on Windows? No. Please go ahead and we'll support your efforts. But I'm warning you that you should expect a few additional difficulties compared with developing under Unix first. - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] Yet Another Compilation Question: lablgtk for windows + cygwin-mingw 2002-08-05 17:05 ` fred 2002-08-06 8:59 ` Xavier Leroy @ 2002-08-06 9:52 ` Nicolas Cannasse 1 sibling, 0 replies; 6+ messages in thread From: Nicolas Cannasse @ 2002-08-06 9:52 UTC (permalink / raw) To: fred; +Cc: caml-list > One last, general comment. (Climbing on my soapbox.) The GNU > > compilers, OCaml, GTK. lablgtk, etc, are all software projects that > > are developed primarily under Unix, and then ported to Windows. While > > each of these ports are done carefully and with considerable ingenuity, > > Windows is not Unix and minor differences or inconsistencies remain in > > each port. These minor issues are usually workable when you use only > > one port, but can become a real headache when you pile up port over > > port over port. What I am coming at is that unless you like to suffer > > and are ready to solve these issues yourself, it doesn't make much > > sense to develop an OCaml+lablgtk+GTK program under Windows. > > I've been planning to build an interactive application with OCaml that > will be deployed primarily on Windows, so I'd like to understand your > warning better. As an windows ocaml user for some time now, I'll try to answer your questions > 1. Is the risk just in developing (compiling, packaging) on Windows, > or also in deploying to Windows? As Xavier answered, deploying under windows is easier than under Unix . You can package binaries quite easily without even the need for the end-user to install Ocaml ( DLL's since 3.04 simplified lots of things ) About developing, I'm currently compiling and running OCaml code from MSVC++ :) It's quite confortable this way, even if an OCaml IDE would be better. > 2. What do you mean by "piling port after port"? Do you mean > reworking the application to track changes as the various tools > (GNU+OCaml+labltk+GTK) evolve in successive releases? Has this > been a big problem in applications such as Unison? (Or any > other broadly deployed OCaml app? I don't know of others.) > > 3. Is there some other GUI framework that you expect will entail less > suffering than lablgtk+GTK? I've been developping Osiris, an OCaml class-based GUI system which is built on top of the Win32 API OCaml Port (still partial, but complete enough to work with). If you're willing to develop GUIs for windows-only, Osiris may be a good choice. If you're willing to develop cross-platform applications, I have been thinking for few month now to write a GTK port of Osiris... when I'll have some free time :) > 4. As the porting problem applies to the GNU compilers and OCaml > itself, are you warning us against developing OCaml applications > for use on Windows? Don't worry, the ratio ( INRIA support ) / (number of window users) is quite high :) Nicolas Cannasse ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] Yet Another Compilation Question: lablgtk for windows + cygwin-mingw 2002-08-05 14:40 ` Xavier Leroy 2002-08-05 17:05 ` fred @ 2002-08-08 14:07 ` Alan Schmitt 1 sibling, 0 replies; 6+ messages in thread From: Alan Schmitt @ 2002-08-08 14:07 UTC (permalink / raw) To: caml-list * Xavier Leroy (xavier.leroy@inria.fr) wrote: > What I am coming at is that unless you like to suffer and are ready to > solve these issues yourself, it doesn't make much sense to develop an > OCaml+lablgtk+GTK program under Windows. If I may respectfully disagree ... ;0) I've developed a graphical app for my wife that had to run under windows. I started using C and gtk, and it was ok until I needed to free a list of widgets ... and was hoping for a good old List.iter applied on an anonymous function. So I switched to ocaml and lablgtk, and my program shrank by half (in LOC) and the transition was not too painful. I must say I've never used visual basic or other M$ tools, so I cannot compare the ease of installation or development. Alan -- The hacker: someone who figured things out and made something cool happen. ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-08-12 6:53 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2002-08-05 13:49 [Caml-list] Yet Another Compilation Question: lablgtk for windows + cygwin-mingw Kontra, Gergely 2002-08-05 14:40 ` Xavier Leroy 2002-08-05 17:05 ` fred 2002-08-06 8:59 ` Xavier Leroy 2002-08-06 9:52 ` Nicolas Cannasse 2002-08-08 14:07 ` Alan Schmitt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox