Deprecated: Function get_magic_quotes_gpc() is deprecated in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 99

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 619

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1169

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176
8000 Gemfile: depend on fiddle to avoid a Ruby warning by olleolleolle · Pull Request #1119 · ffi/ffi · GitHub
Nothing Special   »   [go: up one dir, main page]

Skip to content

Conversation

olleolleolle
Copy link
Contributor
@olleolleolle olleolleolle commented Sep 16, 2024

...since it will not be shipped with Ruby after Ruby 3.5.0.

Details

I could see that this was a test-only dependency, so I added it to the "development" group of gems in the Gemfile.

https://github.com/search?q=repo%3Affi%2Fffi%20fiddle&type=code shows only hits in the spec directory.

@larskanis
Copy link
Member

This fails on various CI jobs, not caused by our code. But it's only a development dependency, so I would say we let the Gemfile unchanged for now and keep the PR open. By retriggering the CI run we can check from time to time, if the situation has changed.

...since it will not be shipped with Ruby after Ruby 3.5.0.

For now, JRuby & TruffleRuby fail on this, so we use a platforms directive.
ffi#1119 (review)
@olleolleolle olleolleolle force-pushed the fiddle-no-longer-ruby-350-shipped branch from 82c5e12 to 4aac33b Compare September 16, 2024 10:59
@eregon
Copy link
Collaborator
eregon commented Sep 16, 2024

For the remaining failures it might be enough to install the libffi headers

@olleolleolle olleolleolle force-pushed the fiddle-no-longer-ruby-350-shipped branch from 25bc351 to 8a994d4 Compare September 16, 2024 13:37
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

RUN yum install -y ruby-devel git gcc make redhat-rpm-config
RUN yum --enablerepo=powertools install -y libffi-devel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Judging by:

#10 1.669  libffi-devel         x86_64         3.1-22.el8            baseos          29 k

The guess was not correct. IOW the package is available in baseos repo which is always enabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, I'll retry with the package in the regular list instead, then, the one on the line previous.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, I'll retry with the package in the regular list instead

Yep, that should work

@olleolleolle
Copy link
Contributor Author

After adding a libraries to the spec/env/Dockerfile.* files, these are the remaining issues.

CI / specs (macos-13, 3.3)

Fails in bundle install, on building bigdecimal: You have to install development tools first.

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/runner/hostedtoolcache/Ruby/3.3.5/x64/lib/ruby/gems/3.3.0/gems/bigdecimal-3.1.8/ext/bigdecimal
/Users/runner/hostedtoolcache/Ruby/3.3.5/x64/bin/ruby extconf.rb
checking for __builtin_clz()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include=${opt-dir}/include
	--without-opt-include
	--with-opt-lib=${opt-dir}/lib
	--without-opt-lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/Users/runner/hostedtoolcache/Ruby/3.3.5/x64/bin/$(RUBY_BASE_NAME)
/Users/runner/hostedtoolcache/Ruby/3.3.5/x64/lib/ruby/3.3.0/mkmf.rb:480:in
`try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.

CI / specs (windows-latest, 2.5)

Can bundle install.

Installing fiddle 1.1.2 with native extensions

A warning from the installation provides us with a version number and a clue:

Your RubyGems version (2.7.6.3) has a bug that prevents required_ruby_version from working for Bundler. Any scripts that use gem install bundler will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by running gem update --system 3.2.3

Fails in a test, which perhaps means that an earlier fiddle (built-in to Ruby 2.5) has been activated? (Compare to error message below.)


An error occurred while loading ./spec/ffi/callback_spec.rb.
Failure/Error: require 'fiddle'

NameError:
  uninitialized constant Fiddle::Types
  Did you mean?  Fiddle::TYPE_INT
# ./spec/ffi/callback_spec.rb:852:in `require'
# ./spec/ffi/callback_spec.rb:852:in `block in <module:CallbackInteropSpecs>'
# ./spec/ffi/callback_spec.rb:851:in `<module:CallbackInteropSpecs>'
# ./spec/ffi/callback_spec.rb:850:in `<top (required)>'
Run options: exclude {:ractor=>true, :gc_dependent=>true}

continuous-integration/appveyor/pr — AppVeyor build failed

This failed on Ruby 2.5 worked on Ruby 3.1.

Ruby 2.5 says

C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/runtime.rb:308:in `check_for_activated_spec!': You have already activated fiddle 1.0.0, but your Gemfile requires fiddle 1.1.2. Since fiddle is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports fiddle as a default gem. (Gem::LoadError)

bundle exec rake libffi compile -- %EXTCONFOPTS% || bundle exec rake compile -- %EXTCONFOPTS%
C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/runtime.rb:308:in `check_for_activated_spec!': You have already activated fiddle 1.0.0, but your Gemfile requires fiddle 1.1.2. Since fiddle is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports fiddle as a default gem. (Gem::LoadError)
	from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/runtime.rb:25:in `block in setup'
	from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/spec_set.rb:155:in `each'
	from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/spec_set.rb:155:in `each'
	from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/runtime.rb:24:in `map'
	from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/runtime.rb:24:in `setup'
	from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler.rb:161:in `setup'
	from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/setup.rb:20:in `block in <top (required)>'
	from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/ui/shell.rb:136:in `with_level'
	from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/ui/shell.rb:88:in `silence'
	from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/setup.rb:20:in `<top (required)>'
	from C:/Ruby25/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:85:in `require'
	from C:/Ruby25/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:85:in `require'
C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/runtime.rb:308:in `check_for_activated_spec!': You have already activated fiddle 1.0.0, but your Gemfile requires fiddle 1.1.2. Since fiddle is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports fiddle as a default gem. (Gem::LoadError)
	from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/runtime.rb:25:in `block in setup'
	from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/spec_set.rb:155:in `each'
	from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/spec_set.rb:155:in `each'
	from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/runtime.rb:24:in `map'
	from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/runtime.rb:24:in `setup'
	from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler.rb:161:in `setup'
	from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/setup.rb:20:in `block in <top (required)>'
	from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/ui/shell.rb:136:in `with_level'
	from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/ui/shell.rb:88:in `silence'
	from C:/Ruby25/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/setup.rb:20:in `<top (required)>'
	from C:/Ruby25/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:85:in `require'
	from C:/Ruby25/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:85:in `require'
Command exited with code 1

stanhu pushed a commit to stanhu/ffi that referenced this pull request Apr 10, 2025
...since it will not be shipped with Ruby after Ruby 3.5.0.

For now, JRuby & TruffleRuby fail on this, so we use a platforms directive.
ffi#1119 (review)
stanhu pushed a commit to stanhu/ffi that referenced this pull request Apr 10, 2025
...since it will not be shipped with Ruby after Ruby 3.5.0.

For now, JRuby & TruffleRuby fail on this, so we use a platforms directive.
ffi#1119 (review)
@larskanis larskanis merged commit 49a1459 into ffi:master Apr 14, 2025
86 of 89 checks passed
@olleolleolle olleolleolle deleted the fiddle-no-longer-ruby-350-shipped branch April 14, 2025 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0