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

[BUG] Three issues with build_ninja.bash #3708

Closed
GreyHak opened this issue Dec 14, 2022 · 1 comment · Fixed by #4192
Closed

[BUG] Three issues with build_ninja.bash #3708

GreyHak opened this issue Dec 14, 2022 · 1 comment · Fixed by #4192
Labels
build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration. good first issue Good one-day project for beginners without much knowledge of the code base. help wanted A task that is desired, but needs somebody to commit the effort to implement it.

Comments

@GreyHak
Copy link

GreyHak commented Dec 14, 2022

Describe the bug

  1. https://github.com/OpenImageIO/oiio/blob/master/src/build-scripts/build_ninja.bash#L13 performs a check to see if a .zip file exists. If it doesn't a .tar.gz file is downloaded. Either way a .tar.gz file is extracted. The check should be for the existance of a .tar.gz file, not a .zip file.
  2. The path of the file downloaded https://github.com/ninja-build/ninja/archive/v1.10.2.tar.gz, no longer aligned with GitHub's release file structure. The download is now available at https://github.com/ninja-build/ninja/archive/refs/tags/v1.10.2.tar.gz. "refs/tags" needs to be added.

To Reproduce
Steps to reproduce the behavior:

  1. Run src/build-scripts/build_ninja.bash
  2. Or run src/build-scripts/build_ninja.bash with oiio/ext/downloads/ninja-1.10.2.zip already present. You can download it from https://github.com/ninja-build/ninja/archive/refs/tags/v1.10.2.zip

Expected behavior
If the .zip file is present, but the .tar.gz file is not, the script will attempt to untar the nonexistent file and fail. If neither file is present, the script will attempt to download the .tar.gz file file from the wrong location and fail.

Evidence

+ LOCAL_DEPS_DIR=/home/cent/git/external/oiio/ext
+ DOWNLOADS_DIR=/home/cent/git/external/oiio/ext/downloads
+ NINJA_REPO=https://github.com/ninja-build/ninja
+ NINJA_VERSION=1.10.2
+ NINJA_BRANCH=v1.10.2
+ NINJA_INSTALL_DIR=/home/cent/git/external/oiio/ext/dist/bin
+ '[' '!' -f /home/cent/git/external/oiio/ext/downloads/ninja-1.10.2.zip ']'
+ curl --location https://github.com/ninja-build/ninja/archive/v1.10.2.tar.gz -o /home/cent/git/external/oiio/ext/downloads/ninja-v1.10.2.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file
Warning: /home/cent/git/external/oiio/ext/downloads/ninja-v1.10.2.tar.gz: No
Warning: such file or directory
  0  208k    0   512    0     0    773      0  0:04:36 --:--:--  0:04:36  2327
curl: (23) Failure writing output to destination

Platform information:

  • OIIO branch/version: commit 1449b46 (HEAD -> master, origin/master, origin/HEAD)
  • OS: CentOS Stream release 9
  • C++ compiler: g++ 11.3.1 20221121
  • Any non-default build flags when you build OIIO: No. Not getting that far.
@GreyHak GreyHak changed the title [BUG] Two issues with build_ninja.bash [BUG] Three issues with build_ninja.bash Dec 14, 2022
@GreyHak
Copy link
Author

GreyHak commented Dec 14, 2022

Trying to get passed that error I discovered that it's trying to download into a downloads folder which does not exist. So that's a third problem.

@lgritz lgritz added build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration. good first issue Good one-day project for beginners without much knowledge of the code base. labels Sep 27, 2023
@lgritz lgritz added the help wanted A task that is desired, but needs somebody to commit the effort to implement it. label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration. good first issue Good one-day project for beginners without much knowledge of the code base. help wanted A task that is desired, but needs somebody to commit the effort to implement it.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants