Skip to content
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

Nightly build broken #318

Closed
Tracked by #316
straight-shoota opened this issue Jun 28, 2024 · 5 comments · Fixed by #320
Closed
Tracked by #316

Nightly build broken #318

straight-shoota opened this issue Jun 28, 2024 · 5 comments · Fixed by #320
Labels

Comments

@straight-shoota
Copy link
Member

The dist_darwin job on the current nightly build has failed: https://app.circleci.com/pipelines/github/crystal-lang/crystal/15319/workflows/75d431a6-1174-4f22-94c2-e7d9d43e02e3/jobs/84166

ossl_pkey_rsa.c:942:5: error: use of undeclared identifier 'RSA_SSLV23_PADDING'
    DefRSAConst(SSLV23_PADDING);
    ^
ossl_pkey_rsa.c:877:58: note: expanded from macro 'DefRSAConst'
#define DefRSAConst(x) rb_define_const(cRSA, #x, INT2NUM(RSA_##x))
                                                         ^
<scratch space>:228:1: note: expanded from here
RSA_SSLV23_PADDING
^
115 warnings and 1 error generated.
make[2]: *** [ossl_pkey_rsa.o] Error 1
make[1]: *** [ext/openssl/all] Error 2
make: *** [build-ext] Error 2
!!! Compiling ruby 2.7.3 failed!
@ysbaddaden
Copy link

ysbaddaden commented Jun 28, 2024

It seems homebrew installs openssl@3 by default which is only supported starting from ruby-3.1.0. ruby-install had a patch to select the correct version, but maybe it got removed since ruby 2.7 and 3.0 are EOL.

We must either upgrade to Ruby 3.1+ or install [email protected] and use it:

$ brew install [email protected]
$ ruby-install ruby-2.7.5 -- --with-openssl-dir=$(brew --prefix [email protected])

References:

@straight-shoota
Copy link
Member Author

straight-shoota commented Jun 29, 2024

After updating to install ruby@3 (ref #263) directly from homebrew, now ffi-yajl fails building:

linking shared-object ffi_yajl/ext/encoder.bundle
Undefined symbols for architecture arm64:
  "_yajl_gen_alloc", referenced from:
      _mEncoder_do_yajl_encode in encoder.o
  "_yajl_gen_array_close", referenced from:
      _gen_array_close in encoder.o
  "_yajl_gen_array_open", referenced from:
      _gen_array_open in encoder.o
  "_yajl_gen_bool", referenced from:
      _gen_true in encoder.o
      _gen_false in encoder.o
  "_yajl_gen_config", referenced from:
      _mEncoder_do_yajl_encode in encoder.o
  "_yajl_gen_free", referenced from:
      _mEncoder_do_yajl_encode in encoder.o
  "_yajl_gen_get_buf", referenced from:
      _mEncoder_do_yajl_encode in encoder.o
  "_yajl_gen_map_close", referenced from:
      _gen_map_close in encoder.o
  "_yajl_gen_map_open", referenced from:
      _gen_map_open in encoder.o
  "_yajl_gen_null", referenced from:
      _gen_null in encoder.o
  "_yajl_gen_number", referenced from:
      _gen_number in encoder.o
  "_yajl_gen_string", referenced from:
      _gen_cstring in encoder.o
ld: symbol(s) not found for architecture arm64

Explicitly installing libffi doesn't help.

https://app.circleci.com/pipelines/github/crystal-lang/crystal/15323/workflows/a939fdc2-376b-42ed-86f8-50c139f4afdb/jobs/84210

@ysbaddaden
Copy link

ysbaddaden commented Jun 29, 2024

Should be fixed in ffi-yajl v2.6.0:
chef/ffi-yajl#115

I tried reproducing in a ruby:3.2-alpine image, but to no avail (same in alpine:edge with ruby 3.3). It looks like a macOS only bug.

@straight-shoota
Copy link
Member Author

straight-shoota commented Jul 1, 2024

Fixing ffi-yajl to >= 2.6 makes the gem installation succeed.
But now there's a download error:
https://app.circleci.com/pipelines/github/crystal-lang/crystal/15331/workflows/98893216-21db-44ff-ab3d-8ede53dde3bf/jobs/84258

           [Software: llvm_bin] I | 2024-07-01T07:29:54+00:00 | Resolving manifest entry for llvm_bin
   [NetFetcher: llvm_bin] I | 2024-07-01T07:29:54+00:00 | Downloading from `http://crystal-lang.s3.amazonaws.com/llvm/llvm-15.0.7-3-darwin-arm64.tar.gz'
...
   [NetFetcher: llvm_bin] E | 2024-07-01T07:29:54+00:00 | Download failed - OpenURI::HTTPError!
#<Thread:0x000000010869ea70 /Users/distiller/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/bundler/gems/omnibus-1d97cd9e79a0/lib/omnibus/thread_pool.rb:55 run> terminated with exception (report_on_exception is true):
/Users/distiller/.rbenv/versions/3.2.2/lib/ruby/3.2.0/open-uri.rb:369:in `open_http': 403 Forbidden (OpenURI::HTTPError)

@straight-shoota
Copy link
Member Author

I suppose we probably don't have an aarch64 build of llvm available.

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

Successfully merging a pull request may close this issue.

2 participants