Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building eccodes #35

Closed
akashpulimel opened this issue Oct 7, 2020 · 2 comments
Closed

Building eccodes #35

akashpulimel opened this issue Oct 7, 2020 · 2 comments

Comments

@akashpulimel
Copy link

Hello all,

I'm trying to install eccodes on my windows 10 system by following the instructions provided in the GitHub page(https://github.com/ecmwf/eccodes). While running the -DCMAKE_INSTALL_PREFIX line of the code (in command prompt), it starts to build but soon exits with the following error:

"CMake Error at cmake/ecbuild_log.cmake:196 (message):
CRITICAL - Failed to replace windows symlinks. output=[] error=[/bin/bash:
E:/Akash/eccodes-2.18.0-Source/cmake/ecbuild_windows_replace_symlinks.sh:
No such file or directory

]
Call Stack (most recent call first):
cmake/ecbuild_check_os.cmake:450 (ecbuild_critical)
cmake/ecbuild_system.cmake:265 (include)
CMakeLists.txt:25 (include)

-- Configuring incomplete, errors occurred!
See also "E:/Akash/build/CMakeFiles/CMakeOutput.log".

I'm using cmake-3.18.3-win64-x64, eccodes-2.18.0-Source (downloaded from https://confluence.ecmwf.int/display/ECC/Releases and extracted as instructed), I have installed Ubuntu from windows store and I'm building in a clean directory. 'CMakeOutput.log' and 'ecbuild.log' files are also attached here for your reference.
CMakeOutput.log
.
ecbuild.log

If anybody has any solutions/suggestions on this, please help.

Thanks,
Akash

@shahramn
Copy link
Collaborator

Windows is not fully supported

@MRPHarris
Copy link

MRPHarris commented May 24, 2023

Hi @akashpulimel, did you ever find a solution to this issue? I am trying to compile on windows and have run into the exact same error.

-- Quick edit --

I have solved this issue for my compilation attempt on Windows. Bash was unable to find the symlink replacement sh file, due to the handling of directories passed to bash in the execute_process function within ecbuild_check_os.cmake. In bash, if I changed the working directory to the project source directory, then passed bash the shortened path "./cmake/ecbuild_windows_replace_symlinks.sh", it was able to find and run the script.

To implement this fix, I changed these lines in ecbuild_check_os.cmake:

execute_process( COMMAND ${BASH_EXE} -c "${ECBUILD_MACROS_DIR}/ecbuild_windows_replace_symlinks.sh"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE CMD_RESULT
OUTPUT_VARIABLE CMD_OUTPUT
ERROR_VARIABLE CMD_ERROR )

To the following:

set (bash_cmd "bash")
set (bash_arg -c "./cmake/ecbuild_windows_replace_symlinks.sh")
execute_process( COMMAND ${bash_cmd} ${bash_arg}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE CMD_RESULT
OUTPUT_VARIABLE CMD_OUTPUT
ERROR_VARIABLE CMD_ERROR )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants