ECCODES build on Windows 11 fails on Generate step

861 views Asked by At

I'm trying to build ECCODES C package (https://confluence.ecmwf.int/display/ECC/ecCodes+installation) on Windows 11 for further usage with python pygrib library also on Windows 11.

What I did:

  • create dir structure: C:\tmp\eccodes\build and C:\tmp\eccodes\installation
  • download ecccodes sources from https://confluence.ecmwf.int/display/ECC/Releases
  • unzip sources to C:\tmp\eccodes\eccodes-{version_here}-Source
  • install Cmake
  • install Ubuntu for Windows (Ubuntu 18.04.6 LTS available in Widows Microsoft Store) that will be used for running ECCODES .sh scripts.
  • install PERL for Windows
  • go to C:\tmp\eccodes\build and call: cmake -DDISABLE_OS_CHECK="on" -DCMAKE_BUILD_TYPE="release" -DCMAKE_C_COMPILER="gcc" -DCMAKE_INSTALL_PREFIX="C:\tmp\eccodes\installation" -DBUILD_SHARED_LIBS="both" -DENABLE_AEC="off" -DENABLE_PNG="off" -DENABLE_NETCDF="off" -DENABLE_FORTRAN="off" -DENABLE_PYTHON="on" C:\tmp\eccodes\eccodes-2.25.0-Source -DBASH_EXE=C:\Windows\System32\bash.exe -DENABLE_TESTS=ON
  • Probably you will have to install a lot of missing Ubuntu libraries to make this command run.
  • Be aware that bash working on Windows will needs here and there in source code default paths changes like: C:/tmp/eccodes/build/ to /mnt/c/tmp/eccodes/build/

The issue I try to solve is failing Generation step:

Evaluation file to be written multiple times with different content

Maybe someone of you will have idea where exactly in ECCODES sources the issue is?

Here is console output:

C:\tmp\eccodes\build>cmake -DDISABLE_OS_CHECK="on" -DCMAKE_BUILD_TYPE="release" -DCMAKE_C_COMPILER="gcc" -DCMAKE_INSTALL_PREFIX="C:\tmp\eccodes\installation" -DBUILD_SHARED_LIBS="both" -DENABLE_AEC="off"   -DENABLE_PNG="off"  -DENABLE_NETCDF="off" -DENABLE_FORTRAN="off" -DENABLE_PYTHON="on" C:\tmp\eccodes\eccodes-2.25.0-Source -DBASH_EXE=C:\Windows\System32\bash.exe -DENABLE_TESTS=OFF
-- Building for: Visual Studio 14 2015
-- Selecting Windows SDK version 10.0.14393.0 to target Windows 10.0.22000.
-- The C compiler identification is MSVC 19.0.23026.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- ecbuild   3.6.5      C:/tmp/eccodes/eccodes-2.25.0-Source/cmake
-- cmake     3.23.1     C:/Program Files/CMake/bin/cmake.exe
-- ---------------------------------------------------------
-- Found Git: C:/Users/pps-ext/AppData/Local/Programs/Git/cmd/git.exe (found version "2.16.1.windows.4")
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
-- Check size of off_t
-- Check size of off_t - done
CMake Warning at cmake/ecbuild_log.cmake:162 (message):
  WARN - ENABLE_LARGE_FILE_SUPPORT active, sizeof off_t is 4 < 8 but ecbuild
  does not know how to enable large files in this operating system
Call Stack (most recent call first):
  cmake/ecbuild_add_large_file_support.cmake:25 (ecbuild_warn)
  cmake/ecbuild_check_os.cmake:55 (ecbuild_add_large_file_support)
  cmake/ecbuild_system.cmake:248 (include)
  cmake/ecbuild_project.cmake:76 (include)
  CMakeLists.txt:24 (project)


CMake Warning at cmake/ecbuild_log.cmake:162 (message):
  WARN - CMake doesn't support symlinks on Windows.  Replacing all symlinks
  with copies.
Call Stack (most recent call first):
  cmake/ecbuild_check_os.cmake:436 (ecbuild_warn)
  cmake/ecbuild_system.cmake:248 (include)
  cmake/ecbuild_project.cmake:76 (include)
  CMakeLists.txt:24 (project)


CMake Warning at cmake/ecbuild_log.cmake:162 (message):
  WARN - This is NOT UNIX - timestamp not implemented
Call Stack (most recent call first):
  cmake/ecbuild_get_date.cmake:49 (ecbuild_warn)
  cmake/ecbuild_system.cmake:264 (ecbuild_get_timestamp)
  cmake/ecbuild_project.cmake:76 (include)
  CMakeLists.txt:24 (project)


-- ---------------------------------------------------------
-- ---------------------------------------------------------
-- [eccodes] (2.25.0) [c59716f]
-- Tests have been disabled
-- Check size of int
-- Check size of int - done
-- Check size of long
-- Check size of long - done
-- Check size of size_t
-- Check size of size_t - done
-- Looking for include file assert.h
-- Looking for include file assert.h - found
-- Looking for include file string.h
-- Looking for include file string.h - found
-- Looking for include file sys/types.h
-- Looking for include file sys/types.h - found
-- Looking for include file sys/stat.h
-- Looking for include file sys/stat.h - found
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - not found
-- Looking for fseeko
-- Looking for fseeko - not found
-- Looking for posix_memalign
-- Looking for posix_memalign - not found
-- Looking for fmemopen
-- Looking for fmemopen - not found
-- Looking for funopen
-- Looking for funopen - not found
-- Looking for realpath
-- Looking for realpath - not found
-- Looking for fsync
-- Looking for fsync - not found
-- Looking for fdatasync
-- Looking for fdatasync - not found
-- Performing Test ECCODES_HAVE_C_INLINE
-- Performing Test ECCODES_HAVE_C_INLINE - Success
-- Performing Test IEEE_BE
-- Performing Test IEEE_BE - Failed
-- Performing Test IEEE_LE
-- Performing Test IEEE_LE - Success
-- Operating system=Windows-10.0.22000 (32 bits)
-- Feature PRODUCT_GRIB enabled
-- Feature PRODUCT_BUFR enabled
-- Feature EXAMPLES enabled
-- Feature BUILD_TOOLS enabled
-- Feature JPG enabled
-- Feature JPG_LIBJASPER enabled
-- Feature JPG_LIBOPENJPEG enabled
-- Could NOT find AEC (missing: AEC_LIBRARY AEC_INCLUDE_DIR)
-- Found PythonInterp: C:/Users/pps-ext/AppData/Local/Programs/Python/Python37/python.exe (found version "3.7.9")
-- Found Python: TRUE
-- Found NumPy: version "1.19.5" C:/Users/pps-ext/AppData/Local/Programs/Python/Python37/lib/site-packages/numpy/core/include
-- Feature INSTALL_ECCODES_DEFINITIONS enabled
-- Feature INSTALL_ECCODES_SAMPLES enabled
-- Could NOT find JPEG (missing: JPEG_LIBRARY) (found version "90")
-- Could NOT find Jasper (missing: JASPER_LIBRARIES JASPER_INCLUDE_DIR JPEG_LIBRARIES)
-- Could NOT find OpenJPEG (missing: OPENJPEG_LIBRARY OPENJPEG_INCLUDE_DIR)
--  HAVE_JPEG=0
--  HAVE_LIBJASPER=0
--  HAVE_LIBOPENJPEG=0
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
--  CMAKE_THREAD_LIBS_INIT=
--  CMAKE_USE_PTHREADS_INIT=
--  HAVE_ECCODES_THREADS=0
--  POSIX THREADS = 0
--  OpenMP THREADS= 0
-- Performing Test eccodes_C_FLAG_TEST_1
-- Performing Test eccodes_C_FLAG_TEST_1 - Success
-- Added C flag [/D_CRT_SECURE_NO_WARNINGS]
-- Performing Test eccodes_C_FLAG_TEST_2
-- Performing Test eccodes_C_FLAG_TEST_2 - Success
-- Added C flag [/D_CRT_NONSTDC_NO_DEPRECATE]
-- Performing Test eccodes_C_FLAG_TEST_3
-- Performing Test eccodes_C_FLAG_TEST_3 - Success
-- Added C flag [/wd4267]
-- pkg-config file to be created during build: eccodes.pc
-- ---------------------------------------------------------
-- Project eccodes summary
-- ---------------------------------------------------------
-- ---------------------------------------------------------
-- Build summary
-- ---------------------------------------------------------
-- system : [PC02234] [Windows-10.0.22000] [windows.32]
-- processor        : [AMD64]
-- endiness         : Little Endian -- IEEE [1]
-- build type       : [Release]
-- timestamp        : []
-- install prefix   : [C:/tmp/eccodes/installation]
--   bin dir        : [C:/tmp/eccodes/installation/bin]
--   lib dir        : [C:/tmp/eccodes/installation/lib]
--   include dir    : [C:/tmp/eccodes/installation/include]
--   data dir       : [C:/tmp/eccodes/installation/share/eccodes]
--   cmake dir      : [C:/tmp/eccodes/installation/lib/cmake/eccodes]
-- ---------------------------------------------------------
-- C -- MSVC 19.0.23026.0
--     compiler   : C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
--     flags      : /DWIN32 /D_WINDOWS /W3 /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /wd4267 /MD /O2 /Ob2 /DNDEBUG
--     link flags :
-- RC --
--     compiler   : rc
--     flags      : -DWIN32
--     link flags :
-- linker : C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/link.exe
-- ar     : C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/lib.exe
-- ranlib : :
-- link flags
--     executable [/machine:X86 /INCREMENTAL:NO]
--     shared lib [/machine:X86 /INCREMENTAL:NO]
--     static lib [/machine:X86 /INCREMENTAL:NO]
-- install rpath  : C:/tmp/eccodes/installation/../lib
-- common definitions: HAVE_ECCODES_CONFIG_H
-- ---------------------------------------------------------
-- Feature summary
-- ---------------------------------------------------------
-- The following features have been enabled:

 * PRODUCT_GRIB, eccodes: Support for the product GRIB
 * PRODUCT_BUFR, eccodes: Support for the product BUFR
 * EXAMPLES, eccodes: Build the examples
 * BUILD_TOOLS, eccodes: Build the command line tools
 * JPG, eccodes: Support for JPG decoding/encoding
 * JPG_LIBJASPER, eccodes: Support for JPG decoding/encoding with the Jasper library
 * JPG_LIBOPENJPEG, eccodes: Support for JPG decoding/encoding with the OpenJPEG library
 * INSTALL_ECCODES_DEFINITIONS, eccodes: Install the ecCodes definitions
 * INSTALL_ECCODES_SAMPLES, eccodes: Install the ecCodes samples, including IFS samples

