jongwon
Joined
Activity
Posted in Setup MacOS 12 Monterey Discussion
issue with sqlite3 - couldn't solve it...
gem install sqlite3 -v '1.3.13'
->
Building native extensions. This could take a while...
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
current directory: /Users/jongwonlee/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/sqlite3-1.3.13/ext/sqlite3
/Users/jongwonlee/.rbenv/versions/3.0.1/bin/ruby -I /Users/jongwonlee/.rbenv/versions/3.0.1/lib/ruby/3.0.0 -r ./siteconf20220126-86864-nxrxo3.rb extconf.rb
checking for sqlite3.h... yes
checking for pthread_create() in -lpthread... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... yes
checking for rb_integer_pack()... yes
checking for sqlite3_initialize()... yes
checking for sqlite3_backup_init()... yes
checking for sqlite3_column_database_name()... yes
checking for sqlite3_enable_load_extension()... yes
checking for sqlite3_load_extension()... yes
checking for sqlite3_open_v2()... yes
checking for sqlite3_prepare_v2()... yes
checking for sqlite3_int64 in sqlite3.h... yes
checking for sqlite3_uint64 in sqlite3.h... yes
creating Makefile
current directory: /Users/jongwonlee/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/sqlite3-1.3.13/ext/sqlite3
make DESTDIR= clean
current directory: /Users/jongwonlee/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/sqlite3-1.3.13/ext/sqlite3
make DESTDIR=
compiling backup.c
compiling database.c
database.c:60:3: error: implicit declaration of function 'rb_check_safe_obj' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
rb_check_safe_obj(file);
^
database.c:60:3: note: did you mean 'rb_check_safe_str'?
/Users/jongwonlee/.rbenv/versions/3.0.1/include/ruby-3.0.0/ruby/internal/core/rstring.h:97:6: note: 'rb_check_safe_str' declared here
void rb_check_safe_str(VALUE);
^
database.c:201:18: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return INT2NUM((long)sqlite3_total_changes(ctx->db));
~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
database.c:242:67: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
VALUE result = rb_funcall(handle, rb_intern("call"), 1, INT2NUM((long)count));
~~~~~~~ ~~~~~~~~~~
database.c:552:18: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return INT2NUM((long)sqlite3_errcode(ctx->db));
~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings and 1 error generated.
make: *** [database.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/jongwonlee/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/sqlite3-1.3.13 for inspection.
Results logged to /Users/jongwonlee/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/extensions/x86_64-darwin-21/3.0.0/sqlite3-1.3.13/gem_make.out