Open gavindidrichsen opened 4 years ago
Some brain droppings ...
The current stable build of sentinel (core/sentinel/0.1.0/20191203162923
) was built with rugged gem version 0.28.3.1 (the latest version of the gem on the build date December 3, 2019).
The changes in rugged from version 0.28.3.1 to 0.28.4.1 were an update to the version of the libgit2
library vendored within the gem. During the build, the error appears in checking for libgit2
:
checking for -lgit2... *** extconf.rb failed ***
The issue here is a bug in cmake: https://gitlab.kitware.com/cmake/cmake/-/issues/20065
The mkfm.log file shows the underlying error:
"gcc -o conftest -I/hab/pkgs/core/ruby/2.5.7/20200404130135/include/ruby-2.5.0/x86_64-linux -I/hab/pkgs/core/ruby/2.5.7/20200404130135/include/ruby-2.5.0/ruby/backward -I/hab/pkgs/core/ruby/2.5.7/20200404130135/include/ruby-2.5.0 -I. -I/hab/pkgs/ssd/sentinel/0.1.0/20200506100758/bundle/ruby/2.5.0/gems/rugged-1.0.0/ext/rugged/../../vendor/libgit2/include -I/hab/pkgs/core/make/4.2.1/20200306002515/include -I/hab/pkgs/core/gcc/9.1.0/20200305180723/include -I/hab/pkgs/core/glibc/2.29/20200305172459/include -I/hab/pkgs/core/ncurses/6.1/20200305230210/include -I/hab/pkgs/core/zlib/1.2.11/20200305174519/include -I/hab/pkgs/core/openssl/1.0.2t/20200306005450/include -I/hab/pkgs/core/libyaml/0.1.7/20200404040327/include -I/hab/pkgs/core/libffi/3.2.1/20200310021445/lib/libffi-3.2.1/include -I/hab/pkgs/core/readline/8.0/20200305232850/include -I/hab/pkgs/core/make/4.2.1/20200306002515/include -I/hab/pkgs/core/gcc/9.1.0/20200305180723/include -I/hab/pkgs/core/glibc/2.29/20200305172459/include -I/hab/pkgs/core/ncurses/6.1/20200305230210/include -I/hab/pkgs/core/zlib/1.2.11/20200305174519/include -I/hab/pkgs/core/openssl/1.0.2t/20200306005450/include -I/hab/pkgs/core/libyaml/0.1.7/20200404040327/include -I/hab/pkgs/core/libffi/3.2.1/20200310021445/lib/libffi-3.2.1/include -I/hab/pkgs/core/readline/8.0/20200305232850/include -O3 -g -pipe -fPIC -I/hab/pkgs/core/make/4.2.1/20200306002515/include -I/hab/pkgs/core/cmake/3.16.0/20200319204733/include -I/hab/pkgs/core/gcc/9.1.0/20200305180723/include -I/hab/pkgs/core/ruby/2.5.7/20200404130135/include -I/hab/pkgs/core/openssl/1.0.2t/20200306005450/include -I/hab/pkgs/core/glibc/2.29/20200305172459/include -g -Wall -Wno-comment conftest.c -L/hab/pkgs/ssd/sentinel/0.1.0/20200506100758/bundle/ruby/2.5.0/gems/rugged-1.0.0/ext/rugged/../../vendor/libgit2/build -Wl,-rpath,/hab/pkgs/ssd/sentinel/0.1.0/20200506100758/bundle/ruby/2.5.0/gems/rugged-1.0.0/ext/rugged/../../vendor/libgit2/build -L. -L/hab/pkgs/core/ruby/2.5.7/20200404130135/lib -Wl,-rpath,/hab/pkgs/core/ruby/2.5.7/20200404130135/lib -L. -L/hab/pkgs/core/gcc/9.1.0/20200305180723/lib -L/hab/pkgs/core/glibc/2.29/20200305172459/lib -L/hab/pkgs/core/ncurses/6.1/20200305230210/lib -L/hab/pkgs/core/zlib/1.2.11/20200305174519/lib -L/hab/pkgs/core/openssl/1.0.2t/20200306005450/lib -L/hab/pkgs/core/libyaml/0.1.7/20200404040327/lib -L/hab/pkgs/core/libffi/3.2.1/20200310021445/lib -L/hab/pkgs/core/readline/8.0/20200305232850/lib -L/hab/pkgs/core/nss-myhostname/0.3/20200403172913/lib -fstack-protector -rdynamic -Wl,-export-dynamic -L/usr/local/lib64 -L/hab/pkgs/core/openssl/1.0.2t/20200306005450/lib -lgit2 -lrt pthread -lssl -ldl -lcrypto -ldl -Wl,-rpath,/hab/pkgs/core/ruby/2.5.7/20200404130135/lib -L/hab/pkgs/core/ruby/2.5.7/20200404130135/lib -lruby -lpthread -ldl -lcrypt -lm -lc"
gcc.real: error: pthread: No such file or directory
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
Here, it can't find the file pthread, because instead of generating the correct argument of -lpthread
cmake generated pthread
.
We can either update cmake in core plans or pin to an older version here.
The new cmake in core-plans fix the build issue:
sentinel: hab-plan-build cleanup
sentinel:
sentinel: Source Path: /hab/cache/src/sentinel-0.1.0
sentinel: Installed Path: /hab/pkgs/ssd/sentinel/0.1.0/20200511163537
sentinel: Artifact: /src/results/ssd-sentinel-0.1.0-20200511163537-x86_64-linux.hart
sentinel: Build Report: /src/results/last_build.env
sentinel: SHA256 Checksum: 81ad57ac07343897d2dee14295868607adb69c945b63cd8e37a698e4bc404885
sentinel: Blake2b Checksum: 10e0049a01945318566321b4ac275291bb6f4b67f55e535403b9f507ffb50b31
sentinel:
sentinel: I love it when a plan.sh comes together.
sentinel:
sentinel: Build time: 4m7s
But, now we have an even more fun runtime issue:
sentinel.default(SV): Starting service as user=hab, group=hab
sentinel.default(O): /hab/pkgs/core/ruby/2.5.7/20200404130135/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- toml (LoadError)
sentinel.default(O): from /hab/pkgs/core/ruby/2.5.7/20200404130135/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
sentinel.default(O): from /hab/pkgs/ssd/sentinel/0.1.0/20200511163537/bundle/ruby/2.5.0/bundler/gems/..-bbb9a53b7b1a/lib/sentinel.rb:6:in `<top (required)>'
sentinel.default(O): from /hab/pkgs/core/ruby/2.5.7/20200404130135/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
sentinel.default(O): from /hab/pkgs/core/ruby/2.5.7/20200404130135/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
sentinel.default(O): from /hab/pkgs/ssd/sentinel/0.1.0/20200511163537/bundle/ruby/2.5.0/bundler/gems/..-bbb9a53b7b1a/exe/sentinels:3:in `<top (required)>'
sentinel.default(O): from /hab/pkgs/ssd/sentinel/0.1.0/20200511163537/bin/sentinels:14:in `load'
sentinel.default(O): from /hab/pkgs/ssd/sentinel/0.1.0/20200511163537/bin/sentinels:14:in `<main>'
hab-launch(SV): Child for service 'sentinel.default' with PID 14833 exited with code exit code: 1
Based on this:
I'm gonna leave this for now.
core/sentinel is failing to build with the following: