You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v7.0.7 (as supplied/installed by chef-workstation source code build steps)
Environment:
macOS 10.14.6, Ruby 2.6.5 (via rbenv)
While it does not appear to be an issue with chef-workstation, for the sake of completeness chef-workstation repo master branch and 0.17.5 tag behave the same.
Scenario:
Unable to build chef-workstation via omnibus. Possibly same issue discussed in omnibus-software #1040.
[NetFetcher: bzip2] I | 2020-03-12T19:07:43-05:00 | Extracting `./local/cache/bzip2-1.0.8.tar.gz' to `/Users/rhornsby/projects/work/esp/chef/chef-workstation/omnibus/local/src/bzip2'
[Builder: bzip2] I | 2020-03-12T19:07:43-05:00 | Starting build
[Builder: bzip2] I | 2020-03-12T19:07:43-05:00 | Environment:
[Builder: bzip2] I | 2020-03-12T19:07:43-05:00 | CFLAGS="-I/opt/chef-workstation/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC"
[Builder: bzip2] I | 2020-03-12T19:07:43-05:00 | CPPFLAGS="-I/opt/chef-workstation/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC"
[Builder: bzip2] I | 2020-03-12T19:07:43-05:00 | CXXFLAGS="-I/opt/chef-workstation/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC"
[Builder: bzip2] I | 2020-03-12T19:07:43-05:00 | LDFLAGS="-Wl,-rpath,/opt/chef-workstation/embedded/lib -L/opt/chef-workstation/embedded/lib"
[Builder: bzip2] I | 2020-03-12T19:07:43-05:00 | LD_RUN_PATH="/opt/chef-workstation/embedded/lib"
[Builder: bzip2] I | 2020-03-12T19:07:43-05:00 | OMNIBUS_INSTALL_DIR="/opt/chef-workstation"
[Builder: bzip2] I | 2020-03-12T19:07:43-05:00 | PATH=<truncated>
[Builder: bzip2] I | 2020-03-12T19:07:43-05:00 | PKG_CONFIG_PATH="/opt/chef-workstation/embedded/lib/pkgconfig"
[Builder: bzip2] I | 2020-03-12T19:07:43-05:00 | $ patch -p1 -i /Users/rhornsby/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/bundler/gems/omnibus-software-c086d8057ac9/config/patches/bzip2/makefile_take_env_vars.patch
[Builder: bzip2] I | 2020-03-12T19:07:43-05:00 | Apply patch `makefile_take_env_vars.patch': 0.0194s
[Builder: bzip2] I | 2020-03-12T19:07:43-05:00 | Build bzip2: 0.0199s
The following shell command exited with status 1:
$ CFLAGS=-I/opt/chef-workstation/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC CPPFLAGS=-I/opt/chef-workstation/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC CXXFLAGS=-I/opt/chef-workstation/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC LDFLAGS=-Wl,-rpath,/opt/chef-workstation/embedded/lib -L/opt/chef-workstation/embedded/lib LD_RUN_PATH=/opt/chef-workstation/embedded/lib OMNIBUS_INSTALL_DIR=/opt/chef-workstation PATH=<truncated> PKG_CONFIG_PATH=/opt/chef-workstation/embedded/lib/pkgconfig patch -p1 -i /Users/rhornsby/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/bundler/gems/omnibus-software-c086d8057ac9/config/patches/bzip2/makefile_take_env_vars.patch
Output:
patching file Makefile
Hunk #1 FAILED at 18.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.rej
patching file Makefile-libbz2_so
Error:
(nothing)
Follow the instructions therein, in omnibus/README.md
a. cd omnibus; bundle install --binstubs
b. sudo bin/omnibus build chef-workstation
Expected Result:
Should have omnibus build a chef-workstation package.
Actual Result:
From what I can see it looks like omnibus downloads a chef published tarball for bzip2 v1.0.8. Later, just prior to compiling bzip2, omnibus attempts to patch the two bzip Makefiles Makefile and Makefile-libbz2_so. The patch file itself, makefile_take_env_vars.patch says it was created from bzip2 1.0.6.
The build fails with error
Output:
patching file Makefile
Hunk #1 FAILED at 18.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.rej
patching file Makefile-libbz2_so
Error:
(nothing)
Contents of Makefile.rej:
$ cat local/src/bzip2/bzip2-1.0.8/Makefile.rej
***************
*** 18,27 ****
- CC=gcc
AR=ar
RANLIB=ranlib
- LDFLAGS=
- BIGFILES=-D_FILE_OFFSET_BITS=64
- CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
# Where you want it installed when you do 'make install'
PREFIX=/usr/local
--- 18,27 ----
+ CC?=gcc
AR=ar
RANLIB=ranlib
+ LDFLAGS+=
+ BIGFILES?=-D_FILE_OFFSET_BITS=64
+ CFLAGS+=-Wall -Winline -O2 -g $(BIGFILES)
# Where you want it installed when you do 'make install'
PREFIX=/usr/local
The text was updated successfully, but these errors were encountered:
I took a closer look at @erikng's proposed solution in #1040, and it looks like he gave patch more context to work with. Without omnibus, just the bzip2 1.0.8 source and the patch file, plus this minor change, I was able to get patch to run successfully:
The issue is with the very old version of patch preinstalled on macos (even through 10.15.5 at least, doubt they will ever update it). brew install gpatch and it works fine as-is.
Version:
v7.0.7 (as supplied/installed by chef-workstation source code build steps)
Environment:
macOS 10.14.6, Ruby 2.6.5 (via rbenv)
While it does not appear to be an issue with chef-workstation, for the sake of completeness chef-workstation repo
master
branch and0.17.5
tag behave the same.Scenario:
Unable to build chef-workstation via omnibus. Possibly same issue discussed in omnibus-software #1040.
Steps to Reproduce:
a.
cd omnibus; bundle install --binstubs
b.
sudo bin/omnibus build chef-workstation
Expected Result:
Should have omnibus build a chef-workstation package.
Actual Result:
From what I can see it looks like omnibus downloads a chef published tarball for bzip2 v1.0.8. Later, just prior to compiling bzip2, omnibus attempts to patch the two bzip Makefiles
Makefile
andMakefile-libbz2_so
. The patch file itself,makefile_take_env_vars.patch
says it was created from bzip2 1.0.6.The build fails with error
Contents of
Makefile.rej
:The text was updated successfully, but these errors were encountered: