MinGW32 on Fedora compiling e2fsprogs ...

Richard W.M. Jones rjones at redhat.com
Wed Mar 18 08:38:23 UTC 2009


On Tue, Mar 17, 2009 at 10:40:22PM -0400, Erez Strauss wrote:
> Hello fedora-mingw  readers,
> 
> I'm in need for mke2fs and other ext2fs utilities on windows
> (e2fsprogs-1.41.4).
> I'm using Fedora-10-mingw32 code and tried to go through the compile and
> build, I have partial success.
> 
> I was wondering if e2fsprogs will be included in the Fedora/mingw32
> packages?
> I believe that having the e2fsprogs and libraries in the fedora-mingw32/64
> project will enhance it to administration and recovery applications.

Yes.

We're actually coming at this from a different angle.  e2fsprogs is a
monolithic library which contains various useful sublibraries that are
used all over the place.  For example, libuuid for generating unique
IDs is frequently used by packages.  But they have to depend on the
whole e2fsprogs-devel in order to get just this tiny library.

As a first step, I have been working with Eric Sandeen to split the
sublibraries out:

https://bugzilla.redhat.com/show_bug.cgi?id=225406#c7

However this now won't happen before Fedora 12.

My plan was to do this split first in the native package, and then
port the sublibraries on demand to MinGW.  There is nothing to stop
you from porting the whole library, if you manage it, but when I
looked at it that seemed pretty ambitious.

> The major issue is around fcntl() locking constants. When I compile mingw on
> windows I don't have these issues.
> Does the mingw32 binary library contain an fcntl() wrapper that calls the
> windows LockFileIs()

No it doesn't, it doesn't contain any POSIX emulation at all.  You
need to use a POSIX compatibility layer, or replace the calls
yourself.  The source for sqlite will be particularly helpful for you
because it contains public domain examples of how to do locking for
many different platforms.

You could also try replacing fcntl with flock, and use Gnulib to
supply that (I wrote the flock impl in Gnulib):

http://www.gnu.org/software/gnulib/manual/gnulib.html#flock

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top



More information about the mingw mailing list