From: Paul G. <PGr...@su...> - 2001-10-30 16:26:09
|
Hi all, I am involved in an Open Source project which is primarily Posix based. It uses Automake/Autoconf/libtool for its configuration management. I have been for some time maintaining a Win32 build of this project and it is becoming more and more difficult to overcome the deficiencies of the Microsoft compiler, in fact the latest set of changes highlight a major problem with the MS compiler which is going to prove very difficult to overcome in a manner which doesn't spread horribly throughout the whole codebase. For this reason I have decided to look into some alternatives to make keeping the Win32 build up to date simpler. I have looked into using Cygwin/XFree86, as this is a GUI application based around gtk+ and OpenGL, this sort of offers an option but for two issues. Firstly that the Win32 version would then require the user to have installed Cygwin and Cygwin/Xfree86 which is no small task just to have this one application. Secondly the project relies heavily on shared libraries, and in particular the Posix feature of having unresolved references in shared libraries which are resolved at runtime with the executable loading them, a feature which Win32 DLLs doesn't support. I then looked into MingW but having searched quite extensively I cannot find any definitive answers regarding the autotools and libtool support. I know there is some level of support, but how do you set up a system which can use the configure script and make the whole project, DLLs and all. Ideally I would like fully automatic support, i.e. just run ./configure and make all from the command line and it would build under mingw. I know I am asking a lot, but I thought someone here would know if this is a viable target or not. I am quite prepared to modify the Makefile.am and/or configure.in scripts to make this work, if it doesn;t affect existing build targets. Any help would be greatly appreciated. Cheers PaulG |
From: Jeff S. <jef...@co...> - 2001-10-30 18:21:14
|
Paul Gregory wrote: > I have looked into using Cygwin/XFree86, as this is a GUI > application based around gtk+ and OpenGL, this sort of offers an option but > for two issues. Firstly that the Win32 version would then require the user > to have installed Cygwin and Cygwin/Xfree86 which is no small task just to > have this one application. You could bundle cygwin1.dll with your app, without having to provide all of Cygwin, provided license terms (GPL) are met. You don't need any XFree86 if you can use win32 gtk instead... Cygwin isn't incompatible with the latter. > Secondly the project relies heavily on shared > libraries, and in particular the Posix feature of having unresolved > references in shared libraries which are resolved at runtime with the > executable loading them, a feature which Win32 DLLs doesn't support. That's not a POSIX feature, it's ELF. There's no easy way to emulate it on win32 regardless of which compiler you choose. You'll get bitten the same way if you port to other POSIX targets without ELF (e.g. AIX). The safest recommendation is to fix your code so you don't rely on that particular (mis)feature. > I then looked into MingW but having searched quite extensively I > cannot find any definitive answers regarding the autotools and libtool > support. There is some support in autoconf/automake/libtool, but only for cross-compiling, i.e. they are not self-hosting. For that you'll need a full POSIX toolkit (e.g. Cygwin, U/WIN, Interix). There's also no POSIX support in Mingw, just a C standard library provided by msvcrt.dll. -- Jeff Sturm jef...@co... |
From: Earnie B. <ear...@ya...> - 2001-10-30 18:38:28
|
Jeff Sturm wrote: > > That's not a POSIX feature, it's ELF. There's no easy way to emulate it > on win32 regardless of which compiler you choose. > > You'll get bitten the same way if you port to other POSIX targets > without ELF (e.g. AIX). The safest recommendation is to fix your code > so you don't rely on that particular (mis)feature. > So, why couldn't ELF be emulated? Not long ago you could have said that POSIX wasn't possible also. You do have a point of the portability issue though and I agree that depending on symbol resolution at runtime is an assume but is it really _impossible_ to emulate ELF? -- Earnie. _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: Jeff S. <jef...@co...> - 2001-10-30 18:56:20
|
Earnie Boyd wrote: > So, why couldn't ELF be emulated? Not long ago you could have said that > POSIX wasn't possible also. You do have a point of the portability > issue though and I agree that depending on symbol resolution at runtime > is an assume but is it really _impossible_ to emulate ELF? It's possible. Fortunately ELF works mostly in userspace, so you could port ld.so from glibc, and load DSO's just fine on win32. Then you'd need a whole new binutils etc. to build the new shared libraries and this starts to look like a whole new project, unrelated to Mingw/Cygwin/etc. I did say no _easy_ way... -- Jeff Sturm jef...@co... |