This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

glib-2.0.7 on cygwin


Since the last remaining (known) bug was actually in newlib, I put a workaround in glib for now. So, by applying the attached patch and following the instructions below, glib-2.0.7 will

1) build as shared libs
2) pass all 29 tests

Please read the attached NOTES file thoroughly -- especially if you're thinking about turning this simple patch into a full-blown set of cygwin packages. [Note that the attached patch affects only the primary sources; after running the bootstrap script the patch grows to almost 1.9MB]

I also have some patches for glib-2.2.0, and will post those soon. However, 2.2.0 fails two tests...

--Chuck
build requirements:
==================================

pkgconfig      0.12.0 or newer
libtool
libtool-devel  20021227-1 or newer (*)
autoconf
autoconf-devel 2.57-1 or newer
automake
automake-devel 1.7.2-1 or newer
gcc            3.2-3 or newer
binutils       20021117-1 or newer
libiconv       1.8-2
libiconv2      1.8-2
libintl2       0.11.5-1
gettext        0.11.5-1            
gettext-devel	0.11.5-1            

(*) if using 20021227-1, you need to apply the following patch to
/usr/autotools/devel/share/aclocal/libtool.m4 BEFORE running bootstrap,
below.  I'll release a new libtool that includes this fix soon.

--- libtool.m4.orig   2002-12-30 00:16:43.000000000 -0500
+++ libtool.m4        2002-12-30 00:16:56.000000000 -0500
@@ -2342,7 +2342,7 @@
 # --------------
 # enable support for Windows resource files
 AC_DEFUN([AC_LIBTOOL_RC],
-[AC_REQUIRE([AC_PROG_RC])
+[AC_REQUIRE([LT_AC_PROG_RC])
 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,RC" | sed 's/^,//'`])
 ])# AC_LIBTOOL_RC


build instructions:
==================================
This is what I did, but you might want different CFLAGS or configure options.

1) unpack glib-2.0.7.tar.bz2
2) cd glib-2.0.7
3) patch -p1 < <path to>/glib-2.0.7.patch
4) chmod +x ./bootstrap
5) ./bootstrap
6) mkdir .build && cd .build
7) CFLAGS='-g -O0' ../configure \
   --prefix=/usr/local --srcdir=<path to>/glib-2.0.7 --enable-maintainer-mode
8) make


test results:
==================================
passes all 29 tests


packaging notes:
==================================
I don't intend to package glib for cygwin, or to support it.  I just 
viewed it as an interesting application/testcase for libtool.  If anyone 
wants to take these patches and use them to provide an official glib
package for cygwin, I wouldn't mind -- but be warned, the packaging will 
be tricky, since the import libs and headers are versioned, as well as 
the dll.  See Nicholas Wourm's packaging structure for
  db2
  libdb2
  libdb2-devel
  db3.1
  libdb3.1
  libdb3.1-devel

I'd suggest

  glib20-devel-2.0.7-1
    (include files, import libs, static libs, locale files,
    pkg-config files (.pc), glib-2.0.m4, but not glib-gettext.m4)
	 
  libglib20_0-2.0.7-1
    (contains only the dlls) 

  glib-docs-2.0.7-1
    (html docs, but not the man pages)

  glib-2.0.7-1
    (everything else, incl. glib-gettext.m4, .exe's, man pages)

Oh -- and don't "ship" usr/lib/charset.alias.  That's part of the gettext 
package on cygwin.

submitting "upstream"
==================================
These patches are probably large enough that I'd need to fill out 
a copyright assignment for glib.  I wouldn't mind doing that, if someone
else wants to push them into glib-2.0.8.  (Also, Steven O'Brien would 
need to fill out a copyright assignment too).

But....

These patches depend on reautotoolizing the whole tree using CVS versions 
of libtool.  There might be resistance to that.  Plus, since 2.2.0 has come 
out, there may not BE a 2.0.8.

porting notes:
==================================
My "solution" for the earlier string-test failures is cheezy.  The problem is
actually in newlib's routines that format floating point numbers; hopefully
they will be fixed soon.  However, I just reduced the %10000.10000f down to
the maximum that newlib can handle: %42.42f.

There are a number of places where I blithely replaced G_PLATFORM_WIN32 
with G_OS_WIN32 (thus skipping various win32-isms on cygwin, and using 
the unix-isms instead).  I tried to only do this where it made sense -- 
and I kept some win32-isms.  However, it is entirely possible that SOME 
of the win32-isms that I killed in the cygwin build are actually needed, 
especially as it relates to g_convert_filename functions dealing with 
internationalization. 

Tip Of Hat: Many of these changes originated with Steven O'Brien
http://homepage.ntlworld.com/steven.obrien2/  Also, the basic port
to window-ish platforms is due to TONS of work by Tor Lilqvist and his
elves on the gimpwin-dev@yahoogroups.com list.

Attachment: glib-2.0.7.patch.gz
Description: GNU Zip compressed data

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]