chef-boneyard / build-essential

Development repository for build-essential Chef Cookbook
https://supermarket.chef.io/cookbooks/build-essential
Apache License 2.0
116 stars 181 forks source link

issue with gcc version while using this cookbook #130

Closed krankate closed 7 years ago

krankate commented 7 years ago

Cookbook version

[8.0.3]

Chef-client version

[12.21.3]

Platform Details

[aws,]

Scenario:

Have a dependency on this cookbook from my custom cookbook

Steps to Reproduce:

[Run jenkins job]

Expected Result:

[need to pass the below issue]

Using Below

Using apt (6.1.3) Using build-essential (8.0.3) Using aws (7.1.2) Using homebrew (4.2.0) Using mingw (2.0.1) Using rvm (0.9.99) Using windows (3.1.1) Using yum (3.13.0) Using chef_gem (0.1.0) Using java (1.50.0) Using ohai (5.1.0) Using seven_zip (2.0.2)

Actual Result:

ERROR: build_essential[install_packages] (build-essential::default line 22) had an error: Chef::Exceptions::Exec: yum_package[autoconf, bison, flex, gcc, gcc-c++, gettext, kernel-devel, make, m4, ncurses-devel, patch] (/tmp/kitchen/cache/cookbooks/build-essential/resources/build_essential.rb line 30) had an error: Chef::Exceptions::Exec: yum -d0 -e0 -y install autoconf-2.69-11.9.amzn1 bison-2.7-4.11.amzn1 flex-2.5.37-3.13.amzn1 gcc-4.8.3-3.20.amzn1 gcc-c++-4.8.3-3.20.amzn1 gettext-0.18.1.1-9.1.11.amzn1 kernel-devel-4.4.35-33.55.amzn1 m4-1.4.16-9.10.amzn1 ncurses-devel-5.7-3.20090208.13.amzn1 patch-2.7.1-8.9.amzn1 returned 1: STDOUT: You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest

   STDERR: Error: Package: glibc-devel-2.17-106.167.amzn1.x86_64 (amzn-main)
       Requires: glibc(x86-64) = 2.17-106.167.amzn1
       Installed: glibc-2.17-157.170.amzn1.x86_64 (@amzn-updates/latest)
           glibc(x86-64) = 2.17-157.170.amzn1
       Available: glibc-2.17-106.167.amzn1.x86_64 (amzn-main)
           glibc(x86-64) = 2.17-106.167.amzn1
tas50 commented 7 years ago

It looks like you might have an Amazon Linux install that's in a bad state. What happens if you install glibc-devel from the command line?

krankate commented 7 years ago

@tas50 Same error from command line as well

ec2-user]# yum -d0 -e0 -y install autoconf-2.69-11.9.amzn1 bison-2.7-4.11.amzn1 flex-2.5.37-3.13.amzn1 gcc-4.8.3-3.20.amzn1 gcc-c++-4.8.3-3.20.amzn1 gettext-0.18.1.1-9.1.11.amzn1 kernel-devel-4.4.35-33.55.amzn1 m4-1.4.16-9.10.amzn1 ncurses-devel-5.7-3.20090208.13.amzn1 patch-2.7.1-8.9.amzn1 Error: Package: glibc-devel-2.17-106.167.amzn1.x86_64 (amzn-main) Requires: glibc(x86-64) = 2.17-106.167.amzn1 Installed: glibc-2.17-157.170.amzn1.x86_64 (@amzn-updates/latest) glibc(x86-64) = 2.17-157.170.amzn1 Available: glibc-2.17-106.167.amzn1.x86_64 (amzn-main) glibc(x86-64) = 2.17-106.167.amzn1 Error: Package: glibc-headers-2.17-106.167.amzn1.x86_64 (amzn-main) Requires: glibc(x86-64) = 2.17-106.167.amzn1 Installed: glibc-2.17-157.170.amzn1.x86_64 (@amzn-updates/latest) glibc(x86-64) = 2.17-157.170.amzn1 Available: glibc-2.17-106.167.amzn1.x86_64 (amzn-main) glibc(x86-64) = 2.17-106.167.amzn1 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest

krankate commented 7 years ago

@tas50 Same thing and its a brand new server

yum -y install glibc-headers-2.17-106.167.amzn1.x86_64 Loaded plugins: priorities, update-motd, upgrade-helper Resolving Dependencies --> Running transaction check ---> Package glibc-headers.x86_64 0:2.17-106.167.amzn1 will be installed --> Processing Dependency: glibc(x86-64) = 2.17-106.167.amzn1 for package: glibc-headers-2.17-106.167.amzn1.x86_64 --> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-106.167.amzn1.x86_64 --> Processing Dependency: kernel-headers for package: glibc-headers-2.17-106.167.amzn1.x86_64 --> Running transaction check ---> Package glibc-headers.x86_64 0:2.17-106.167.amzn1 will be installed --> Processing Dependency: glibc(x86-64) = 2.17-106.167.amzn1 for package: glibc-headers-2.17-106.167.amzn1.x86_64 ---> Package kernel-headers.x86_64 0:4.1.39-27.28.amzn1 will be installed --> Finished Dependency Resolution Error: Package: glibc-headers-2.17-106.167.amzn1.x86_64 (amzn-updates) Requires: glibc(x86-64) = 2.17-106.167.amzn1 Installed: glibc-2.17-157.170.amzn1.x86_64 (@amzn-updates/latest) glibc(x86-64) = 2.17-157.170.amzn1 Available: glibc-2.17-78.161.amzn1.x86_64 (amzn-main) glibc(x86-64) = 2.17-78.161.amzn1 Available: glibc-2.17-106.163.amzn1.x86_64 (amzn-updates) glibc(x86-64) = 2.17-106.163.amzn1 Available: glibc-2.17-106.166.amzn1.x86_64 (amzn-updates) glibc(x86-64) = 2.17-106.166.amzn1 Available: glibc-2.17-106.167.amzn1.x86_64 (amzn-updates) glibc(x86-64) = 2.17-106.167.amzn1 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest

krankate commented 7 years ago

@tas50 Any thoughts ?

krankate commented 7 years ago

@tas50 @raskchanky @seth @adamhjk @btm This two packages mentioned in this cookbook gcc-4.8.3-3.20.amzn1 and gcc-c++-4.8.3-3.20.amzn1 are having dependency on glibc(x86-64) = 2.17-106.167.amzn1 but the latest package which is installed as part of kernel dependency is glibc-2.17-157.170.amzn1.x86_64 ()

Any idea how to resolve this?