Welcome to chrysocome.netChrysocome Logo

libext2fs

libext2fs is a library which can access ext2 and ext3 filesystems. It is part of e2fsprogs which is a set of tools for creating, altering and maintaining ext2 and ext3 filesystems.

As part of the redevelopment of explore2fs, it was decided that libext2fs should be used to implement the filesystem support. This would bring stability and maintainability to the read support and allow the return of write support.

Initial attempts were made to build libext2fs under the Cygwin environment which provides a posix build and runtime environment. Linking the cygwin library to a Delphi application caused memory management problems and the attempt was abandoned

While searching for a solution, MinGW/MSYS was discovered. MinGW is a build suite which produces native Win32 binary files. It can be coupled with MSYS which provides a posix build environment. The combination does not provide a posix runtime like cygwin does, so alterations were required but they turned out to be quite minor.

Setting up the build environment

Downloads for mingw family
Program Version Content Format Platform Download
Installation Instructions
mingw 1.0.10 Binary .zip Windows mingw-msys-1.0.10.zip

Obtaining the source

Download the library code from the e2fsprogs download page

Downloads for libext2fs family
Program Version Content Format Platform Download
libext2fs 1.41.4 Source .tgz Diff libext2fs-mingw-1.41.4.tar.gz
libext2fs 0.1 Source .tgz Diff libext2fs-mingw-0.1.tar.gz

Building the library

Start MSYS and run the following commands. You may need to adjust the paths as required

tar -zxvf /c/temp/e2fsprogs-1.41.4.tar.gz cd e2fsprogs CC=gcc ./configure

If configure completes successfully then install the patch

patch -p1 < /c/temp/mingw1414.diff

That should patch three files. If so you are ready to build. The build will produce errors. These are expected but should not impact on the creation of the library

make cd lib/ext2fs make libext2fs.dll
Donate