Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Updated Cgwin build?

Brendan
2013-07-23
2013-11-13
  • Brendan
    Brendan
    2013-07-23

    Any chance of getting an updated Cygwin build?

     
  • Charlie Zender
    Charlie Zender
    2013-07-23

    we need volunteers to contribute cygwin builds. anyone?
    cz

     
  • Charlie Zender
    Charlie Zender
    2013-07-23

    also note that there are now native windows builds distributed on the homepage.
    cz

     
  • Brendan
    Brendan
    2013-09-30

    Thanks to whomever contributed the recent cygwin 4.3.5 build. Is the ncap executable in this package ncap2?

     
  • Brendan
    Brendan
    2013-09-30

    whoever, whomever, blah

     
  • Charlie Zender
    Charlie Zender
    2013-09-30

    it's both an indirect object and the subject of a noun phrase, so i share your confusion.

    the ncap executable is not ncap2, it is an earlier form of ncap2 that is easier to build.
    it can perform a limited number of straightforward functions but nothing fancy.
    we're (thanks mark!) working on getting ncap2 in the next cygwing build.

    cz

     
  • Mark Hadfield
    Mark Hadfield
    2013-09-30

    I have not made much progress on ncap2. I am stuck on the ANTLR-C++ interface. Different ANTLR versions appear to have wildly different build systems. The last one that uses the old familiar configure mechanism is 2.7.7 (7 years old) and on Cygwin there is a compilation failure. Too much trouble for a mere scientist like me.

     
  • Pedro Vicente
    Pedro Vicente
    2013-09-30

    @brendandetracey, hadfield
    We will provide NCO 4.3.6 cygwing binaries

    Pedro

     
  • Charlie Zender
    Charlie Zender
    2013-09-30

    Mark, what is the antlr error? It rings a bell. I think it may just require a one-line change in the antlr source tree…
    cz

     
  • Mark Hadfield
    Mark Hadfield
    2013-09-30

    compiling /home/hadfield/tmp/antlr-2.7.7/lib/cpp/src/../../../lib/cpp/src/CharScanner.cpp
    In file included from /home/hadfield/tmp/antlr-2.7.7/lib/cpp/src/../../../lib/cpp/src/CharScanner.cpp:10:0:
    C:/Cygwin/home/hadfield/tmp/antlr-2.7.7/lib/cpp/antlr/CharScanner.hpp:474:30: error: ‘EOF’ was not declared in this scope
    C:/Cygwin/home/hadfield/tmp/antlr-2.7.7/lib/cpp/antlr/CharScanner.hpp: In member function ‘bool antlr::CharScannerLiteralsLess::operator()(const string&, const string&) const’:
    C:/Cygwin/home/hadfield/tmp/antlr-2.7.7/lib/cpp/antlr/CharScanner.hpp:565:41: error: ‘strcasecmp’ was not declared in this scope
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                          >> E R R O R <<
    ============================================================
    g++ -O2 -DNDEBUG -felide-constructors -pipe -c  -I . -I C:/Cygwin/home/hadfield/tmp/antlr-2.7.7/lib/cpp /home/hadfield/tmp/antlr-2.7.7/lib/cpp/src/../../../lib/cpp/src/CharScanner.cpp
    ============================================================
    Got an error while trying to execute  command  above.  Error
    messages (if any) must have shown before. The exit code was:
    exit(1)
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Makefile:181: recipe for target /home/hadfield/tmp/antlr-2.7.7/lib/cpp/src/CharScanner.o' failed make[3]: *** [/home/hadfield/tmp/antlr-2.7.7/lib/cpp/src/CharScanner.o] Error 1 make[3]: Leaving directory/home/hadfield/tmp/antlr-2.7.7/lib/cpp/src'
    Makefile:146: recipe for target all' failed make[2]: *** [all] Error 1 make[2]: Leaving directory/home/hadfield/tmp/antlr-2.7.7/lib/cpp'
    Makefile:141: recipe for target all' failed make[1]: *** [all] Error 1 make[1]: Leaving directory/home/hadfield/tmp/antlr-2.7.7/lib'
    Makefile:160: recipe for target `all' failed
    make:
    [all] Error 1

     
  • Pedro Vicente
    Pedro Vicente
    2013-09-30

    Mark, I found that error too while building ANTLR 2.7.7;

    This version here (bottom of page)

    http://nco.sourceforge.net/nco_qt_msvc.shtml

    has that fixed

    Pedro

     
  • Charlie Zender
    Charlie Zender
    2013-09-30

    The ANTLR file CharScanner.hpp needs to have a line like the following

    #include <strings.h>

    near the top so it can find the prototype for strcasecmp().
    cz

     
  • Mark Hadfield
    Mark Hadfield
    2013-09-30

    If Pedro is going to build a NCO 4.3.6 Cygwin binary with a working ncap2 then I am more than happy to abandon my own feeble efforts.

     
  • Pedro Vicente
    Pedro Vicente
    2013-09-30

    Mark, until the NCO 4.3.6 Cygwin binaries are ready, you might want to give a try to the native NCO 4.3.6 Windows build

    http://nco.sourceforge.net/#windows

    Out of curiosity: Why the need for  Cygwin binaries? Because you use  Cygwin anyway?

    Pedro

     
  • Mark Hadfield
    Mark Hadfield
    2013-09-30

    Because I use Cygwin anyway. Because in the Cygwin environment it is usually best to use Cygwin-aware applications-ones that understand Unix paths, for example. Because my Cygwin netCDF library can handle things like OpenDAP, and NCO can make use of this seamlessly. Because I'm a bit stubborn when I try to build something under Cygwin and run into problems.

    But I'm definitely not a purist and I'm not stubborn enough to bash my head against a brick wall endlessly. A Windows-native ncap2 executable would be handy. :-)

     
  • Pedro Vicente
    Pedro Vicente
    2013-10-01

    I added that missing file to the NCO distribution

    please download again

    http://nco.sourceforge.net/#windows

    By the way, all operators are built in this native distribution, including ncap2

    However there are 2 features that are missing from the native build, but are available in the Cygwin build

    1) UDunits
    2) Regular expressions

    This is because there are not Windows native ports of these packages. We will support them in a future release, hopefully (meaning we will try to build a Windows native port ourselves).

    So, if these are important features to you, you may want to stick with the Cygwin build for a while.

    Other feature also not present in the native build is HDF4 linkage (allowing to open HDF4 files via NCO), I will add that soon

    Pedro

     
  • Mark Hadfield
    Mark Hadfield
    2013-10-02

    And now it's asking for hdf5_hl_D.dll -:)

     
  • Pedro Vicente
    Pedro Vicente
    2013-10-02

    I uploaded a new NCO 4.3.6 Windows package with that DLL file included.

    Pedro

     
  • Brendan
    Brendan
    2013-10-29

    I downloaded the latest cygwin build (nco-4.3.7.win32.cygwin.tar.gz (5.0M): Executables Cygwin-compatible (last updated Thursday, 17-Oct-2013 21:14:04 UTC).) and installed by untarring into /usr/local/.

    For some reason ncap2 does nothing. Can anyone enlighten me on this?

    (Thanks for the updated cygwin build. I was in the process of attempting my own, but after waiting fruitlessly three months for our IT dept to allow me to run the cygwin setup to install GSL, I gave up.)

     
  • Pedro Vicente
    Pedro Vicente
    2013-10-29

    What was the command you used for ncap2?

    Can you try this?

    ncks -C -v time ~/nco/data/in.nc
    ncap2 -s 'time=time+1' ~/nco/data/in.nc out.nc
    ncks -C -v time out.nc

    Pedro

     
  • Brendan
    Brendan
    2013-10-29

    Should not really matter what the command is.

    When I try:
    ncap2
    nothing happens or prints to the screen, just back to the command prompt.
    When I try:
    ncap2 -r
    again nothing, just the next command prompt.

    Should it matter where I unpacked the tarball? I noticed there are some libraries as well as executables. Would the location of these matter? I was assuming the executables are statically linked.

     
    Last edit: Brendan 2013-10-29
  • Pedro Vicente
    Pedro Vicente
    2013-10-29

    What happens if you run ncap2, or any other operator, in the place where you unpacked to?

    cd /usr/local
    cd bin

    ncap2 -r
    ncks -r

     
  • Brendan
    Brendan
    2013-10-30

    All other nco executables work. This is, if I enter the command with no options, the help text is displayed. It is only ncap2 that does not work.

    I tried ncap2 from /usr/local/bin but it did not work.

    FYI:( 5941077 Oct 17 18:10 ncap2.exe )

     
    Last edit: Brendan 2013-10-30
  • Brendan
    Brendan
    2013-10-30

    One other hint.
    ldd /usr/local/bin/ncap2
    hangs. Maybe this means a library is not properly linked? This is not my area of expertise.

    Try this command on your system and see what it reports.

     
  • Pedro Vicente
    Pedro Vicente
    2013-10-30

    Did you install the Cygwin packages that are NCO dependencies?

    These are listed on the home page

    http://nco.sourceforge.net/

    and are

    gsl
    hdf5
    netcdf
    udunits2
    expat

    Here's the output of

    ldd ncap2.exe

    with those dependencies

        ntdll.dll => /cygdrive/c/Windows/SysWOW64/ntdll.dll (0x772b0000)
        kernel32.dll => /cygdrive/c/Windows/syswow64/kernel32.dll (0x76d10000)
        KERNELBASE.dll => /cygdrive/c/Windows/syswow64/KERNELBASE.dll (0x76790000)
        cyggcc_s-1.dll => /usr/bin/cyggcc_s-1.dll (0x6ff90000)
        cygwin1.dll => /usr/bin/cygwin1.dll (0x61000000)
        cygstdc++-6.dll => /usr/bin/cygstdc++-6.dll (0x6fa20000)
        cyggsl-0.dll => /usr/bin/cyggsl-0.dll (0x672c0000)
        cygblas-0.dll => /usr/lib/lapack/cygblas-0.dll (0x61d40000)
        cyggfortran-3.dll => /usr/bin/cyggfortran-3.dll (0x69980000)
        cygquadmath-0.dll => /usr/bin/cygquadmath-0.dll (0x62600000)
        cygnetcdf-7.dll => /usr/bin/cygnetcdf-7.dll (0x6bf80000)
        cygcurl-4.dll => /usr/bin/cygcurl-4.dll (0x63f80000)
        cygcrypto-1.0.0.dll => /usr/bin/cygcrypto-1.0.0.dll (0x68b80000)
        cygz.dll => /usr/bin/cygz.dll (0x694c0000)
        cyggssapi-3.dll => /usr/bin/cyggssapi-3.dll (0x6b440000)
        cygheimntlm-0.dll => /usr/bin/cygheimntlm-0.dll (0x67d40000)
        cygkrb5-26.dll => /usr/bin/cygkrb5-26.dll (0x71440000)
        cygasn1-8.dll => /usr/bin/cygasn1-8.dll (0x6a840000)
        cygroken-18.dll => /usr/bin/cygroken-18.dll (0x6bc80000)
        cygcrypt-0.dll => /usr/bin/cygcrypt-0.dll (0x44000000)
        cygcom_err-2.dll => /usr/bin/cygcom_err-2.dll (0x70ec0000)
        cygwind-0.dll => /usr/bin/cygwind-0.dll (0x67140000)
        cyghx509-5.dll => /usr/bin/cyghx509-5.dll (0x6c100000)
        cygintl-8.dll => /usr/bin/cygintl-8.dll (0x6fd90000)
        cygiconv-2.dll => /usr/bin/cygiconv-2.dll (0x6fda0000)
        cygsqlite3-0.dll => /usr/bin/cygsqlite3-0.dll (0x64d80000)
        cygheimbase-1.dll => /usr/bin/cygheimbase-1.dll (0x71040000)
        cygidn-11.dll => /usr/bin/cygidn-11.dll (0x6c400000)
        cyglber-2-4-2.dll => /usr/bin/cyglber-2-4-2.dll (0x6a6c0000)
        cygldap-2-4-2.dll => /usr/bin/cygldap-2-4-2.dll (0x61a80000)
        cygsasl2-3.dll => /usr/bin/cygsasl2-3.dll (0x6d9c0000)
        cygssl-1.0.0.dll => /usr/bin/cygssl-1.0.0.dll (0x66280000)
        cygssh2-1.dll => /usr/bin/cygssh2-1.dll (0x6a0c0000)
        cyghdf5-7.dll => /usr/bin/cyghdf5-7.dll (0x70080000)
        cyghdf5_hl-7.dll => /usr/bin/cyghdf5_hl-7.dll (0x66600000)
        cygudunits2-0.dll => /usr/bin/cygudunits2-0.dll (0x6f540000)
        cygexpat-1.dll => /usr/bin/cygexpat-1.dll (0x670c0000)
    

    You can also try to build from source. The only dependency that is not available as Cygwin package is antlr, that you can download from here

    http://nco.sourceforge.net/nco_qt_msvc.shtml

    If you have all the denpencies, after doing

    ./configure --prefix=/my/install/location

    you should get a list of the dependencies in this report

    Configuration Parameters:
    AR_FLAGS............. cru
    CC................... gcc -std=gnu99
    CFLAGS............... -g -O2 -std=c99 -D_BSD_SOURCE -D_POSIX_SOURCE
    CPP.................. gcc -E
    CPPFLAGS............. -I/usr/include -I/usr/include -I/usr/include
    CXX.................. g++
    CXXFLAGS............. -g -O2
    ENABLE_DAP_NETCDF.... no
    ENABLE_DAP........... no
    ENABLE_GSL........... yes
    HAVE_NETCDF4_H....... yes
    ENABLE_NETCDF4....... yes
    NETCDF4_ROOT.........
    ENABLE_UDUNITS....... no
    ENABLE_UDUNITS2...... yes
    GSL_ROOT............. /usr
    HAVE_ANTLR........... no
    HOST.................
    host................. i686-pc-cygwin
    HOSTNAME............. pvicente_vaio
    LDFLAGS.............. -L/usr/lib -lnetcdf
    LIBS................. -ludunits2 -lexpat -lgsl -lresolv -lintl -lm -lnetcdf -lnetcdf -L/usr/lib -lgsl -lgslcblas -ludunits2
    install prefix ...... /home/pvicente/nco_install

     
  • Brendan
    Brendan
    2013-11-13

    Thanks. That must be the problem. Which leaves me in the same lurch i.e. no local admin priveleges on pc so can't run cygwin setup. :(

    Is a statically linked build of nco for cygwin possible? And is there a reason why you built without DAP?

     
    Last edit: Brendan 2013-11-13
  • Pedro Vicente
    Pedro Vicente
    2013-11-13

    It seems that the current version was not built with antlr; I uploaded new binaries, please give a try to these list of commands

    ncks -C -v time ~/nco/data/in.nc
    ncap2 -s 'time=time+1' ~/nco/data/in.nc out.nc
    ncks -C -v time out.nc

    the answer should be

    time: type NC_DOUBLE, 1 dimension, 0 attributes, chunked? yes, compressed? no, packed? no
    time size (RAM) = 10sizeof(NC_DOUBLE) = 108 = 80 bytes
    time dimension 0: time, size = 10 NC_DOUBLE, chunksize = 1 (Record coordinate is time)

    time[0]=2
    time[1]=3
    time[2]=4
    time[3]=5
    time[4]=6
    time[5]=7
    time[6]=8
    time[7]=9
    time[8]=10
    time[9]=11

    DAP is missing because the system cygiwn netCDF library seems not to be DAP enabled
    Pedro