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

brew tests fails wth Xcode 15.3 on Apple Silicon #16861

Closed
3 tasks done
fel1x-developer opened this issue Mar 9, 2024 · 3 comments · Fixed by #16868
Closed
3 tasks done

brew tests fails wth Xcode 15.3 on Apple Silicon #16861

fel1x-developer opened this issue Mar 9, 2024 · 3 comments · Fixed by #16868
Assignees
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age

Comments

@fel1x-developer
Copy link

brew doctor output

Your system is ready to brew.

Verification

  • My "brew doctor output" above says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update twice and am still able to reproduce my issue.
  • This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.

brew config output

HOMEBREW_VERSION: 4.2.11-103-gcd1f040
ORIGIN: https://github.com/Homebrew/brew
HEAD: cd1f0409493c77e7964cf03a0fb1e93d03a83772
Last commit: 6 hours ago
Core tap HEAD: 36f651b7c5ddf6dbe63d3335bb1035b0228c9f35
Core tap last commit: 36 minutes ago
Core tap JSON: 09 Mar 01:35 UTC
Core cask tap JSON: 09 Mar 01:35 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 8
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.1.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: octa-core 64-bit arm_blizzard_avalanche
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 14.4-arm64
CLT: 15.3.0.0.1.1708646388
Xcode: 15.3
Rosetta 2: false

What were you trying to do (and why)?

Running brew test on my mac.

What happened (include all command output)?

➜ brew tests
Fetching gem metadata from https://rubygems.org/.......
Installing hpricot 0.8.6 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/hpricot-0.8.6/ext/fast_xs
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby -I /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0 extconf.rb
checking for stdio.h... yes
creating Makefile

current directory: /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/hpricot-0.8.6/ext/fast_xs
make DESTDIR\= sitearchdir\=./.gem.20240308-64138-cc2lo sitelibdir\=./.gem.20240308-64138-cc2lo clean

current directory: /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/hpricot-0.8.6/ext/fast_xs
make DESTDIR\= sitearchdir\=./.gem.20240308-64138-cc2lo sitelibdir\=./.gem.20240308-64138-cc2lo
compiling fast_xs.c
fast_xs.c:165:39: error: incompatible function pointer types passing 'VALUE (VALUE)' (aka 'unsigned long (unsigned long)') to parameter of type 'VALUE (*)(VALUE,
VALUE)' (aka 'unsigned long (*)(unsigned long, unsigned long)') [-Wincompatible-function-pointer-types]
        array = rb_rescue(unpack_utf8, self, unpack_uchar, self);
                                             ^~~~~~~~~~~~
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/include/ruby-3.1.0/ruby/internal/iterator.h:364:62: note: passing argument to parameter 'r_proc' here
VALUE rb_rescue(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*r_proc)(VALUE, VALUE), VALUE data2);
                                                             ^
1 error generated.
make: *** [fast_xs.o] Error 1

make failed, exit code 2

Gem files will remain installed in /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/hpricot-0.8.6 for inspection.
Results logged to /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-20/3.1.0-static/hpricot-0.8.6/gem_make.out

  /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/rubygems/ext/builder.rb:102:in `run'
  /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/rubygems/ext/builder.rb:51:in `block in make'
  /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/rubygems/ext/builder.rb:43:in `each'
  /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/rubygems/ext/builder.rb:43:in `make'
  /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:42:in `build'
  /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/rubygems/ext/builder.rb:171:in `build_extension'
  /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/rubygems/ext/builder.rb:205:in `block in build_extensions'
  /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/rubygems/ext/builder.rb:202:in `each'
  /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/rubygems/ext/builder.rb:202:in `build_extensions'
  /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/rubygems/installer.rb:843:in `build_extensions'
  /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.18/lib/bundler/rubygems_gem_installer.rb:72:in `build_extensions'
  /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.18/lib/bundler/rubygems_gem_installer.rb:28:in `install'
  /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.18/lib/bundler/source/rubygems.rb:202:in `install'
  /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.18/lib/bundler/installer/gem_installer.rb:54:in `install'
  /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.18/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
  /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.18/lib/bundler/installer/parallel_installer.rb:156:in `do_install'
  /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.18/lib/bundler/installer/parallel_installer.rb:147:in `block in worker_pool'
  /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.18/lib/bundler/worker.rb:62:in `apply_func'
  /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.18/lib/bundler/worker.rb:57:in `block in process_queue'
  /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.18/lib/bundler/worker.rb:54:in `loop'
  /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.18/lib/bundler/worker.rb:54:in `process_queue'
  /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/bundler-2.4.18/lib/bundler/worker.rb:90:in `block (2 levels) in create_threads'

An error occurred while installing hpricot (0.8.6), and Bundler cannot continue.

In Gemfile:
  ronn was resolved to 0.7.3, which depends on
    hpricot
Error: failed to run `/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/bin/bundle install`!

What did you expect to happen?

brew tests should be successful and brew tests should be usuable for creating PRs.

Step-by-step reproduction instructions (by running brew commands)

`brew update`
`brew tests`
@fel1x-developer fel1x-developer added the bug Reproducible Homebrew/brew bug label Mar 9, 2024
@fel1x-developer
Copy link
Author

@fel1x-developer
Copy link
Author

I found out that this is clang's new error since clang 16. I have no idea why this is happening in Xcode 15.3's CLT. Maybe Apple merged some clang 16's code.

FreeBSD had the same problem about 10 months ago, and they solved by patching hpricot.
FreeBSD bug

1 	--- ext/fast_xs/fast_xs.c.orig	2023-05-04 17:51:30 UTC
2	+++ ext/fast_xs/fast_xs.c
3	@@ -144,7 +144,7 @@ static VALUE unpack_utf8(VALUE self)
4	 	return rb_funcall(self, unpack_id, 1, U_fmt);
5	 }
6	 
7	-static VALUE unpack_uchar(VALUE self)
8	+static VALUE unpack_uchar(VALUE self, VALUE exc)
9	 {
10	 	return rb_funcall(self, unpack_id, 1, C_fmt);
11	 }
1 	--- ext/hpricot_scan/hpricot_scan.c.orig	2023-05-04 18:05:46 UTC
2	+++ ext/hpricot_scan/hpricot_scan.c
3	@@ -22,7 +22,7 @@ struct hpricot_struct {
4	 #define RSTRING_PTR(str) RSTRING(str)->ptr
5	 #endif
6	 
7	-VALUE hpricot_css(VALUE, VALUE, VALUE, VALUE, VALUE);
8	+VALUE hpricot_css(VALUE, VALUE, VALUE, VALUE);
9	 
10	 #define NO_WAY_SERIOUSLY "*** This should not happen, please file a bug report with the HTML you're parsing at http://github.com/hpricot/hpricot/issues.  So sorry!"
11	 

@Bo98
Copy link
Member

Bo98 commented Mar 9, 2024

Thanks, I've been working the last couple days on ripping out these old dependencies entirely.

@Bo98 Bo98 self-assigned this Mar 9, 2024
@github-actions github-actions bot added the outdated PR was locked due to age label Apr 11, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age
Projects
None yet
2 participants