-- The following OPTIONAL packages have been found:

 * Git
 * PythonInterp, Python interpreter, <http://python.org>
 * NumPy
 * Perl

-- The following REQUIRED packages have been found:

 * ecbuild (required version >= 3.4)
 * Threads

-- The following features have been disabled:

 * TESTS, eccodes: Enable the unit tests
 * PNG, eccodes: Support for PNG decoding/encoding
 * NETCDF, eccodes: Support for GRIB to NetCDF conversion
 * AEC, eccodes: Support for Adaptive Entropy Coding
 * PYTHON2, eccodes: Build the ecCodes Python2 interface (deprecated)
 * FORTRAN, eccodes: Build the ecCodes Fortran interface
 * MEMFS, eccodes: Memory based access to definitions/samples
 * MEMORY_MANAGEMENT, eccodes: Enable memory management
 * ALIGN_MEMORY, eccodes: Enable memory alignment
 * TIMER, eccodes: Enable timer
 * ECCODES_THREADS, eccodes: Enable POSIX threads
 * ECCODES_OMP_THREADS, eccodes: Enable OpenMP threads
 * EXTRA_TESTS, eccodes: Enable extended regression testing

-- The following OPTIONAL packages have not been found:

 * AEC, eccodes: Support for Adaptive Entropy Coding
 * CMath
 * JPEG
 * Jasper
 * OpenJPEG

--
--    +--------------------------+
--    |  ecCodes version 2.25.0  |
--    +--------------------------+
--
--    +--------------------------------------+
--    | Please note:                         |
--    | For Python3 support, first install   |
--    | ecCodes and then install the Python  |
--    | bindings from PyPI with:             |
--    |   $ pip3 install eccodes             |
--    +--------------------------------------+
--
-- Configuring done
CMake Error in CMakeLists.txt:
  Evaluation file to be written multiple times with different content.  This
  is generally caused by the content evaluating the configuration type,
  language, or location of object files:

   C:/tmp/eccodes/build/eccodes.pc.tmp


CMake Error in CMakeLists.txt:
  Evaluation file to be written multiple times with different content.  This
  is generally caused by the content evaluating the configuration type,
  language, or location of object files:

   C:/tmp/eccodes/build/eccodes.pc.tmp


CMake Error in CMakeLists.txt:
  Evaluation file to be written multiple times with different content.  This
  is generally caused by the content evaluating the configuration type,
  language, or location of object files:

   C:/tmp/eccodes/build/eccodes.pc.tmp


CMake Error in CMakeLists.txt:
  Evaluation file to be written multiple times with different content.  This
  is generally caused by the content evaluating the configuration type,
  language, or location of object files:

   C:/tmp/eccodes/build/eccodes.pc.tmp


CMake Error in CMakeLists.txt:
  Evaluation file to be written multiple times with different content.  This
  is generally caused by the content evaluating the configuration type,
  language, or location of object files:

   C:/tmp/eccodes/build/eccodes.pc.tmp


CMake Error in CMakeLists.txt:
  Evaluation file to be written multiple times with different content.  This
  is generally caused by the content evaluating the configuration type,
  language, or location of object files:

   C:/tmp/eccodes/build/eccodes.pc.tmp


-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    DISABLE_OS_CHECK
    ENABLE_PYTHON


CMake Generate step failed.  Build files cannot be regenerated correctly.

C:\tmp\eccodes\build>```
0

There are 0 answers