HOWTO : build GDL on windows

2012-10-04
2014-07-04
  • Jeongbin Park
    Jeongbin Park
    2012-10-04

    You can read from here.

    I tried to post it here, but it says that it looks like a spam… It would be nice if there were a wiki !

     
  • GregJung
    GregJung
    2014-04-30

    Thanks for the method, I've been attempting to build under mingw32/etc conditions.

    These are the download pointers for Jeongbin's reference:
    gsl - http://gnuwin32.sourceforge.net/packages/gsl.htm
    pcre - http://gnuwin32.sourceforge.net/packages/pcre.htm
    pdcurses - http://gnuwin32.sourceforge.net/packages/pdcurses.htm
    readline - http://gnuwin32.sourceforge.net/packages/readline.htm
    zlib - http://gnuwin32.sourceforge.net/packages/zlib.htm
    bsd-xdr - http://code.google.com/p/bsd-xdr/

    Attempting build for Mingw32/MSYS

    I have Cygwin, cygwin64 systems available too.
    Recently I switched the effort from Cygwin64 to mingw32, where I've come the farthest, now, with plplot, Wx, gtk in pretty good shape.

    (coming back,2 months later)

    MSYS has a few quirks that weren't well-handled in the CMAKE suite - symptomized in the PLPLOT build by
    the inability to get the freetype package involved. So I went to the wilderness and have now returned with modifications that make MSYS a usable host system. I basicaly catch the MSYS nature at the outset
    and create meaningful CMAKE_SYSTEM_xxxx variables based on finding
    msys-1.0.dll in your path; deriving an absolute path to /usr; going up further and finding ${mingw_top-level-root}.
    This is going into a public git hub when I get back to that.
    -rw-r--r-- 1 11368 Jun 1 17:28 /cmake/Modules/CMakeDetermineSystem.cmake
    -rw-r--r-- 1 7157 May 26 00:55 /cmake/Modules/CMakeGenericSystem.cmake
    -rw-r--r-- 1 2135 May 25 23:21 /cmake/Modules/CMakeMSYSFindMake.cmake
    -rw-r--r-- 1 7103 Jun 1 20:12 /cmake/Modules/FindCurses.cmake
    -rw-r--r-- 1 30589 May 23 14:26 /cmake/Modules/FindMPI.cmake
    -rw-r--r-- 1 5209 May 28 17:31 /cmake/Modules/Findfreetype.cmake
    (plplot-derived:)
    -rw-r--r-- 1 5232 Jun 4 14:47 /cmake/Modules/freetype.cmake
    -rw-r--r-- 1 14600 Jun 3 21:02 /cmake/Modules/pkg-config.cmake

    /cmake/Modules/Platform:
    total 27
    drwxr-xr-x 2 4096 May 26 05:15 .
    drwxr-xr-x 3 4096 Jun 4 14:51 ..
    -rw-r--r-- 1 2555 Jun 1 18:04 MinGW.cmake
    -rw-r--r-- 1 9220 May 26 00:30 Windows-GNU.cmake
    -rw-r--r-- 1 1329 May 26 00:54 Windows.cmake
    -rw-r--r-- 1 3705 May 23 14:05 WindowsPaths.cmake

     
    Last edit: GregJung 2014-06-05
  • GregJung
    GregJung
    2014-05-01

    Most of my earlier troubles derived from incorrect header sets.

    ignorance cured, post deleted

    The lingering problem was that
    cmake -G "MSYS Makefiles" ../
    didn't operate very smooothly, see previous post for the mods I made so that it does.

    fyi here is how my shell is set up:
    was:
    export "CFLAGS=-I/usr/local/include -I/mingw/include -march=i686"
    export "CXXFLAGS=-I/usr/local/include -I/mingw/include"
    export "LDFLAGS=-L/usr/local/lib -L/mingw/lib"
    export "PKG_CONFIG_PATH=/usr/local/lib/pkgconfig"

    export CC="gcc -O2"
    export CXX="g++ -O2"
    export FC="gfortran -O2"

    MSYS sends a "translated" environment to cmake when it requests, i.e., $ENV{LDFLAGS}. In the case above, the answer would look like "D:/mingw/msys/1.0/local/lib -L/mingw/lib" but if you tried to fix it
    by D:/mingw/lib you get a worse mess. My mods deal with this as well as
    for the pkg-config requirements, if there are more than one PKG_CONFIG_PATH(s).

    now:
    export "CFLAGS=-I/usr/local/include -I/mingw/include"
    export "CXXFLAGS=-I/usr/local/include -I/mingw/include"
    export "LDFLAGS=-L/usr/local/lib -L/mingw/lib"
    export "PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/mingw/lib/pkgconfig"
    
    export CC="gcc -O2 -mms-bitfields -mthreads -mtune=pentium3"
    export CXX="g++ -O2 -mms-bitfields -mthreads -mtune=pentium3"
    export FC="gfortran -O2 -mms-bitfields"
    
     
    Last edit: GregJung 2014-06-05
    • GregJung
      GregJung
      2014-05-07

      I (may have) fixed most of my problems by fixing my /mingw installation. I have to take a pause, though, because of this notice included in gcc-4.7.2-ming32.README:

      Binary incompatibility notice!


      ==========================================================

      (note June 2014)Evidently everything is copascetic.

       
      Last edit: GregJung 2014-06-05
  • GregJung
    GregJung
    2014-06-05

    plplot - the continuing saga

    After getting gdl/cmake satisfied up to the optional libraries, I'm gonna return to PLPLOT building. Last time it "built" but the tests didn't plot anything. I'm adding PSLIB (version 0.4.5) which then needs to use inttool which then needs a working perl with XML::Parser module so I have to learn all that ... msys-perl as it came from mingw-get
    didn't have a module library but i found another
    http://lrn.no-ip.info/other/mingw/msys/perl/5.8.8-0RC1/perl-5.8.8-1-msys-1.0.16-bin.tar.lzma
    which had it all. Then XML::Parser package has to be perl'd, ..

     
    • giloo
      giloo
      2014-06-05

      Hi,
      For what it is worth, my advice:
      plplot: evidently if their test plots do not work, you'll have no chance for plots in GDL. There seem to be a lot of activity in the plplot mailing list plplot-devel@lists.sourceforge.net about window support, perhaps some information there?
      PSLIB: is not really needed (plplot makes correct eps files for gdl).

       
  • GregJung
    GregJung
    2014-06-15

    I've now built PLPLOT in mingw/msys, using freetype (after my modifications to CMAKE scripts), I had to push things along to complete it. The header files that were generated, and a few more from /lib directory, are not found for the compile; I had to copy the necessary files into the main /include directory - as if only a single directory ${CMAKE_SOURCE_DIR}/include is communicated to the make files.
    wingcc.c had further issues with freetype headers: I hand-compiled the module with the -I{..}/include/freetype2 on the command line (where ft2build.h was located). Installations where ft2build.h is found in the common include directories should have an easier time of it.
    6-15-2014
    =====================
    7-3-2014
    re-edit: I've resolved the issue where freetype-needy modules didn't
    get proper include-directory command lines. In my particular freetype
    version the directory include/freetype2 need be in the gcc line so that
    include/ft2build.h can find ftheader.h ... anyway, the plplot-5.10.0
    still calls out for FREETYPE_INCLUDE_DIR which isn't set even in the latest cmake version of FindFreetype, or for the package-find solution
    FREETYPE_INCLUDE_DIRS is set not the singular. This is changed in the upcoming plplot build, since 3/2014 (#13025), by copying include_dirs to a new variable FREETYPE_INCLUDE_CFLAGS in the custom freetype.cmake routine.
    src/CMakelists.txt, cmake/modules/wingcc.cmake, wxwidgets.cmake
    =====
    Now on to testing plplot under windows ...

     
    Last edit: GregJung 2014-07-03
  • Alain C.
    Alain C.
    2014-06-28

    My student Loria, with the help of Jeongbin Park during GDL workshop,
    learn how to compile on MS-windows within MinGW.

    He also prepared a document
    http://aramis.obspm.fr/~coulais/IDL_et_GDL/HowTo_Compile_GDL_on_MinGW.html

    HTH

    comments, suggestions, extension very welcome !

    Alain

     
    • GregJung
      GregJung
      2014-07-04

      How is the performance of your build? Do you find the same problems as in this review?
      https://sourceforge.net/projects/gnudatalanguage-win32/reviews?source=navbar
      ( the plot window was very buggy).
      Perhaps there was some 64-bit stuff mixed in, it was that bad. One thing happened though, somehow running the GDL healed my initial lack
      of plplot definitions (once I copied a few dlls into the /bin directory).

       
  • Alain C.
    Alain C.
    2014-06-28

    I forgot to mention we did not really tested the performance with the Eigen part, which need also OpenMP to be efficient on multicore ...

    Next step here will be to have OpenMP in MSwin !

    Alain