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

Cannot be installed in Ruby 3.4.1... #84

Open
adrianlmm opened this issue Jan 15, 2025 · 2 comments
Open

Cannot be installed in Ruby 3.4.1... #84

adrianlmm opened this issue Jan 15, 2025 · 2 comments

Comments

@adrianlmm
Copy link

Greetings, I'm trying to install it in Ruby 3.4.1 but I'm getting lots of errors, I have no problem with Ruby 3.3

D:\projects\ruby\fb_new\fb>gem install fb-0.9.3.gem
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing fb-0.9.3.gem:
ERROR: Failed to build gem native extension.

current directory: C:/Ruby34-x64/lib/ruby/gems/3.4.0/gems/fb-0.9.3

C:/Ruby34-x64/bin/ruby.exe extconf.rb
checking for -lfbclient... no
checking for -lgds... no
checking for -lfbclient_ms... yes
checking for isc_attach_database() in ibase.h... yes
creating Makefile

current directory: C:/Ruby34-x64/lib/ruby/gems/3.4.0/gems/fb-0.9.3
make DESTDIR= sitearchdir=./.gem.20250115-11224-yhpy64 sitelibdir=./.gem.20250115-11224-yhpy64 clean

current directory: C:/Ruby34-x64/lib/ruby/gems/3.4.0/gems/fb-0.9.3
make DESTDIR= sitearchdir=./.gem.20250115-11224-yhpy64 sitelibdir=./.gem.20250115-11224-yhpy64
generating fb-x64-mingw-ucrt.def
compiling fb.c
In file included from C:/Ruby34-x64/include/ruby-3.4.0/ruby/internal/assume.h:29,
from C:/Ruby34-x64/include/ruby-3.4.0/ruby/backward/2/assume.h:24,
from C:/Ruby34-x64/include/ruby-3.4.0/ruby/defines.h:72,
from C:/Ruby34-x64/include/ruby-3.4.0/ruby/ruby.h:25,
from C:/Ruby34-x64/include/ruby-3.4.0/ruby.h:38,
from fb.c:23:
fb.c: In function 'connection_transaction':
fb.c:973:38: warning: 'rb_data_object_get_warning' is deprecated: by TypedData [-Wdeprecated-declarations]
973 | Data_Get_Struct(self, struct FbConnection, fb_connection);
| ^~~~~~~~~~~~
C:/Ruby34-x64/include/ruby-3.4.0/ruby/internal/cast.h:31:29: note: in definition of macro 'RBIMPL_CAST'
31 | # define RBIMPL_CAST(expr) (expr)
| ^~~~
fb.c:973:9: note: in expansion of macro 'Data_Get_Struct'
973 | Data_Get_Struct(self, struct FbConnection, fb_connection);
| ^~~~~~~~~~~~~~~
In file included from C:/Ruby34-x64/include/ruby-3.4.0/ruby/internal/core.h:27,
from C:/Ruby34-x64/include/ruby-3.4.0/ruby/ruby.h:29:
C:/Ruby34-x64/include/ruby-3.4.0/ruby/internal/core/rdata.h:325:1: note: declared here
325 | rb_data_object_get_warning(VALUE obj)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
fb.c: In function 'connection_transaction_started':
fb.c:1000:38: warning: 'rb_data_object_get_warning' is deprecated: by TypedData [-Wdeprecated-declarations]
1000 | Data_Get_Struct(self, struct FbConnection, fb_connection);
...
fb.c: In function 'fb_cursor_fields_ary':
fb.c:1675:32: error: implicit declaration of function 'rb_tainted_str_new'; did you mean 'rb_utf8_str_new'? [-Wimplicit-function-declaration]
1675 | name = rb_tainted_str_new(var->aliasname, var->aliasname_length);
| ^~~~~~~~~~~~~~~~~~
fb.c: In function 'database_allocate_instance':
fb.c:2730:9: error: implicit declaration of function 'NEWOBJ' [-Wimplicit-function-declaration]
2730 | NEWOBJ(obj, struct RObject);

@golirev
Copy link
Contributor

golirev commented Jan 22, 2025

I've created a pull request to make it usable for Ruby 3.4 as well.

fb-0.9.3.gem is old, so please try compiling it from the latest pull request source and installing it.

@adrianlmm
Copy link
Author

Thanks, it worked. I had one problem though, after requiring the fb gem ('require fb') I got an error saying that it could not found the gem "bigdecimal" even having it installed, I had to copy the file "bigdecimal.rb" into the folder where the fb.c file is and it worked. This is in Windows 11.

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

No branches or pull requests

2 participants