aws / aws-codebuild-docker-images

Official AWS CodeBuild repository for managed Docker images http://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref.html
Other
1.11k stars 973 forks source link

Can't locate FindBin.pm in @INC when building Rust #663

Closed fatbasstard closed 1 year ago

fatbasstard commented 1 year ago

Describe the bug After updating from amazonlinux2-x86_64-standard:4.0 to amazonlinux2-x86_64-standard:5.0 we hit the following.

When building a Rust binary containing openssl-sys, the following error is thown:

 running cd "/codebuild/output/src1963297434/src/target/release/build/openssl-sys-158d29b62b82fe61/out/openssl-build/build/src" && AR="ar" ARFLAGS="" CC="cc" RANLIB="ranlib" RANLIBFLAGS="" "perl" "./Configure" "--prefix=/codebuild/output/src1963297434/src/target/release/build/openssl-sys-158d29b62b82fe61/out/openssl-build/install" "--openssldir=/usr/local/ssl" "no-dso" "no-shared" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "linux-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64"

--- stderr
  Can't locate FindBin.pm in @INC (you may need to install the FindBin module) (@INC contains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at ./Configure line 15.
  BEGIN failed--compilation aborted at ./Configure line 15.
  thread 'main' panicked at ' 

      ', /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-src-111.25.1+1.1.1t/src/lib.rs:509:13
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

Expected behavior A clear and concise description of what you expected to happen.

Additional context

fatbasstard commented 1 year ago

Update:

So something in the image changed, that's ok. Actually my case was fixably with installing perl-FindBin (as suggested in https://github.com/openssl/openssl/issues/13761)

Did in in the buildspec:

version: 0.2

phases:
  install:
    commands:
      - yum install -y perl-FindBin

Even if not considered a bug (which is understandable) added this here in case somebody else runs into it...

fatbasstard commented 1 year ago

Closing the issue myself since it's not a "real" issue....