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] openImageIO/2.4.12.0/src/build-scripts/build_llvm.bash has bad pull URL #3891

Closed
TxRxFx opened this issue Jun 21, 2023 · 1 comment · Fixed by #3892
Closed

[BUG] openImageIO/2.4.12.0/src/build-scripts/build_llvm.bash has bad pull URL #3891

TxRxFx opened this issue Jun 21, 2023 · 1 comment · Fixed by #3892

Comments

@TxRxFx
Copy link

TxRxFx commented Jun 21, 2023

Describe the bug
Would appear there's been things moved on GitHub that the llvm build script needs and now it fails to download thus making extraction fail.

To Reproduce
Steps to reproduce the behavior:

  1. Run src/build-scripts/build_llvm.bash
  2. Script executes:
curl --location https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-x86_64-linux-gnu-error.tar.xz -o clang+llvm-13.0.0-x86_64-linux-gnu-error.tar.xz

Expected behavior
Need this to build as expected.

Evidence
Visiting the URL provided in bash script shows 404 on GitHub.

Error log:

tar: This does not look like a tar archive
xz: (stdin): File format not recognized
tar: Child returned status 1
tar: Error is not recoverable: exiting now

Platform information:

  • OIIO 2.4.12.0
  • OS: Ubuntu
  • C++ compiler: GCC
@lgritz
Copy link
Collaborator

lgritz commented Jun 22, 2023

clang+llvm-13.0.0-x86_64-linux-gnu-error.tar.xz

See where it says "error"? That is where in the script it should substitute ${LLVM_DISTRO_NAME}.

You can see the logic here: https://github.com/OpenImageIO/oiio/blob/master/src/build-scripts/build_llvm.bash#L15

So I think what is happening is that this script is only meant to be run as part of our CI, so expects either $GITHUB_WORKFLOW to be defined, or $TRAVIS_DIST (apparently a holdover from the long-ago era when we used TravisCI).

I'm going to guess that you're trying to run this script standalone to download, build, and install LLVM, but it seems it wasn't meant for that. (Now, maybe it should be! But it currently isn't.)

lgritz added a commit that referenced this issue Jun 25, 2023
* Remove leftover logic from when we used TravisCI.
* Pick a default for LLVM_DISTRO_NAME so it works when the script is run
standalone when not on GitHub Actions CI. (But it's still really only
meant to run on x86 Ubuntu, and not designed for anything useful outside
of our CI.)
* Eliminate all the complexity with old LLVM versions -- in practice,
our CI only uses this to download fairly modern clang versions.

Fixes #3891

Signed-off-by: Larry Gritz <[email protected]>
lgritz added a commit to lgritz/OpenImageIO that referenced this issue Jul 1, 2023
* Remove leftover logic from when we used TravisCI.
* Pick a default for LLVM_DISTRO_NAME so it works when the script is run
standalone when not on GitHub Actions CI. (But it's still really only
meant to run on x86 Ubuntu, and not designed for anything useful outside
of our CI.)
* Eliminate all the complexity with old LLVM versions -- in practice,
our CI only uses this to download fairly modern clang versions.

Fixes AcademySoftwareFoundation#3891

Signed-off-by: Larry Gritz <[email protected]>
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

Successfully merging a pull request may close this issue.

2 participants