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

extconf.rb: use Rbconfig::CONFIG instead of mkmf CONFIG #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mtasaka
Copy link

@mtasaka mtasaka commented Dec 1, 2022

In mkmf.rb CONFIG is defined as CONFIG is defined as RbConfig::MAKEFILE_CONFIG and RbConfig::MAKEFILE_CONFIG is almost same as RbConfig::CONFIG except that RbConfig::MAKEFILE_CONFIG uses reference for other variables.

Using CONFIG in extconf.rb causes error with ruby3.2 because now CONFIG['host_os'] uses reference for target_os variable, and extconf.rb expects that this variable is all expanded. So instead, use RbConfig::CONFIG .

Closes #30

In mkmf.rb CONFIG is defined as CONFIG is defined as RbConfig::MAKEFILE_CONFIG
and RbConfig::MAKEFILE_CONFIG is almost same as RbConfig::CONFIG
except that RbConfig::MAKEFILE_CONFIG uses reference for other variables.

Using CONFIG in extconf.rb causes error with ruby3.2 because now
CONFIG['host_os'] uses reference for target_os variable, and extconf.rb
expects that this variable is all expanded. So instead, use RbConfig::CONFIG .

Closes apalmblad#30
@64kramsystem
Copy link

64kramsystem commented May 2, 2023

I've released a gem that includes this PR, in order to allow Ruby 3.2 users to keep using this gem's functionality.

@jay4git
Copy link

jay4git commented Jan 9, 2024

Hello,
Can a fix be made available for "getting shadow.so: undefined symbol: rb_tainted_str_new2 with ruby-shadow-ruby32-2.5.1.gem.", please?
On Linux, using Ruby 3.2.2, getting shadow.so: undefined symbol: rb_tainted_str_new2 with ruby-shadow-ruby32-2.5.1.gem.

The following code in this gem uses rb_tainted_str_new2:
pwd/shadow.c:59: rb_tainted_str_new2(entry->pw_name), /* sp_namp /
pwd/shadow.c:60: rb_tainted_str_new2(entry->pw_passwd), / sp_pwdp, encryped password /
pwd/shadow.c:69: rb_tainted_str_new2(entry->pw_class), / sp_loginclass, user access class */
shadow/shadow.c:37: rb_tainted_str_new2(entry->sp_namp),
shadow/shadow.c:38: rb_tainted_str_new2(entry->sp_pwdp),

Created an issue for this: #34

Thanks.

maxlazio pushed a commit to gitlabhq/omnibus-gitlab that referenced this pull request Feb 7, 2024
This update picks apalmblad/ruby-shadow#31.
A custom branch `gitlab-stable` has been created in the ruby-shadow
mirror.

Changelog: fixed
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.

extconf.rb fails with ruby 3.2.0preview3 and onwards
3 participants