Skip to content

Regression causing breakage on Github Actions #3297

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

Closed
kurtbuilds opened this issue Jul 9, 2023 · 2 comments
Closed

Regression causing breakage on Github Actions #3297

kurtbuilds opened this issue Jul 9, 2023 · 2 comments
Labels
C-bug Category: bug

Comments

@kurtbuilds
Copy link

kurtbuilds commented Jul 9, 2023

I have a package which runs CI on Github Actions.

When I did a recent cargo update to bump versions, it caused the build to fail. In one case, build is working. Then run cargo update, which updates the lockfile. That then causes the build to fail. That behavior is captured in this link: https://github.com/kurtbuilds/oasgen/actions

When it does fail, the error messages are, to me at least, quite cryptic. See full message here: https://github.com/kurtbuilds/oasgen/actions/runs/5501738098/jobs/10025536987#step:7:207

/usr/bin/ld: BrotliDecoderVersion: undefined version: 
          /usr/bin/ld: BrotliDecoderTakeOutput: undefined version: 
          /usr/bin/ld: BrotliDecoderSetParameter: undefined version: 
          /usr/bin/ld: BrotliDecoderMallocUsize: undefined version: 
          /usr/bin/ld: BrotliDecoderMallocU8: undefined version: 
          /usr/bin/ld: BrotliDecoderIsUsed: undefined version: 
          /usr/bin/ld: BrotliDecoderIsFinished: undefined version: 
          /usr/bin/ld: BrotliDecoderHasMoreOutput: undefined version: 
          /usr/bin/ld: BrotliDecoderGetErrorString: undefined version: 
          /usr/bin/ld: BrotliDecoderGetErrorCode: undefined version: 
          /usr/bin/ld: BrotliDecoderFreeUsize: undefined version: 
          /usr/bin/ld: BrotliDecoderFreeU8: undefined version: 
          /usr/bin/ld: BrotliDecoderErrorString: undefined version: 
          /usr/bin/ld: BrotliDecoderDestroyInstance: undefined version: 
          /usr/bin/ld: BrotliDecoderDecompressWithReturnInfo: undefined version: 
          /usr/bin/ld: BrotliDecoderDecompressStreaming: undefined version: 
          /usr/bin/ld: BrotliDecoderDecompressStream: undefined version: 
          /usr/bin/ld: BrotliDecoderDecompressPrealloc: undefined version: 
          /usr/bin/ld: BrotliDecoderDecompress: undefined version: 
          /usr/bin/ld: BrotliDecoderCreateInstance: undefined version: 
          /usr/bin/ld: CBrotliDecoderTakeOutput: undefined version: 
          /usr/bin/ld: CBrotliDecoderIsUsed: undefined version: 
          /usr/bin/ld: CBrotliDecoderIsFinished: undefined version: 
          /usr/bin/ld: CBrotliDecoderHasMoreOutput: undefined version: 
          /usr/bin/ld: CBrotliDecoderGetErrorString: undefined version: 
          /usr/bin/ld: CBrotliDecoderGetErrorCode: undefined version: 
          /usr/bin/ld: CBrotliDecoderErrorString: undefined version: 
          /usr/bin/ld: BrotliEncoderVersion: undefined version: 
          /usr/bin/ld: BrotliEncoderTakeOutput: undefined version: 
          /usr/bin/ld: BrotliEncoderSetParameter: undefined version: 
          /usr/bin/ld: BrotliEncoderSetCustomDictionary: undefined version: 
          /usr/bin/ld: BrotliEncoderMaxCompressedSizeMulti: undefined version: 
          /usr/bin/ld: BrotliEncoderMaxCompressedSize: undefined version: 
          /usr/bin/ld: BrotliEncoderMallocUsize: undefined version: 
          /usr/bin/ld: BrotliEncoderMallocU8: undefined version: 
          /usr/bin/ld: BrotliEncoderIsFinished: undefined version: 
          /usr/bin/ld: BrotliEncoderHasMoreOutput: undefined version: 
          /usr/bin/ld: BrotliEncoderFreeUsize: undefined version: 
          /usr/bin/ld: BrotliEncoderFreeU8: undefined version: 
          /usr/bin/ld: BrotliEncoderDestroyWorkPool: undefined version: 
          /usr/bin/ld: BrotliEncoderDestroyInstance: undefined version: 
          /usr/bin/ld: BrotliEncoderCreateWorkPool: undefined version: 
          /usr/bin/ld: BrotliEncoderCreateInstance: undefined version: 
          /usr/bin/ld: BrotliEncoderCompressWorkPool: undefined version: 
          /usr/bin/ld: BrotliEncoderCompressStreaming: undefined version: 
          /usr/bin/ld: BrotliEncoderCompressStream: undefined version: 
          /usr/bin/ld: BrotliEncoderCompressMulti: undefined version: 
          /usr/bin/ld: BrotliEncoderCompress: undefined version: 
          /usr/bin/ld: BroccoliNewBrotliFile: undefined version: 
          /usr/bin/ld: BroccoliDestroyInstance: undefined version: 
          /usr/bin/ld: BroccoliCreateInstanceWithWindowSize: undefined version: 
          /usr/bin/ld: BroccoliCreateInstance: undefined version: 
          /usr/bin/ld: BroccoliConcatStreaming: undefined version: 
          /usr/bin/ld: BroccoliConcatStream: undefined version: 
          /usr/bin/ld: BroccoliConcatFinished: undefined version: 
          /usr/bin/ld: BroccoliConcatFinish: undefined version: 
          /usr/bin/ld: failed to set dynamic section sizes: bad value
          collect2: error: ld returned 1 exit status     

It looks like the compiler can't find brotli headers, or something like that. However, importantly note that bumping Cargo lockfile did not change the versions of any of: cc (1.0.79) , pkg-config (0.3.27), zstd-sys (v2.0.8+zstd.1.5.5), or brotli-decompressor (2.3.4). I also tried including a line on Github Actions sudo apt install libbrotli-dev, but that did not fix it.

After some trial and error comparing the package delta between the two lockfiles, I narrowed it down to libc. And I confirmed that fixing libc to 0.2.144 fixes the build. See this build: https://github.com/kurtbuilds/oasgen/actions/runs/5501781013 and the associated commit: kurtbuilds/oasgen@b978be0

So the build works on 0.2.144, and is broken on 0.2.147. I confirmed that 0.2.146 also breaks the build, see: https://github.com/kurtbuilds/oasgen/actions/runs/5501841088

I noticed that 0.2.145 got yanked, so going out on a limb, I'm guessing that's the version that caused the regression, and the subsequent versions haven't fixed the issue. I couldn't find a description on the changelog for why the version was yanked.

Let me know if there's any additional information I can provide to help isolate and resolve the issue.

Also note, this package compiles locally with libc=0.2.147. It's on github actions (which I believe is x64 Ubuntu) where I encounter the issue.

@kurtbuilds kurtbuilds added the C-bug Category: bug label Jul 9, 2023
@JohnTitor
Copy link
Member

What's your target? You can check Git tags to bisect the cause.

@kurtbuilds
Copy link
Author

It appears this is actually a compiler regression, tracked in this issue: rust-lang/rust#111888

I was able to fix the issue by using lld instead of ld, as in this comment: rust-lang/rust#111888 (comment)

I'll close this, as it appears unrelated to libc. It seems effectively random that pinning to an older version of libc also fixed the issue.

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

No branches or pull requests

2 participants