Related
Trying to install and build native gem charlock_holmes version 0.7,3 with bundle install and getting an error. I believe I have all the dependencies but cannot figure out the error messages. Any help is appreciated.
I'm using Archlinux, ruby 3.0.0p0 and rubygems 3.2.3.
Stackoverflow is forcing me to add more stuff since it says "your post is mostly code", but there isn't much more to say about it... ¯_(ツ)_/¯
current directory: /home/kemel/.rvm/gems/ruby-3.0.0/gems/charlock_holmes-0.7.3/ext/charlock_holmes
/home/kemel/.rvm/rubies/ruby-3.0.0/bin/ruby -I /home/kemel/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0 -r ./siteconf20221027-431256-wyip6m.rb extconf.rb
checking for -licui18n... yes
checking for -licui18n... yes
checking for unicode/ucnv.h... yes
checking for -lz... yes
checking for -licuuc... yes
checking for -licudata... yes
creating Makefile
current directory: /home/kemel/.rvm/gems/ruby-3.0.0/gems/charlock_holmes-0.7.3/ext/charlock_holmes
make "DESTDIR=" clean
current directory: /home/kemel/.rvm/gems/ruby-3.0.0/gems/charlock_holmes-0.7.3/ext/charlock_holmes
make "DESTDIR="
compiling converter.c
In file included from converter.c:2:
common.h:32:14: warning: ‘charlock_new_str2’ defined but not used [-Wunused-function]
32 | static VALUE charlock_new_str2(const char *str)
| ^~~~~~~~~~~~~~~~~
common.h:23:14: warning: ‘charlock_new_str’ defined but not used [-Wunused-function]
23 | static VALUE charlock_new_str(const char *str, size_t len)
| ^~~~~~~~~~~~~~~~
cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics
compiling encoding_detector.c
In file included from encoding_detector.c:2:
common.h:14:14: warning: ‘charlock_new_enc_str’ defined but not used [-Wunused-function]
14 | static VALUE charlock_new_enc_str(const char *str, size_t len, void *encoding)
| ^~~~~~~~~~~~~~~~~~~~
cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics
compiling ext.c
In file included from ext.c:1:
common.h:32:14: warning: ‘charlock_new_str2’ defined but not used [-Wunused-function]
32 | static VALUE charlock_new_str2(const char *str)
| ^~~~~~~~~~~~~~~~~
common.h:23:14: warning: ‘charlock_new_str’ defined but not used [-Wunused-function]
23 | static VALUE charlock_new_str(const char *str, size_t len)
| ^~~~~~~~~~~~~~~~
common.h:14:14: warning: ‘charlock_new_enc_str’ defined but not used [-Wunused-function]
14 | static VALUE charlock_new_enc_str(const char *str, size_t len, void *encoding)
| ^~~~~~~~~~~~~~~~~~~~
cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics
compiling transliterator.cpp
transliterator.cpp: In function ‘VALUE rb_transliterator_id_list(VALUE)’:
transliterator.cpp:39:3: error: ‘StringEnumeration’ was not declared in this scope; did you mean ‘icu_71::StringEnumeration’?
39 | StringEnumeration *id_list;
| ^~~~~~~~~~~~~~~~~
| icu_71::StringEnumeration
In file included from /usr/include/unicode/translit.h:30,
from transliterator.cpp:5:
/usr/include/unicode/strenum.h:61:20: note: ‘icu_71::StringEnumeration’ declared here
61 | class U_COMMON_API StringEnumeration : public UObject {
| ^~~~~~~~~~~~~~~~~
transliterator.cpp:39:22: error: ‘id_list’ was not declared in this scope; did you mean ‘va_list’?
39 | StringEnumeration *id_list;
| ^~~~~~~
| va_list
transliterator.cpp:47:13: error: ‘Transliterator’ has not been declared
47 | id_list = Transliterator::getAvailableIDs(status);
| ^~~~~~~~~~~~~~
transliterator.cpp:73:10: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
73 | delete id_list;
| ^~~~~~~
transliterator.cpp: In function ‘VALUE rb_transliterator_transliterate(VALUE, VALUE, VALUE)’:
transliterator.cpp:81:3: error: ‘Transliterator’ was not declared in this scope; did you mean ‘icu_71::Transliterator’?
81 | Transliterator *trans;
| ^~~~~~~~~~~~~~
| icu_71::Transliterator
/usr/include/unicode/translit.h:490:18: note: ‘icu_71::Transliterator’ declared here
490 | class U_I18N_API Transliterator : public UObject {
| ^~~~~~~~~~~~~~
transliterator.cpp:81:19: error: ‘trans’ was not declared in this scope
81 | Transliterator *trans;
| ^~~~~
transliterator.cpp:86:3: error: ‘UnicodeString’ was not declared in this scope; did you mean ‘icu_71::UnicodeString’?
86 | UnicodeString *u_txt;
| ^~~~~~~~~~~~~
| icu_71::UnicodeString
In file included from /usr/include/unicode/translit.h:27:
/usr/include/unicode/unistr.h:295:20: note: ‘icu_71::UnicodeString’ declared here
295 | class U_COMMON_API UnicodeString : public Replaceable
| ^~~~~~~~~~~~~
transliterator.cpp:86:18: error: ‘u_txt’ was not declared in this scope; did you mean ‘txt’?
86 | UnicodeString *u_txt;
| ^~~~~
| txt
transliterator.cpp:101:11: error: ‘Transliterator’ is not a class, namespace, or enumeration
101 | trans = Transliterator::createInstance(UnicodeString(id, id_len), UTRANS_FORWARD, p_error, status);
| ^~~~~~~~~~~~~~
transliterator.cpp:106:15: error: expected type-specifier before ‘UnicodeString’
106 | u_txt = new UnicodeString(txt, txt_len);
| ^~~~~~~~~~~~~
transliterator.cpp:108:3: error: ‘StringByteSink’ was not declared in this scope; did you mean ‘icu_71::StringByteSink’?
108 | StringByteSink<std::string> sink(&result);
| ^~~~~~~~~~~~~~
| icu_71::StringByteSink
In file included from /usr/include/unicode/unistr.h:40:
/usr/include/unicode/bytestream.h:267:7: note: ‘icu_71::StringByteSink’ declared here
267 | class StringByteSink : public ByteSink {
| ^~~~~~~~~~~~~~
transliterator.cpp:108:29: error: expected primary-expression before ‘>’ token
108 | StringByteSink<std::string> sink(&result);
| ^
transliterator.cpp:108:31: error: ‘sink’ was not declared in this scope; did you mean ‘sinl’?
108 | StringByteSink<std::string> sink(&result);
| ^~~~
| sinl
transliterator.cpp:111:10: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
111 | delete u_txt;
| ^~~~~
transliterator.cpp:112:10: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
112 | delete trans;
| ^~~~~
make: *** [Makefile:237: transliterator.o] Erro 1
make failed, exit code 2
I am in a full stack developer bootcamp and we need to install Ruby on Rails. So far I have enabled the "Windows Subsystem for Linux" feature, installed WSL 2, installed Ubuntu, and installed curl, pnupg and git.
I am trying to install RVM using this command:
curl -sSL https://get.rvm.io | bash -s stable --ruby
but I keep getting Error running '__rvm_make -j4'
I am using Windows 10 Home.
Here is an abbreviated form of the log file. There were many more warnings about functions being deprecated since Open SSL 3.0.
In file included from /usr/include/openssl/x509.h:36,
from /usr/include/openssl/x509v3.h:25,
from ossl.h:23,
from ossl_pkey_rsa.c:10:
/usr/include/openssl/rsa.h:225:28: note: declared here
225 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_crt_params(const RSA *r,
| ^~~~~~~~~~~~~~~~~~~
ossl_pkey_rsa.c: In function ‘ossl_rsa_get_iqmp’:
ossl_pkey_rsa.c:880:1: warning: ‘EVP_PKEY_get0_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
880 | OSSL_PKEY_BN_DEF3(rsa, RSA, crt_params, dmp1, dmq1, iqmp)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:29,
from /usr/include/openssl/x509v3.h:25,
from ossl.h:23,
from ossl_pkey_rsa.c:10:
/usr/include/openssl/evp.h:1346:22: note: declared here
1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
| ^~~~~~~~~~~~~~~~~
ossl_pkey_rsa.c:23:11: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
23 | (rsa) = EVP_PKEY_get0_RSA(_pkey); \
| ^
ossl_pkey.h:102:9: note: in expansion of macro ‘GetRSA’
102 | Get##_type(self, obj); \
| ^~~
ossl_pkey.h:114:9: note: in expansion of macro ‘OSSL_PKEY_BN_DEF_GETTER0’
114 | OSSL_PKEY_BN_DEF_GETTER0(_keytype, _type, a3, \
| ^~~~~~~~~~~~~~~~~~~~~~~~
ossl_pkey.h:211:9: note: in expansion of macro ‘OSSL_PKEY_BN_DEF_GETTER3’
211 | OSSL_PKEY_BN_DEF_GETTER3(_keytype, _type, _group, a1, a2, a3) \
| ^~~~~~~~~~~~~~~~~~~~~~~~
ossl_pkey_rsa.c:880:1: note: in expansion of macro ‘OSSL_PKEY_BN_DEF3’
880 | OSSL_PKEY_BN_DEF3(rsa, RSA, crt_params, dmp1, dmq1, iqmp)
| ^~~~~~~~~~~~~~~~~
ossl_pkey_rsa.c:880:1: warning: ‘RSA_get0_crt_params’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
In file included from /usr/include/openssl/x509.h:36,
from /usr/include/openssl/x509v3.h:25,
from ossl.h:23,
from ossl_pkey_rsa.c:10:
/usr/include/openssl/rsa.h:225:28: note: declared here
225 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_crt_params(const RSA *r,
| ^~~~~~~~~~~~~~~~~~~
ossl_pkey_rsa.c: In function ‘ossl_rsa_set_crt_params’:
ossl_pkey_rsa.c:880:1: warning: ‘EVP_PKEY_get0_RSA’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
880 | OSSL_PKEY_BN_DEF3(rsa, RSA, crt_params, dmp1, dmq1, iqmp)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:29,
from /usr/include/openssl/x509v3.h:25,
from ossl.h:23,
from ossl_pkey_rsa.c:10:
/usr/include/openssl/evp.h:1346:22: note: declared here
1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
| ^~~~~~~~~~~~~~~~~
ossl_pkey_rsa.c:23:11: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
23 | (rsa) = EVP_PKEY_get0_RSA(_pkey); \
| ^
ossl_pkey.h:135:9: note: in expansion of macro ‘GetRSA’
135 | Get##_type(self, obj); \
| ^~~
ossl_pkey.h:212:9: note: in expansion of macro ‘OSSL_PKEY_BN_DEF_SETTER3’
212 | OSSL_PKEY_BN_DEF_SETTER3(_keytype, _type, _group, a1, a2, a3)
| ^~~~~~~~~~~~~~~~~~~~~~~~
ossl_pkey_rsa.c:880:1: note: in expansion of macro ‘OSSL_PKEY_BN_DEF3’
880 | OSSL_PKEY_BN_DEF3(rsa, RSA, crt_params, dmp1, dmq1, iqmp)
| ^~~~~~~~~~~~~~~~~
ossl_pkey_rsa.c:880:1: warning: ‘RSA_set0_crt_params’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
In file included from /usr/include/openssl/x509.h:36,
from /usr/include/openssl/x509v3.h:25,
from ossl.h:23,
from ossl_pkey_rsa.c:10:
/usr/include/openssl/rsa.h:209:27: note: declared here
209 | OSSL_DEPRECATEDIN_3_0 int RSA_set0_crt_params(RSA *r,
| ^~~~~~~~~~~~~~~~~~~
ossl_pkey_rsa.c: In function ‘Init_ossl_rsa’:
ossl_pkey_rsa.c:885:58: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_NO_PADDING’?
885 | #define DefRSAConst(x) rb_define_const(cRSA, #x, INT2NUM(RSA_##x))
| ^~~~
ossl_pkey_rsa.c:950:5: note: in expansion of macro ‘DefRSAConst’
950 | DefRSAConst(SSLV23_PADDING);
| ^~~~~~~~~~~
ossl_pkey_rsa.c:885:58: note: each undeclared identifier is reported only once for each function it appears in
885 | #define DefRSAConst(x) rb_define_const(cRSA, #x, INT2NUM(RSA_##x))
| ^~~~
ossl_pkey_rsa.c:950:5: note: in expansion of macro ‘DefRSAConst’
950 | DefRSAConst(SSLV23_PADDING);
| ^~~~~~~~~~~
cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics
compiling sha2.c
ossl_pkey_rsa.c: At top level:
cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics
make[2]: *** [Makefile:328: ossl_pkey_rsa.o] Error 1
make[2]: Leaving directory '/home/mmullen/.rvm/src/ruby-3.0.0/ext/openssl'
make[1]: *** [exts.mk:260: ext/openssl/all] Error 2
make[1]: *** Waiting for unfinished jobs....
installing default sha2 libraries
linking shared-object socket.so
checking ../.././parse.y and ../.././ext/ripper/eventids2.c
In file included from sha2.c:40:
sha2.c:578:28: warning: argument 2 of type ‘sha2_byte[]’ {aka ‘unsigned char[]’} with mismatched bound [-Warray-parameter=]
578 | int SHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
| ~~~~~~~~~~^~~~~~~~
sha2.h:145:50: note: in definition of macro ‘SHA256_Final’
145 | #define SHA256_Final(d, c) SHA256_Finish(c, d)
| ^
sha2.h:170:18: note: previously declared as ‘uint8_t[32]’ {aka ‘unsigned char[32]’}
170 | int SHA256_Final(uint8_t[SHA256_DIGEST_LENGTH], SHA256_CTX*);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sha2.h:145:50: note: in definition of macro ‘SHA256_Final’
145 | #define SHA256_Final(d, c) SHA256_Finish(c, d)
| ^
sha2.c:643:44: warning: argument 2 of type ‘char[]’ with mismatched bound [-Warray-parameter=]
643 | char *SHA256_End(SHA256_CTX* context, char buffer[]) {
| ~~~~~^~~~~~~~
In file included from sha2.c:40:
sha2.h:171:31: note: previously declared as ‘char[65]’
171 | char* SHA256_End(SHA256_CTX*, char[SHA256_DIGEST_STRING_LENGTH]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sha2.c:946:28: warning: argument 2 of type ‘sha2_byte[]’ {aka ‘unsigned char[]’} with mismatched bound [-Warray-parameter=]
946 | int SHA512_Final(sha2_byte digest[], SHA512_CTX* context) {
| ~~~~~~~~~~^~~~~~~~
sha2.h:163:50: note: in definition of macro ‘SHA512_Final’
163 | #define SHA512_Final(d, c) SHA512_Finish(c, d)
| ^
sha2.h:182:18: note: previously declared as ‘uint8_t[64]’ {aka ‘unsigned char[64]’}
182 | int SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sha2.h:163:50: note: in definition of macro ‘SHA512_Final’
163 | #define SHA512_Final(d, c) SHA512_Finish(c, d)
| ^
sha2.c:976:44: warning: argument 2 of type ‘char[]’ with mismatched bound [-Warray-parameter=]
976 | char *SHA512_End(SHA512_CTX* context, char buffer[]) {
| ~~~~~^~~~~~~~
In file included from sha2.c:40:
sha2.h:183:31: note: previously declared as ‘char[129]’
183 | char* SHA512_End(SHA512_CTX*, char[SHA512_DIGEST_STRING_LENGTH]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sha2.c:1022:28: warning: argument 2 of type ‘sha2_byte[]’ {aka ‘unsigned char[]’} with mismatched bound [-Warray-parameter=]
1022 | int SHA384_Final(sha2_byte digest[], SHA384_CTX* context) {
| ~~~~~~~~~~^~~~~~~~
sha2.h:154:50: note: in definition of macro ‘SHA384_Final’
154 | #define SHA384_Final(d, c) SHA384_Finish(c, d)
| ^
sha2.h:176:18: note: previously declared as ‘uint8_t[48]’ {aka ‘unsigned char[48]’}
176 | int SHA384_Final(uint8_t[SHA384_DIGEST_LENGTH], SHA384_CTX*);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sha2.h:154:50: note: in definition of macro ‘SHA384_Final’
154 | #define SHA384_Final(d, c) SHA384_Finish(c, d)
| ^
sha2.c:1052:44: warning: argument 2 of type ‘char[]’ with mismatched bound [-Warray-parameter=]
1052 | char *SHA384_End(SHA384_CTX* context, char buffer[]) {
| ~~~~~^~~~~~~~
In file included from sha2.c:40:
sha2.h:177:31: note: previously declared as ‘char[97]’
177 | char* SHA384_End(SHA384_CTX*, char[SHA384_DIGEST_STRING_LENGTH]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
installing default ripper libraries
linking shared-object ripper.so
cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics
make[2]: Leaving directory '/home/mmullen/.rvm/src/ruby-3.0.0/ext/socket'
linking shared-object digest/sha2.so
make[2]: Leaving directory '/home/mmullen/.rvm/src/ruby-3.0.0/ext/ripper'
make[2]: Leaving directory '/home/mmullen/.rvm/src/ruby-3.0.0/ext/digest/sha2'
make[1]: Leaving directory '/home/mmullen/.rvm/src/ruby-3.0.0'
make: *** [uncommon.mk:300: build-ext] Error 2
++ /scripts/functions/support : __rvm_make() 383 > return 2
(END)
Just in case someone else stumbles across this question, the answer can be found in the answers to this Github issue. Even though there are a few similar bug reports with similar answers exists for Ubuntu, this looks like the most direct.
$rvm pkg install openssl
$rvm install ruby-<version> --with-openssl-dir=/usr/share/rvm/usr
I installed libsqlite3-dev but it hasn't helped. My ruby version is 3.0.0 .And this is my error :
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/nurlaney/.gem/gems/sqlite3-1.4.2/ext/sqlite3
/snap/ruby/201/bin/ruby -I /snap/ruby/201/lib/ruby/3.0.0 -r ./siteconf20210129-26408-4tihlx.rb extconf.rb
checking for sqlite3.h... yes
checking for pthread_create() in -lpthread... yes
checking for -ldl... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... no
checking for rb_integer_pack()... no
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: /home/nurlaney/.gem/gems/sqlite3-1.4.2/ext/sqlite3
make "DESTDIR=" clean
current directory: /home/nurlaney/.gem/gems/sqlite3-1.4.2/ext/sqlite3
make "DESTDIR="
compiling aggregator.c
compiling backup.c
compiling database.c
database.c: In function ‘rb_sqlite3_open_v2’:
database.c:38:9: warning: unused variable ‘flags’ [-Wunused-variable]
38 | VALUE flags;
| ^~~~~
database.c: In function ‘exec_batch’:
database.c:726:57: warning: passing argument 3 of ‘sqlite3_exec’ from incompatible pointer type
[-Wincompatible-pointer-types]
726 | status = sqlite3_exec(ctx->db, StringValuePtr(sql), hash_callback_function, callback_ary, &errMsg);
| ^~~~~~~~~~~~~~~~~~~~~~
| |
| int (*)(VALUE, int, char **, char **) {aka int
(*)(long unsigned int, int, char **, char **)}
In file included from ./sqlite3_ruby.h:25,
from database.c:1:
/usr/include/sqlite3.h:409:9: note: expected ‘int (*)(void *, int, char **, char **)’ but argument is of type ‘int
(*)(VALUE, int, char **, char **)’ {aka ‘int (*)(long unsigned int, int, char **, char **)’}
409 | int (*callback)(void*,int,char**,char**), /* Callback function */
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
database.c:726:81: warning: passing argument 4 of ‘sqlite3_exec’ makes pointer from integer without a cast
[-Wint-conversion]
726 | status = sqlite3_exec(ctx->db, StringValuePtr(sql), hash_callback_function, callback_ary, &errMsg);
| ^~~~~~~~~~~~
| |
| VALUE {aka long unsigned int}
In file included from ./sqlite3_ruby.h:25,
from database.c:1:
/usr/include/sqlite3.h:410:3: note: expected ‘void *’ but argument is of type ‘VALUE’ {aka ‘long unsigned int’}
410 | void *, /* 1st argument to callback */
| ^~~~~~
database.c:728:57: warning: passing argument 3 of ‘sqlite3_exec’ from incompatible pointer type
[-Wincompatible-pointer-types]
728 | status = sqlite3_exec(ctx->db, StringValuePtr(sql), regular_callback_function, callback_ary, &errMsg);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int (*)(VALUE, int, char **, char **) {aka int
(*)(long unsigned int, int, char **, char **)}
In file included from ./sqlite3_ruby.h:25,
from database.c:1:
/usr/include/sqlite3.h:409:9: note: expected ‘int (*)(void *, int, char **, char **)’ but argument is of type ‘int
(*)(VALUE, int, char **, char **)’ {aka ‘int (*)(long unsigned int, int, char **, char **)’}
409 | int (*callback)(void*,int,char**,char**), /* Callback function */
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
database.c:728:84: warning: passing argument 4 of ‘sqlite3_exec’ makes pointer from integer without a cast
[-Wint-conversion]
728 | status = sqlite3_exec(ctx->db, StringValuePtr(sql), regular_callback_function, callback_ary, &errMsg);
| ^~~~~~~~~~~~
| |
| VALUE {aka long unsigned
int}
In file included from ./sqlite3_ruby.h:25,
from database.c:1:
/usr/include/sqlite3.h:410:3: note: expected ‘void *’ but argument is of type ‘VALUE’ {aka ‘long unsigned int’}
410 | void *, /* 1st argument to callback */
| ^~~~~~
database.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
compiling exception.c
compiling sqlite3.c
sqlite3.c: In function ‘bignum_to_int64’:
sqlite3.c:33:27: warning: implicit declaration of function ‘RBIGNUM’; did you mean ‘T_BIGNUM’?
[-Wimplicit-function-declaration]
33 | # define RBIGNUM_LEN(x) RBIGNUM(x)->len
| ^~~~~~~
sqlite3.c:35:20: note: in expansion of macro ‘RBIGNUM_LEN’
35 | const long len = RBIGNUM_LEN(value);
| ^~~~~~~~~~~
sqlite3.c:33:37: error: invalid type argument of ‘->’ (have ‘int’)
33 | # define RBIGNUM_LEN(x) RBIGNUM(x)->len
| ^~
sqlite3.c:35:20: note: in expansion of macro ‘RBIGNUM_LEN’
35 | const long len = RBIGNUM_LEN(value);
| ^~~~~~~~~~~
sqlite3.c:40:19: error: ‘SIZEOF_BDIGITS’ undeclared (first use in this function); did you mean ‘SIZEOF_INT’?
40 | if (len > 63 / (SIZEOF_BDIGITS * CHAR_BIT) + 1) return 0;
| ^~~~~~~~~~~~~~
| SIZEOF_INT
sqlite3.c:40:19: note: each undeclared identifier is reported only once for each function it appears in
sqlite3.c:42:11: error: unknown type name ‘BDIGIT’
42 | const BDIGIT *digits = RBIGNUM_DIGITS(value);
| ^~~~~~
sqlite3.c:42:28: warning: implicit declaration of function ‘RBIGNUM_DIGITS’; did you mean ‘RBIGNUM_SIGN’?
[-Wimplicit-function-declaration]
42 | const BDIGIT *digits = RBIGNUM_DIGITS(value);
| ^~~~~~~~~~~~~~
| RBIGNUM_SIGN
sqlite3.c:42:28: warning: initialization of ‘const int *’ from ‘int’ makes pointer from integer without a cast
[-Wint-conversion]
sqlite3.c:43:5: error: unknown type name ‘BDIGIT’; did you mean ‘ISDIGIT’?
43 | BDIGIT blast = digits[len-1];
| ^~~~~~
| ISDIGIT
sqlite3.c:44:5: error: unknown type name ‘BDIGIT’; did you mean ‘ISDIGIT’?
44 | BDIGIT bmax = (BDIGIT)1UL << (63 % (CHAR_BIT * SIZEOF_BDIGITS));
| ^~~~~~
| ISDIGIT
sqlite3.c:44:20: error: ‘BDIGIT’ undeclared (first use in this function); did you mean ‘ISDIGIT’?
44 | BDIGIT bmax = (BDIGIT)1UL << (63 % (CHAR_BIT * SIZEOF_BDIGITS));
| ^~~~~~
| ISDIGIT
sqlite3.c:44:27: error: expected ‘,’ or ‘;’ before numeric constant
44 | BDIGIT bmax = (BDIGIT)1UL << (63 % (CHAR_BIT * SIZEOF_BDIGITS));
| ^~~
sqlite3.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
make: *** [Makefile:245: sqlite3.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/nurlaney/.gem/gems/sqlite3-1.4.2 for inspection.
Results logged to /home/nurlaney/.gem/extensions/x86_64-linux/3.0.0/sqlite3-1.4.2/gem_make.out
An error occurred while installing sqlite3 (1.4.2), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.4.2' --source 'http://rubygems.org/'` succeeds before bundling.
In Gemfile:
sqlite3
I looked at other topics and none of them helped. Should i install DevKit like in Windows ? And if this can install, how is it ?
I installed ruby from snap channel.
I tried install sqlite3 gem but it returns me same error again. Then i tried to install gem locally but it doesnt help again. So im stuck. I don't know how to fix. Any ideas ?
Please check following simple steps for install sqlite3 in Ubuntu 20.04
sudo apt update
sudo apt install sqlite3
sqlite3 --version
If above comment not working for your machine, you can directly download the .deb file here and install https://ubuntu.pkgs.org/20.04/ubuntu-main-amd64/libsqlite3-dev_3.31.1-4_amd64.deb.html
Install sqlite3 Gem
sudo apt-get install sqlite3 libsqlite3-dev
sudo gem install sqlite3-ruby
Let me if you need any help thanks :)
Issue while installing semacode gem from gemfile. is there a way to resolve this? i am running bundle install. Is this a issue with my machine or a gem issue? This issue did happen for the first time on my machine when i tried to run the application locally.
Using semacode 0.7.5 from https://github.com/toretore/semacode.git (at master#4e31e0b)
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
make "DESTDIR=" clean
.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/bundler/gems/semacode-4e31e0b79a1a/ext
make "DESTDIR="
compiling reedsol.c
compiling semacode.c
semacode.c:61:3: error: implicit declaration of function 'iec16022init' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
iec16022init(&semacode->width, &semacode->height, message);
^
semacode.c:96:28: warning: 'bzero' call operates on objects of type 'semacode_t' (aka 'struct semacode_t') while the size is based on a different type 'semacode_t *' (aka 'struct
semacode_t *') [-Wsizeof-pointer-memaccess]
bzero(semacode, sizeof(semacode));
~~~~~~~~ ^~~~~~~~
semacode.c:96:28: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
bzero(semacode, sizeof(semacode));
^~~~~~~~
semacode.c:129:27: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
encode_string(semacode, StringValueLen(message), StringValuePtr(message));
~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~
./semacode.h:26:27: note: expanded from macro 'StringValueLen'
#define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RSTRING_EMBED_LEN(str) : \
^~~~~~~~~~~~~~~~~~~~~~
(long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
semacode.c:129:27: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
encode_string(semacode, StringValueLen(message), StringValuePtr(message));
~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~
./semacode.h:26:27: note: expanded from macro 'StringValueLen'
#define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-2.3.0/ruby/ruby.h:995:28: note: expanded from macro 'RSTRING_LEN'
RSTRING(str)->as.heap.len)
~~~~~~~~~~~~~~~~~~~~~~^~~
semacode.c:239:20: warning: equality comparison result unused [-Wunused-comparison]
semacode->data == NULL;
~~~~~~~~~~~~~~~^~~~~~~
semacode.c:239:20: note: use '=' to turn this equality comparison into an assignment
semacode->data == NULL;
^~
=
semacode.c:243:44: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
DATA_PTR(self) = encode_string(semacode, StringValueLen(message), StringValuePtr(message));
~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~
./semacode.h:26:27: note: expanded from macro 'StringValueLen'
#define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.rbenv/versions/2.3.5/include/ruby-2.3.0/ruby/ruby.h:994:6: note: expanded from macro 'RSTRING_LEN'
RSTRING_EMBED_LEN(str) : \
^~~~~~~~~~~~~~~~~~~~~~
.rbenv/versions/2.3.5/include/ruby-2.3.0/ruby/ruby.h:990:6: note: expanded from macro 'RSTRING_EMBED_LEN'
(long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
semacode.c:243:44: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
DATA_PTR(self) = encode_string(semacode, StringValueLen(message), StringValuePtr(message));
~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~
./semacode.h:26:27: note: expanded from macro 'StringValueLen'
#define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.rbenv/versions/2.3.5/include/ruby-2.3.0/ruby/ruby.h:995:28: note: expanded from macro 'RSTRING_LEN'
RSTRING(str)->as.heap.len)
~~~~~~~~~~~~~~~~~~~~~~^~~
6 warnings and 1 error generated.
make: *** [semacode.o] Error 1
make failed, exit code 2
Gem files will remain installed in .rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/bundler/gems/semacode-4e31e0b79a1a for inspection.
Results logged to .rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/bundler/gems/extensions/x86_64-darwin-19/2.3.0-static/semacode-4e31e0b79a1a/gem_make.out
An error occurred while installing semacode (0.7.5), and Bundler cannot continue.
In Gemfile:
semacode
Try this
gem install semacode -v 0.7.5 -- --with-cflags="-Wno-error=implicit-function-declaration"
Here is more information:
Clang now reports an error when you use a function without an explicit declaration when building C or Objective-C code for macOS (-Werror=implicit-function-declaration flag is on). This additional error detection unifies Clang’s behavior for iOS/tvOS and macOS 64-bit targets for this diagnostic. (49917738)
https://developer.apple.com/documentation/xcode-release-notes/xcode-12-release-notes
I've seen some similar issues on macOS that have only started since v12 was released. If you have v12 you can try downgrading to v11.5 from download.developer.apple.com/Developer_Tools/… and retrying the gem installation
credits - #anothermh
When I ran this command:
gem install rails
I got this output:
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
current directory: /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/ext/nokogiri
/usr/share/rvm/rubies/ruby-2.7.1/bin/ruby -I /usr/share/rvm/rubies/ruby-2.7.1/lib/ruby/site_ruby/2.7.0 -r ./siteconf20200602-62149-hwdwns.rb extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
Using mini_portile version 2.4.0
checking for gzdopen() in -lz... yes
checking for iconv... yes
************************************************************************
IMPORTANT NOTICE:
Building Nokogiri with a packaged version of libxml2-2.9.10
with the following patches applied:
- 0001-Revert-Do-not-URI-escape-in-server-side-includes.patch
- 0002-Remove-script-macro-support.patch
- 0003-Update-entities-to-remove-handling-of-ssi.patch
- 0004-libxml2.la-is-in-top_builddir.patch
- 0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch
Team Nokogiri will keep on doing their best to provide security
updates in a timely manner, but if this is a concern for you and want
to use the system library instead; abort this installation process and
reinstall nokogiri as follows:
gem install nokogiri -- --use-system-libraries
[--with-xml2-config=/path/to/xml2-config]
[--with-xslt-config=/path/to/xslt-config]
If you are using Bundler, tell it to use the option:
bundle config build.nokogiri --use-system-libraries
bundle install
Note, however, that nokogiri is not fully compatible with arbitrary
versions of libxml2 provided by OS/package vendors.
************************************************************************
Extracting libxml2-2.9.10.tar.gz into tmp/x86_64-pc-linux-gnu/ports/libxml2/2.9.10... OK
Running git apply with /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch... OK
Running git apply with /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/patches/libxml2/0002-Remove-script-macro-support.patch... OK
Running git apply with /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi.patch... OK
Running git apply with /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/patches/libxml2/0004-libxml2.la-is-in-top_builddir.patch... OK
Running git apply with /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/patches/libxml2/0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch... OK
Running 'configure' for libxml2 2.9.10... OK
Running 'compile' for libxml2 2.9.10... OK
Running 'install' for libxml2 2.9.10... OK
Activating libxml2 2.9.10 (from /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/ports/x86_64-pc-linux-gnu/libxml2/2.9.10)...
************************************************************************
IMPORTANT NOTICE:
Building Nokogiri with a packaged version of libxslt-1.1.34.
Team Nokogiri will keep on doing their best to provide security
updates in a timely manner, but if this is a concern for you and want
to use the system library instead; abort this installation process and
reinstall nokogiri as follows:
gem install nokogiri -- --use-system-libraries
[--with-xml2-config=/path/to/xml2-config]
[--with-xslt-config=/path/to/xslt-config]
If you are using Bundler, tell it to use the option:
bundle config build.nokogiri --use-system-libraries
bundle install
************************************************************************
Extracting libxslt-1.1.34.tar.gz into tmp/x86_64-pc-linux-gnu/ports/libxslt/1.1.34... OK
Running 'configure' for libxslt 1.1.34... OK
Running 'compile' for libxslt 1.1.34... OK
Running 'install' for libxslt 1.1.34... OK
Activating libxslt 1.1.34 (from /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/ports/x86_64-pc-linux-gnu/libxslt/1.1.34)...
checking for -llzma... yes
checking for xmlParseDoc() in libxml/parser.h... yes
checking for xsltParseStylesheetDoc() in libxslt/xslt.h... yes
checking for exsltFuncRegister() in libexslt/exslt.h... yes
checking for xmlHasFeature()... yes
checking for xmlFirstElementChild()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetValidStructuredErrors()... yes
checking for xmlSchemaSetValidStructuredErrors()... yes
checking for xmlSchemaSetParserStructuredErrors()... yes
creating Makefile
current directory: /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/ext/nokogiri
make "DESTDIR=" clean
current directory: /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/ext/nokogiri
make "DESTDIR="
compiling html_document.c
In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33,
from ./nokogiri.h:33,
from ./html_document.h:4,
from html_document.c:1:
html_document.c: In function ‘new’:
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2508:48: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
2508 | (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
| ^
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2340:9: note: in expansion of macro ‘rb_scan_args0’
2340 | rb_scan_args0(argc,argvp,fmt,\
| ^~~~~~~~~~~~~
html_document.c:16:3: note: in expansion of macro ‘rb_scan_args’
16 | rb_scan_args(argc, argv, "0*", &rest);
| ^~~~~~~~~~~~
html_document.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
compiling html_element_description.c
compiling html_entity_lookup.c
compiling html_sax_parser_context.c
compiling html_sax_push_parser.c
compiling nokogiri.c
compiling xml_attr.c
In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33,
from ./nokogiri.h:33,
from ./xml_attr.h:4,
from xml_attr.c:1:
xml_attr.c: In function ‘new’:
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2508:48: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
2508 | (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
| ^
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2340:9: note: in expansion of macro ‘rb_scan_args0’
2340 | rb_scan_args0(argc,argvp,fmt,\
| ^~~~~~~~~~~~~
xml_attr.c:61:3: note: in expansion of macro ‘rb_scan_args’
61 | rb_scan_args(argc, argv, "2*", &document, &name, &rest);
| ^~~~~~~~~~~~
xml_attr.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
compiling xml_attribute_decl.c
compiling xml_cdata.c
In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33,
from ./nokogiri.h:33,
from ./xml_cdata.h:4,
from xml_cdata.c:1:
xml_cdata.c: In function ‘new’:
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2508:48: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
2508 | (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
| ^
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2340:9: note: in expansion of macro ‘rb_scan_args0’
2340 | rb_scan_args0(argc,argvp,fmt,\
| ^~~~~~~~~~~~~
xml_cdata.c:23:3: note: in expansion of macro ‘rb_scan_args’
23 | rb_scan_args(argc, argv, "2*", &doc, &content, &rest);
| ^~~~~~~~~~~~
xml_cdata.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
compiling xml_comment.c
In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33,
from ./nokogiri.h:33,
from ./xml_comment.h:4,
from xml_comment.c:1:
xml_comment.c: In function ‘new’:
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2508:48: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
2508 | (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
| ^
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2340:9: note: in expansion of macro ‘rb_scan_args0’
2340 | rb_scan_args0(argc,argvp,fmt,\
| ^~~~~~~~~~~~~
xml_comment.c:21:3: note: in expansion of macro ‘rb_scan_args’
21 | rb_scan_args(argc, argv, "2*", &document, &content, &rest);
| ^~~~~~~~~~~~
xml_comment.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
compiling xml_document.c
xml_document.c: In function ‘dealloc’:
xml_document.c:49:25: warning: passing argument 2 of ‘rb_st_foreach’ from incompatible pointer type [-Wincompatible-pointer-types]
49 | st_foreach(node_hash, dealloc_node_i, (st_data_t)doc);
| ^~~~~~~~~~~~~~
| |
| int (*)(xmlNode *, xmlNode *, xmlDoc *) {aka int (*)(struct _xmlNode *, struct _xmlNode *, struct _xmlDoc *)}
In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/intern.h:39,
from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2148,
from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33,
from ./nokogiri.h:33,
from ./xml_document.h:4,
from xml_document.c:1:
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/st.h:141:31: note: expected ‘int (*)(st_data_t, st_data_t, st_data_t)’ {aka ‘int
...
| ^~~~~~~~~~~~
xml_document.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
compiling xml_document_fragment.c
In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33,
from ./nokogiri.h:33,
from ./xml_document_fragment.h:4,
from xml_document_fragment.c:1:
xml_document_fragment.c: In function ‘new’:
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2508:48: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
2508 | (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
| ^
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2340:9: note: in expansion of macro ‘rb_scan_args0’
2340 | rb_scan_args0(argc,argvp,fmt,\
| ^~~~~~~~~~~~~
xml_document_fragment.c:17:3: note: in expansion of macro ‘rb_scan_args’
17 | rb_scan_args(argc, argv, "1*", &document, &rest);
| ^~~~~~~~~~~~
xml_document_fragment.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
compiling xml_dtd.c
compiling xml_element_content.c
compiling xml_element_decl.c
compiling xml_encoding_handler.c
compiling xml_entity_decl.c
compiling xml_entity_reference.c
In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33,
from ./nokogiri.h:33,
from ./xml_entity_reference.h:4,
from xml_entity_reference.c:1:
xml_entity_reference.c: In function ‘new’:
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2508:48: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
2508 | (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
| ^
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2340:9: note: in expansion of macro ‘rb_scan_args0’
2340 | rb_scan_args0(argc,argvp,fmt,\
| ^~~~~~~~~~~~~
xml_entity_reference.c:18:3: note: in expansion of macro ‘rb_scan_args’
18 | rb_scan_args(argc, argv, "2*", &document, &name, &rest);
| ^~~~~~~~~~~~
xml_entity_reference.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
compiling xml_io.c
xml_io.c: In function ‘io_read_callback’:
xml_io.c:20:22: warning: passing argument 1 of ‘rb_rescue’ from incompatible pointer type [-Wincompatible-pointer-types]
20 | string = rb_rescue(read_check, (VALUE)args, read_failed, 0);
| ^~~~~~~~~~
| |
| VALUE (*)(VALUE *) {aka long unsigned int (*)(long unsigned int *)}
In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33,
from ./nokogiri.h:33,
from ./xml_io.h:4,
from xml_io.c:1:
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:1987:17: note: expected ‘VALUE (*)(VALUE)’ {aka ‘long unsigned int (*)(long unsigned int)’} but argument is of type ‘VALUE (*)(VALUE *)’ {aka ‘long unsigned int (*)(long unsigned int *)’}
1987 | VALUE rb_rescue(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE);
| ^~~~~~~~~~~~~~~
xml_io.c:20:47: warning: passing argument 3 of ‘rb_rescue’ from incompatible pointer type [-Wincompatible-pointer-types]
20 | string = rb_rescue(read_check, (VALUE)args, read_failed, 0);
| ^~~~~~~~~~~
| |
| VALUE (*)(void) {aka long unsigned int (*)(void)}
In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33,
from ./nokogiri.h:33,
from ./xml_node_set.h:4,
from xml_node_set.c:1:
xml_node_set.c: In function ‘slice’:
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2508:48: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
2508 | (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
| ^
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2340:9: note: in expansion of macro ‘rb_scan_args0’
2340 | rb_scan_args0(argc,argvp,fmt,\
| ^~~~~~~~~~~~~
xml_node_set.c:294:5: note: in expansion of macro ‘rb_scan_args’
294 | rb_scan_args(argc, argv, "11", NULL, NULL);
| ^~~~~~~~~~~~
In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33,
from ./nokogiri.h:33,
from ./xml_node_set.h:4,
from xml_node_set.c:1:
xml_node_set.c: In function ‘init_xml_node_set’:
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2799:117: warning: passing argument 3 of ‘rb_define_method0’ from incompatible pointer type [-Wincompatible-pointer-types]
2799 | #define rb_define_method(klass, mid, func, arity) rb_define_method_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
| ^~~~~~
| |
| VALUE (*)(VALUE, VALUE) {aka long unsigned int (*)(long unsigned int, long unsigned int)}
xml_node_set.c:479:3: note: in expansion of macro ‘rb_define_method’
479 | rb_define_method(klass, "to_a", to_array, 0);
| ^~~~~~~~~~~~~~~~
In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2148,
from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33,
from ./nokogiri.h:33,
from ./xml_node_set.h:4,
from xml_node_set.c:1:
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2775:27: note: expected ‘VALUE (*)(VALUE)’ {aka ‘long unsigned int (*)(long unsigned int)’} but argument is of type ‘VALUE (*)(VALUE, VALUE)’ {aka ‘long unsigned int (*)(long unsigned int, long unsigned int)’}
2775 | RB_METHOD_DEFINITION_DECL(rb_define_method, (2,3), (VALUE klass, const char *name), (klass, name))
| ^~~~~~~~~~~~~~~~
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/intern.h:1042:82: note: in definition of macro ‘RB_METHOD_DEFINITION_DECL_C’
1042 | __attribute__((__unused__,__weakref__(#def),__nonnull__ nonnull))static void defname(RB_UNWRAP_MACRO decl,VALUE(*func)funcargs,int arity);
| ^~~~~~~
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/intern.h:1074:1: note: in expansion of macro ‘RB_METHOD_DEFINITION_DECL_1’
1074 | RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##0 ,0 ,decl,vars,(VALUE)) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2775:1: note: in expansion of macro ‘RB_METHOD_DEFINITION_DECL’
2775 | RB_METHOD_DEFINITION_DECL(rb_define_method, (2,3), (VALUE klass, const char *name), (klass, name))
| ^~~~~~~~~~~~~~~~~~~~~~~~~
xml_node_set.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
compiling xml_processing_instruction.c
In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33,
from ./nokogiri.h:33,
from ./xml_processing_instruction.h:4,
from xml_processing_instruction.c:1:
xml_processing_instruction.c: In function ‘new’:
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2508:48: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
2508 | (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
| ^
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2340:9: note: in expansion of macro ‘rb_scan_args0’
2340 | rb_scan_args0(argc,argvp,fmt,\
| ^~~~~~~~~~~~~
xml_processing_instruction.c:20:3: note: in expansion of macro ‘rb_scan_args’
20 | rb_scan_args(argc, argv, "3*", &document, &name, &content, &rest);
| ^~~~~~~~~~~~
xml_processing_instruction.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
compiling xml_reader.c
In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33,
from ./nokogiri.h:33,
from ./xml_reader.h:4,
from xml_reader.c:1:
xml_reader.c: In function ‘from_memory’:
/usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2508:48: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
2508 | (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
| ^
| ^~~~~~~~~~~~
...
At top level:
xslt_stylesheet.c:112:13: warning: ‘swallow_superfluous_xml_errors’ defined but not used [-Wunused-function]
112 | static void swallow_superfluous_xml_errors(void * userdata, xmlErrorPtr error, ...)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
linking shared-object nokogiri/nokogiri.so
Cleaning files only used during build.
rm -rf /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/ext/nokogiri/tmp/x86_64-pc-linux-gnu/ports
rm -rf /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/ports
current directory: /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/ext/nokogiri
make "DESTDIR=" install
make: /usr/bin/mkdir: Command not found
make: *** [Makefile:202: .sitearchdir.-.nokogiri.time] Error 127
make install failed, exit code 2
Gem files will remain installed in /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9 for inspection.
Results logged to /home/hizmarck/.rvm/gems/ruby-2.7.1/extensions/x86_64-linux/2.7.0/nokogiri-1.10.9/gem_make.out
I spend 2 days, I can't make it work.
rvm 1.29.10 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
yarn version 1.22.4
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]
This is the complete log:
https://drive.google.com/file/d/1tngDfaI9mXri16sTYcPflz8PLoieIQTT/view?usp=sharing
What could it be?
Thank you for your support.
Make process cannot find the mkdir command.
$ which mkdir
/bin/mkdir
Since the process is searching for the command in /usr/bin/mkdir it cannot be found. It is fixable by creating a symbolic link to the correct path:
sudo ln -s /bin/mkdir /usr/bin/mkdir
Answer source - stackoverflow post