From 0d66d1a84625f1eeae7c7d45d16306b894ec2f58 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wolfgang=20St=C3=B6ggl?= Date: Mon, 25 Dec 2017 15:15:14 +0100 Subject: [PATCH] Add documentation for building under MinGW-w64 --- Makefile.am | 2 +- win32/README-MinGW-w64 | 68 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 win32/README-MinGW-w64 diff --git a/Makefile.am b/Makefile.am index dc96f8f8..0ade568c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,7 +23,7 @@ EXTRA_DIST = COPYRIGHT CHANGES TODO CONTRIBUTORS THREADS VERSION LICENSE \ etc/rrdcached-default-redhat etc/rrdcached-init-redhat \ win32/build-rrdtool.dot win32/build-rrdtool.pdf win32/build-rrdtool.svg \ win32/librrd-4.def win32/librrd-4.rc win32/librrd-4.vcxproj win32/librrd-4.vcxproj.user \ - win32/Makefile.msc win32/RCa02816 win32/README win32/rrdcgi.rc win32/rrd_config.h \ + win32/Makefile.msc win32/RCa02816 win32/README win32/README-MinGW-w64 win32/rrdcgi.rc win32/rrd_config.h \ win32/rrd.sln win32/rrdtool.rc win32/rrdtool.sln win32/rrdtool.vcxproj win32/rrdupdate.rc \ win32/rrdupdate.sln win32/rrdupdate.vcxproj win32/uac.manifest \ win32/asprintf.c win32/asprintf.h win32/dirent.h win32/vasprintf-msvc.c \ diff --git a/win32/README-MinGW-w64 b/win32/README-MinGW-w64 new file mode 100644 index 00000000..ed2ff43c --- /dev/null +++ b/win32/README-MinGW-w64 @@ -0,0 +1,68 @@ +MinGW-w64 Build Instructions: + +Here you will find instructions on how to build RRDtool using MinGW-w64. +Examples are given for building Windows binaries under Fedora, MSYS2 and MXE + +1) Fedora + - i686 (32-bit) + Install the required dependencies: + + sudo dnf install mingw32-cairo mingw32-expat mingw32-fontconfig mingw32-freetype mingw32-gettext mingw32-glib2 mingw32-libpng mingw32-libxml2 mingw32-pango mingw32-pkg-config mingw32-zlib + + Run the following commands from the rrdtool-1.x directory: + ./bootstrap + ./configure --host=i686-w64-mingw32 --disable-static --disable-mmap --disable-tcl --disable-perl --disable-ruby --disable-python --disable-lua --disable-rrdcached PKGCONFIG=i686-w64-mingw32-pkg-config LIBS='-lws2_32' + make LDFLAGS='-no-undefined' CFLAGS='-D__USE_MINGW_ANSI_STDIO=1' + +- x86_64 (64-bit) + Install the required dependencies: + + sudo dnf install mingw64-cairo mingw64-expat mingw64-fontconfig mingw64-freetype mingw64-gettext mingw64-glib2 mingw64-libpng mingw64-libxml2 mingw64-pango mingw64-pkg-config mingw64-zlib + + Run the following commands from the rrdtool-1.x directory: + ./bootstrap + ./configure --host=x86_64-w64-mingw32 --disable-static --disable-mmap --disable-tcl --disable-perl --disable-ruby --disable-python --disable-lua --disable-rrdcached PKGCONFIG=x86_64-w64-mingw32-pkg-config LIBS='-lws2_32' + make LDFLAGS='-no-undefined' CFLAGS='-D__USE_MINGW_ANSI_STDIO=1' + + +2) MSYS2 (https://sourceforge.net/projects/msys2/) + - i686 (32-bit) + Install the required dependencies: + + pacman -Sy --needed mingw-w64-i686-gcc mingw-w64-i686-cairo mingw-w64-i686-expat mingw-w64-i686-freetype mingw-w64-i686-gettext mingw-w64-i686-glib2 mingw-w64-i686-libpng mingw-w64-i686-libxml2 mingw-w64-i686-pango mingw-w64-i686-zlib mingw-w64-i686-pkg-config + + Run the following commands from the rrdtool-1.x directory: + ./bootstrap + ./configure --host=i686-w64-mingw32 --disable-static --disable-mmap --disable-tcl --disable-perl --disable-ruby --disable-python --disable-lua --disable-rrdcached --without-libintl-prefix --without-libiconv-prefix LIBS='-lws2_32' + make LDFLAGS='-no-undefined' CFLAGS='-D__USE_MINGW_ANSI_STDIO=1' + +- x86_64 (64-bit) + Install the required dependencies: + + pacman -Sy --needed mingw-w64-x86_64-gcc mingw-w64-x86_64-cairo mingw-w64-x86_64-expat mingw-w64-x86_64-freetype mingw-w64-x86_64-gettext mingw-w64-x86_64-glib2 mingw-w64-x86_64-libpng mingw-w64-x86_64-libxml2 mingw-w64-x86_64-pango mingw-w64-x86_64-zlib mingw-w64-x86_64-pkg-config + + Run the following commands from the rrdtool-1.x directory: + ./bootstrap + ./configure --host=x86_64-w64-mingw32 --disable-static --disable-mmap --disable-tcl --disable-perl --disable-ruby --disable-python --disable-lua --disable-rrdcached --without-libintl-prefix --without-libiconv-prefix LIBS='-lws2_32' + make LDFLAGS='-no-undefined' CFLAGS='-D__USE_MINGW_ANSI_STDIO=1' + +3) MXE (http://mxe.cc/ https://github.com/mxe/mxe) + - i686 (32-bit) + Build the required dependencies: + + make MXE_TARGETS='i686-w64-mingw32.shared' cairo expat fontconfig freetype gettext glib libpng libxml2 pango pkgconf zlib -j4 + + Run the following commands from the rrdtool-1.x directory: + ./bootstrap + ./configure --host=i686-w64-mingw32.shared --disable-static --disable-mmap --disable-tcl --disable-perl --disable-ruby --disable-python --disable-lua --disable-rrdcached PKGCONFIG=i686-w64-mingw32.shared-pkg-config + make LDFLAGS='-no-undefined' CFLAGS='-D__USE_MINGW_ANSI_STDIO=1' + +- x86_64 (64-bit) + Build the required dependencies: + + make MXE_TARGETS='x86_64-w64-mingw32.shared' cairo expat fontconfig freetype gettext glib libpng libxml2 pango pkgconf zlib -j4 + + Run the following commands from the rrdtool-1.x directory: + ./bootstrap + ./configure --host=x86_64-w64-mingw32.shared --disable-static --disable-mmap --disable-tcl --disable-perl --disable-ruby --disable-python --disable-lua --disable-rrdcached PKGCONFIG=x86_64-w64-mingw32.shared-pkg-config + make LDFLAGS='-no-undefined' CFLAGS='-D__USE_MINGW_ANSI_STDIO=1' -- 2.47.2