|
From: <ai...@us...> - 2013-12-21 21:34:33
|
Revision: 12899
http://sourceforge.net/p/plplot/code/12899
Author: airwin
Date: 2013-12-21 21:34:30 +0000 (Sat, 21 Dec 2013)
Log Message:
-----------
Update instructions for the Windows case.
Modified Paths:
--------------
trunk/cmake/epa_build/README
Added Paths:
-----------
trunk/cmake/epa_build/setup/setup_mingw_msys_wine_toolchain
trunk/cmake/epa_build/setup/setup_msys_makefiles
Modified: trunk/cmake/epa_build/README
===================================================================
--- trunk/cmake/epa_build/README 2013-12-20 20:40:34 UTC (rev 12898)
+++ trunk/cmake/epa_build/README 2013-12-21 21:34:30 UTC (rev 12899)
@@ -15,10 +15,11 @@
Installing the Required Windows Toolchain:
N.B. There is a good possibility that epa_build will work with the
-Microsoft proprietary toolchain, and I would be happy to accept
-patches to make that so (including a patch for this file), but my only
-experience is with free software so until I receive such patches, the
-instructions below refer only to free software toolchains.
+Microsoft proprietary toolchain, and I (which refers to Alan W. Irwin
+throughout this file) would be happy to accept patches to make that so
+(including a patch for this file), but my only experience is with free
+software so until I receive such patches, the instructions below refer
+only to free software toolchains.
1. Install latest MinGW/MSYS using the automatic installer
@@ -50,7 +51,7 @@
4. Download a recent cmake.exe version from
http://www.cmake.org/files. I am currently using
-v2.8/cmake-2.8.10.2-win32-x86.zip. Unpack this using the unzip
+v2.8/cmake-2.8.12.1-win32-x86.zip. Unpack this using the unzip
command you just installed and put cmake.exe on your PATH.
5. [OPTIONAL] Copy the MinGW-4.7.2/msys/1.0/bin directory to
@@ -78,23 +79,73 @@
===============================================================================
Set up instructions for epa_build
-1. Linux or Mac OS X.
+I. Unix platforms:
+* Linux
+
Tailor the indicated values in setup/setup_linux for your own
system, then source that file, e.g.,
source <Top directory of PLplot source tree>/cmake/epa_build/setup/setup_linux
-2. Windows platforms
+* Mac OS X
-Similar instructions about tailoring and sourcing relevant files to be
-done later after I update and test the files in question.
+This has not been tried yet, but something similar to setup_linux should
+do the job.
+* Cygwin on Windows
+
+Some experiments with this have just been started with nothing written
+down with regards to setup. But ultimately it should be very similar
+to the Linux case.
+
+II. Non-Cygwin Windows platforms:
+
+* MinGW/MSYS for the Wine version of Windows
+
+Tailor the indicated values in setup_mingw_msys_wine_toolchain and
+setup/setup_msys_makefiles for your own system. Then execute something
+similar to the following from Linux to get into the bash.exe shell
+on Wine:
+
+wineserver -p
+nice -19 wineconsole --backend=curses MinGW-4.7.2/msys/1.0/bin/bash.exe
+
+Then from that bash.exe shell execute
+
+bash.exe-3.1$ pushd /z/home/software/plplot_svn/HEAD/plplot_allura/cmake/epa_build/setup;source setup_msys_makefiles;popd
+
+(You need to pushd or cd above to the setup directory because the the
+setup_msys_makefiles file that is sourced, automatically executes
+"source setup_mingw_msys_wine_toolchain", and that only works if it is
+done from the setup directory.)
+
+* MinGW/MSYS for the Microsoft version of Windows
+
+This has not been tried yet but the setup should work very similarly
+to the MinGW/MSYS/Wine case above.
+
+* Other non-Cygwin Windows platforms:
+
+Non-Cygwin windows epa_builds absolutely rely on MSYS tools such as
+bash.exe. But so long as Windows users download MSYS and put it on
+the PATH, then in theory epa_build should work. For example, I have
+tried epa_build on Wine with some success for the "MSYS Makefiles"
+CMake generator (those results are referred to above) as well as the
+"MinGW Makefiles", "Ninja", and "NMake Makefiles JOM" generators. All
+of these results were with the gcc compiler suite from the MinGW
+project. I see no reason why that success could not be extended to
+other command-line generators as well such as "NMake Makefiles" and
+other compilers such as MSVC/Ifort, but the epa_build project needs
+more volunteers to debug the platforms that interest them.
+
===============================================================================
Build directions for epa_build
-1. Linux
+I. Unix platforms
+* Linux
+
Note that setup_linux sets up all the important environment variables you
need including GENERATOR_STRING, INSTALL_PREFIX, and EPA_BUILD_SOURCE_PATH.
@@ -162,7 +213,46 @@
# developers) requires substantial extra CPU time and ~4GB of extra
# disk space to run.
-2. Windows platforms
+* Mac OS X and Cygwin
-Very similar to above, but I will fill in variations that I used
-on Wine when I get a chance to test them again.
+These epa_builds should be very similar to the Linux case. I suggest
+you use system versions of build tools (i.e., skip the
+-DBUILD_THE_BUILDTOOLS=ON case above) to start until you start having
+success with ordinary epa_builds. And I would start small there with,
+e.g., attempting to build shapelib, then plplot_lite before moving on
+to a full plplot build (including builds of all its dependencies).
+
+II. Non-Cygwin Windows platforms
+
+For the MinGW/MSYS/Wine case, I (AWI) essentially followed the same
+instructions as above for the Linux case. However, some of the
+buildtools (e.g., Tcl/Tk/Itcl/Itk/Iwidgets variants) don't yet build
+on Windows and although CMake builds fine on MinGW/MSYS, the result
+does not have the power (supplied only by a fully configured curl
+library and not by the internal curl alternative that the CMake build
+can use as a backup) to download from "https" archives which is
+essential for some of the epa_builds. The Linux and Cygwin platforms
+do give the required access to a full-featured Curl library for the
+cmake build to link to, but on MinGW/MSYS the only alternative is to
+build your own curl library, and the epa_build configuration for that
+has not been implemented yet although it is on my ToDo list. The net
+result of these considerations is I only built pkg-config and swig for
+the -DBUILD_THE_BUILDTOOLS=ON case which in turn implied I dropped
+everything that was Tcl related from the PLplot build and relied on
+the pre-built (and fully powered) binary version of CMake downloaded
+from Kitware (see above setup instructions). Also, for ordinary
+epa_builds (with -DBUILD_THE_BUILDTOOLS=OFF), I only had success with
+plplot_lite and not plplot. The reason was the extra pango and qt
+dependencies of plplot which had dependent packages of their own that
+could not yet be built on Windows.
+
+N.B. the tweaks required to make all epa_builds work on Windows should
+be few per project since many others have had success building all
+projects on Windows that are covered by epa_build. But there are a
+lot of such projects in, for example, the dependency list for pango,
+and often the Windows build tweaks are not well publicized. Thus,
+some substantial and sustained effort (but not an impossibly difficult
+effort) will be required to get all of the epa_build configurations to
+work for the Windows case, and the success I have achieved with a
+limited group of projects for the MinGW/MSYS/Wine case is a good
+start.
Added: trunk/cmake/epa_build/setup/setup_mingw_msys_wine_toolchain
===================================================================
--- trunk/cmake/epa_build/setup/setup_mingw_msys_wine_toolchain (rev 0)
+++ trunk/cmake/epa_build/setup/setup_mingw_msys_wine_toolchain 2013-12-21 21:34:30 UTC (rev 12899)
@@ -0,0 +1,58 @@
+# This script should be sourced from an MSYS bash environment. Its
+# purpose is to setup environment variables controlling the tool chain
+# that is used for MinGW/MSYS builds on a Wine platform.
+
+# Tailor these values to be appropriate for your local Windows platform.
+
+CMAKE_VERSION=2.8.12.1
+
+# This is the downloaded version we are testing rather than a bootstrapped
+# version.
+CMAKE_PATH=/z/home/wine/newstart/cmake-${CMAKE_VERSION}-win32-x86/bin
+
+MINGW_VERSION=4.7.2
+MINGW_PREFIX=/z/home/wine/newstart/MinGW-$MINGW_VERSION
+
+# MinGW gcc, g++, and gfortran flags you might want to tailor to
+# different values.
+export CFLAGS='-O3 -fvisibility=hidden -Wuninitialized'
+export CXXFLAGS='-O3 -fvisibility=hidden -Wuninitialized'
+export FFLAGS='-O3 -Wuninitialized'
+
+# Note $WINEVERSION propagates as an environment
+# variable from the Linux to Wine environment.
+BUILDTOOLS_PREFIX=/z/home/wine/newstart/build_script/install-${WINEVERSION}_buildtools
+
+# Directory where python.exe can be found
+PYTHON_PATH=/z/home/wine/newstart/python/python-2.7.5
+
+# Directory for top of source tree for epa_build
+export EPA_BUILD_SOURCE_PATH=/z/home/software/plplot_svn/HEAD/plplot_allura/cmake/epa_build
+
+# End of tailored values.
+
+# For MinGW on Wine, set up CMAKE_INCLUDE_PATH to find the
+# the MinGW, MSYS, and standard system headers.
+# N.B. $MINGW_PREFIX/msys/1.0/include is equivalent to /usr/include on bash.
+export CMAKE_INCLUDE_PATH=$MINGW_PREFIX/msys/1.0/include:$MINGW_PREFIX/include:$MINGW_PREFIX/lib/gcc/mingw32/$MINGW_VERSION/include:/z/home/wine/wine_build/install-$WINEVERSION/include/wine/msvcrt:/z/home/wine/wine_build/install-$WINEVERSION/include/wine/windows
+
+# For MinGW on Wine, no help is required to find mingw, msys, or wine libraries
+# because the appropriate dll's are on the PATH.
+export CMAKE_LIBRARY_PATH=
+
+# Help CMake find Python headers and library.
+CMAKE_INCLUDE_PATH=$PYTHON_PATH/include:$CMAKE_INCLUDE_PATH
+CMAKE_LIBRARY_PATH=$PYTHON_PATH/libs:$CMAKE_LIBRARY_PATH
+
+# Put CMake, Python, subversion and MinGW on the PATH.
+
+PATH=$CMAKE_PATH:$PATH
+PATH=$PYTHON_PATH:$PATH
+PATH=$CMAKE_PATH:$PATH
+PATH=$MINGW_PREFIX/bin/:$PATH
+
+# pkg-config setup.
+PATH=$BUILDTOOLS_PREFIX/bin:$PATH
+
+export PKG_CONFIG_PATH=/z/home/wine/newstart/MinGW-4.7.2/msys/1.0/lib/pkgconfig:$BUILDTOOLS_PREFIX/share/pkgconfig:$BUILDTOOLS_PREFIX/lib/pkgconfig
+
Added: trunk/cmake/epa_build/setup/setup_msys_makefiles
===================================================================
--- trunk/cmake/epa_build/setup/setup_msys_makefiles (rev 0)
+++ trunk/cmake/epa_build/setup/setup_msys_makefiles 2013-12-21 21:34:30 UTC (rev 12899)
@@ -0,0 +1,37 @@
+# This script should be sourced from an MSYS bash environment. Its
+# purpose is to setup environment variables needed to run any standard
+# cmake "MSYS Makefiles" build on a Windows platform.
+
+source setup_mingw_msys_wine_toolchain
+
+# Tailor this install location for "MSYS Makefiles" builds to your local needs:
+export INSTALL_PREFIX=/z/home/wine/newstart/build_script/install-$WINEVERSION
+
+# End of tailored values.
+
+# Put buildtools that have been built and installed by build_packages on PATH.
+PATH=${INSTALL_PREFIX}_buildtools/bin:$PATH
+
+# Put install directory on PATH (so that, e.g., the wxwidgets
+# configuration tool will be found.
+PATH=${INSTALL_PREFIX}/bin:$PATH
+
+# Put appropriate buildtools areas on these.
+CMAKE_INCLUDE_PATH=${INSTALL_PREFIX}_buildtools/include:$CMAKE_INCLUDE_PATH
+CMAKE_LIBRARY_PATH=${INSTALL_PREFIX}_buildtools/lib:$CMAKE_LIBRARY_PATH
+
+# Put version 3 of itcl and friends higher on CMAKE_INCLUDE_PATH then
+# the above default.
+CMAKE_INCLUDE_PATH=${INSTALL_PREFIX}_buildtools/include/itcl3.4:$CMAKE_INCLUDE_PATH
+
+# Put appropriate install areas on these.
+CMAKE_INCLUDE_PATH=${INSTALL_PREFIX}/include:$CMAKE_INCLUDE_PATH
+CMAKE_LIBRARY_PATH=${INSTALL_PREFIX}/lib:$CMAKE_LIBRARY_PATH
+
+# Put install-location pkg-config directories at top of PKG_CONFIG_PATH
+PKG_CONFIG_PATH=$INSTALL_PREFIX/share/pkgconfig:$INSTALL_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
+
+# Put MSYS at the top of the PATH
+PATH=$MINGW_PREFIX/msys/1.0/bin/:$PATH
+
+export GENERATOR_STRING="MSYS Makefiles"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|