Community forum topic link
Getting similar error mentioned in the post.
Error while installing luajwtjitsi
I have enabled the muc_size plugin. Then I restarted the prosody and jicofo server.
systemctl restart prosody && systemctl restart jicofo
I got error module not found . So I did this.
apt install luarocks
luarocks install net-url
I reload the prosody and jicofo again
Then I got basexx not found.
luarocks install basexx
Now , again I got the error ( luajwtjitsi module not found). So I tried to install this with luarocks
luarocks install luajwtjitsi
I got the error saying:
Installing https://luarocks.org/luajwtjitsi-1.3-7.rockspec
Missing dependencies for luajwtjitsi 1.3-7:
luacrypto >= 0.3.2-1 (not installed)
lua-cjson >= 2.1.0 (not installed)
lbase64 >= 20120807-3 (not installed)
luajwtjitsi 1.3-7 depends on luacrypto >= 0.3.2-1 (not installed)
Installing https://luarocks.org/luacrypto-0.3.2-2.src.rock
Error: Failed installing dependency: https://luarocks.org/luacrypto-0.3.2-2.src.rock - Could not find header file for OPENSSL
No file openssl/evp.h in /usr/local/include
No file openssl/evp.h in /usr/include
You may have to install OPENSSL in your system and/or pass OPENSSL_DIR or OPENSSL_INCDIR to the luarocks command.
Example: luarocks install luacrypto OPENSSL_DIR=/usr/local
So I did this:
apt install libssl-dev
So , I got the error saying "lua.h" not found, but lua5.2 was already installed. After following answer on te forum.
apt install liblua5.2-dev
It installs both liblua5.2-dev and liblua5.2-0
Now I am facing below error on install luajwtjitsi.
Installing https://luarocks.org/luajwtjitsi-1.3-7.rockspec
Missing dependencies for luajwtjitsi 1.3-7:
luacrypto >= 0.3.2-1 (not installed)
lua-cjson >= 2.1.0 (not installed)
lbase64 >= 20120807-3 (not installed)
luajwtjitsi 1.3-7 depends on luacrypto >= 0.3.2-1 (not installed)
Installing https://luarocks.org/luacrypto-0.3.2-2.src.rock
gcc -O2 -fPIC -I/usr/include/lua5.2 -c src/lcrypto.c -o src/lcrypto.o -I/usr/include
src/lcrypto.c: In function ‘digest_pnew’:
src/lcrypto.c:81:61: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_MD_CTX’ {aka ‘struct evp_md_ctx_st’}
81 | EVP_MD_CTX *c = (EVP_MD_CTX *)lua_newuserdata(L, sizeof(EVP_MD_CTX));
| ^~~~~~~~~~
src/lcrypto.c: In function ‘digest_reset’:
src/lcrypto.c:120:10: warning: implicit declaration of function ‘EVP_MD_CTX_cleanup’; did you mean ‘EVP_MD_CTX_create’? [-Wimplicit-function-declaration]
120 | if (!EVP_MD_CTX_cleanup(c))
| ^~~~~~~~~~~~~~~~~~
| EVP_MD_CTX_create
src/lcrypto.c: In function ‘encrypt_pnew’:
src/lcrypto.c:331:69: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_CIPHER_CTX’ {aka ‘struct evp_cipher_ctx_st’}
331 | EVP_CIPHER_CTX *c = (EVP_CIPHER_CTX *)lua_newuserdata(L, sizeof(EVP_CIPHER_CTX));
| ^~~~~~~~~~~~~~
src/lcrypto.c: In function ‘encrypt_fencrypt’:
src/lcrypto.c:425:20: error: storage size of ‘c’ isn’t known
425 | EVP_CIPHER_CTX c;
| ^
src/lcrypto.c: In function ‘decrypt_pnew’:
src/lcrypto.c:470:69: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_CIPHER_CTX’ {aka ‘struct evp_cipher_ctx_st’}
470 | EVP_CIPHER_CTX *c = (EVP_CIPHER_CTX *)lua_newuserdata(L, sizeof(EVP_CIPHER_CTX));
| ^~~~~~~~~~~~~~
src/lcrypto.c: In function ‘decrypt_fdecrypt’:
src/lcrypto.c:561:20: error: storage size of ‘c’ isn’t known
561 | EVP_CIPHER_CTX c;
| ^
src/lcrypto.c: In function ‘hmac_pnew’:
src/lcrypto.c:604:57: error: invalid application of ‘sizeof’ to incomplete type ‘HMAC_CTX’ {aka ‘struct hmac_ctx_st’}
604 | HMAC_CTX *c = (HMAC_CTX *)lua_newuserdata(L, sizeof(HMAC_CTX));
| ^~~~~~~~
src/lcrypto.c: In function ‘hmac_fnew’:
src/lcrypto.c:621:5: warning: implicit declaration of function ‘HMAC_CTX_init’; did you mean ‘HMAC_CTX_new’? [-Wimplicit-function-declaration]
621 | HMAC_CTX_init(c);
| ^~~~~~~~~~~~~
| HMAC_CTX_new
src/lcrypto.c: In function ‘hmac_clone’:
src/lcrypto.c:631:5: error: dereferencing pointer to incomplete type ‘HMAC_CTX’ {aka ‘struct hmac_ctx_st’}
631 | *d = *c;
| ^~
src/lcrypto.c: In function ‘hmac_gc’:
src/lcrypto.c:697:5: warning: implicit declaration of function ‘HMAC_CTX_cleanup’ [-Wimplicit-function-declaration]
697 | HMAC_CTX_cleanup(c);
| ^~~~~~~~~~~~~~~~
src/lcrypto.c: In function ‘hmac_fdigest’:
src/lcrypto.c:711:14: error: storage size of ‘c’ isn’t known
711 | HMAC_CTX c;
| ^
src/lcrypto.c: In function ‘sign_pnew’:
src/lcrypto.c:747:61: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_MD_CTX’ {aka ‘struct evp_md_ctx_st’}
747 | EVP_MD_CTX *c = (EVP_MD_CTX *)lua_newuserdata(L, sizeof(EVP_MD_CTX));
| ^~~~~~~~~~
src/lcrypto.c: In function ‘sign_fsign’:
src/lcrypto.c:828:20: error: storage size of ‘c’ isn’t known
828 | EVP_MD_CTX c;
| ^
src/lcrypto.c: In function ‘verify_pnew’:
src/lcrypto.c:857:61: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_MD_CTX’ {aka ‘struct evp_md_ctx_st’}
857 | EVP_MD_CTX *c = (EVP_MD_CTX *)lua_newuserdata(L, sizeof(EVP_MD_CTX));
| ^~~~~~~~~~
src/lcrypto.c: In function ‘verify_fverify’:
src/lcrypto.c:940:20: error: storage size of ‘c’ isn’t known
940 | EVP_MD_CTX c;
| ^
src/lcrypto.c: In function ‘rand_pseudo_bytes’:
src/lcrypto.c:992:5: warning: ‘RAND_pseudo_bytes’ is deprecated [-Wdeprecated-declarations]
992 | return rand_do_bytes(L, RAND_pseudo_bytes);
| ^~~~~~
In file included from /usr/include/openssl/e_os2.h:13,
from /usr/include/openssl/err.h:13,
from src/lcrypto.c:7:
/usr/include/openssl/rand.h:44:1: note: declared here
44 | DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num))
| ^~~~~~~~~~~~~~~~~~
src/lcrypto.c: In function ‘pkey_generate’:
src/lcrypto.c:1064:9: warning: ‘RSA_generate_key’ is deprecated [-Wdeprecated-declarations]
1064 | RSA *rsa = RSA_generate_key(key_len, RSA_F4, NULL, NULL);
| ^~~
In file included from /usr/include/openssl/e_os2.h:13,
from /usr/include/openssl/err.h:13,
from src/lcrypto.c:7:
/usr/include/openssl/rsa.h:235:1: note: declared here
235 | DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void
| ^~~~~~~~~~~~~~~~~~
src/lcrypto.c:1074:9: warning: ‘DSA_generate_parameters’ is deprecated [-Wdeprecated-declarations]
1074 | DSA *dsa = DSA_generate_parameters(key_len, NULL, 0, NULL, NULL, NULL, NULL);
| ^~~
In file included from /usr/include/openssl/e_os2.h:13,
from /usr/include/openssl/err.h:13,
from src/lcrypto.c:7:
/usr/include/openssl/dsa.h:117:1: note: declared here
117 | DEPRECATEDIN_0_9_8(DSA *DSA_generate_parameters(int bits,
| ^~~~~~~~~~~~~~~~~~
src/lcrypto.c: In function ‘pkey_to_pem’:
src/lcrypto.c:1164:27: error: dereferencing pointer to incomplete type ‘struct evp_pkey_st’
1164 | if (private && pkey_st->type == EVP_PKEY_DSA)
| ^~
src/lcrypto.c: In function ‘pkey_tostring’:
src/lcrypto.c:1277:60: error: dereferencing pointer to incomplete type ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
1277 | sprintf(buf, "%s %s %d %p", LUACRYPTO_PKEYNAME, (*pkey)->type == EVP_PKEY_DSA ? "DSA" : "RSA", EVP_PKEY_bits(*pkey), pkey);
| ^~
src/lcrypto.c: In function ‘seal_pnew’:
src/lcrypto.c:1299:46: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_CIPHER_CTX’ {aka ‘struct evp_cipher_ctx_st’}
1299 | c->ctx = (EVP_CIPHER_CTX *)malloc(sizeof(EVP_CIPHER_CTX));
| ^~~~~~~~~~~~~~
In file included from src/lcrypto.c:8:
src/lcrypto.c: In function ‘seal_tostring’:
src/lcrypto.c:1320:81: error: dereferencing pointer to incomplete type ‘EVP_CIPHER_CTX’ {aka ‘struct evp_cipher_ctx_st’}
1320 | sprintf(s, "%s %p %s", LUACRYPTO_SEALNAME, (void *)c, EVP_CIPHER_name(c->ctx->cipher));
| ^~
src/lcrypto.c: In function ‘seal_fseal’:
src/lcrypto.c:1400:20: error: storage size of ‘ctx’ isn’t known
1400 | EVP_CIPHER_CTX ctx;
| ^~~
src/lcrypto.c: In function ‘open_pnew’:
src/lcrypto.c:1483:46: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_CIPHER_CTX’ {aka ‘struct evp_cipher_ctx_st’}
1483 | c->ctx = (EVP_CIPHER_CTX *)malloc(sizeof(EVP_CIPHER_CTX));
| ^~~~~~~~~~~~~~
src/lcrypto.c: In function ‘open_fopen’:
src/lcrypto.c:1602:20: error: storage size of ‘ctx’ isn’t known
1602 | EVP_CIPHER_CTX ctx;
| ^~~
Error: Failed installing dependency: https://luarocks.org/luacrypto-0.3.2-2.src.rock - Build error: Failed compiling object src/lcrypto.o
Now, how to proceed further to make it work.
The following solution worked for me:
sudo apt-get install libssl1.0-dev
Reference
Related
I am getting the following exception while building the recovery for a lineageos project and need some help diagnosing and resolving the issue
Device tree:= https://github.com/darran-kelinske-fivestars/android_device_lenovo_tb8504f/tree/lineage-15.1
Vendor tree:= https://github.com/darran-kelinske-fivestars/android_vendor_lenovo_tb8504f/tree/lineage-15.1
Kernel source:= https://github.com/darran-kelinske-fivestars/android_kernel_lenovo_tb8504f/tree/lineage-15.1
ROM Source:= https://github.com/LineageOS/android
Command: source build/envsetup.sh && breakfast tb8504f && repo sync --force-sync -q -j6 && mka recoveryimage -j6 | tee recovery.log
../../../../../../kernel/lenovo/msm8917/net/bridge/netfilter/ebtables.c: In function 'ebt_standard_compat_from_user':
../../../../../../kernel/lenovo/msm8917/net/bridge/netfilter/ebtables.c:61:3: error: implicit declaration of function 'xt_compat_calc_jump' [-Werror=implicit-function-declaration]
v += xt_compat_calc_jump(NFPROTO_BRIDGE, v);
^
../../../../../../kernel/lenovo/msm8917/net/bridge/netfilter/ebtables.c: At top level:
../../../../../../kernel/lenovo/msm8917/net/bridge/netfilter/ebtables.c:76:15: error: variable 'ebt_standard_target' has initializer but incomplete type
static struct xt_target ebt_standard_target = {
^
../../../../../../kernel/lenovo/msm8917/net/bridge/netfilter/ebtables.c:77:2: error: unknown field 'name' specified in initializer
.name = "standard",
^
../../../../../../kernel/lenovo/msm8917/net/bridge/netfilter/ebtables.c:77:2: warning: excess elements in struct initializer
error, forbidden warning: ebtables.c:77
CC net/core/gen_estimator.o
/home/lineageos/kernel/lenovo/msm8917/scripts/Makefile.build:257: recipe for target 'net/bridge/netfilter/ebtables.o' failed
make[4]: *** [net/bridge/netfilter/ebtables.o] Error 1
/home/lineageos/kernel/lenovo/msm8917/scripts/Makefile.build:402: recipe for target 'net/bridge/netfilter' failed
make[3]: *** [net/bridge/netfilter] Error 2
/home/lineageos/kernel/lenovo/msm8917/scripts/Makefile.build:402: recipe for target 'net/bridge' failed
make[2]: *** [net/bridge] Error 2
make[2]: *** Waiting for unfinished jobs....
Full log:
https://pastebin.com/v2ZsfRuc
I resolved this issue by replacing the source in the include directory of this project with the include directory of another project.
I replaced the source with the source from this directory:
https://github.com/HighwayStar/android_kernel_lenovo_tb8704/tree/tab4-8plus-LA.UM.5.6.r1-0/include
When I try to install the mysql2 adapter gem, I get this error:
gem install mysql2 -v 0.3.21
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/Users/jwan/.rbenv/versions/2.1.2/bin/ruby extconf.rb
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Using mysql_config at /usr/local/bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
-----
Setting rpath to /usr/local/Cellar/mysql/8.0.12/lib
-----
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling infile.c
compiling client.c
client.c:439:3: error: use of undeclared identifier 'my_bool'
my_bool res = mysql_read_query_result(client);
^
client.c:441:19: error: use of undeclared identifier 'res'
return (void *)(res == 0 ? Qtrue : Qfalse);
^
client.c:762:3: error: use of undeclared identifier 'my_bool'
my_bool boolval;
^
client.c:793:7: error: use of undeclared identifier 'boolval'
boolval = (value == Qfalse ? 0 : 1);
^
client.c:794:17: error: use of undeclared identifier 'boolval'
retval = &boolval;
^
client.c:797:10: error: use of undeclared identifier 'MYSQL_SECURE_AUTH'; did you mean 'MYSQL_DEFAULT_AUTH'?
case MYSQL_SECURE_AUTH:
^~~~~~~~~~~~~~~~~
MYSQL_DEFAULT_AUTH
/usr/local/Cellar/mysql/8.0.12/include/mysql/mysql.h:188:3: note: 'MYSQL_DEFAULT_AUTH' declared here
MYSQL_DEFAULT_AUTH,
^
client.c:798:7: error: use of undeclared identifier 'boolval'
boolval = (value == Qfalse ? 0 : 1);
^
client.c:799:17: error: use of undeclared identifier 'boolval'
retval = &boolval;
^
client.c:830:38: error: use of undeclared identifier 'boolval'
wrapper->reconnect_enabled = boolval;
^
client.c:1185:38: error: use of undeclared identifier 'MYSQL_SECURE_AUTH'; did you mean 'MYSQL_DEFAULT_AUTH'?
return _mysql_client_options(self, MYSQL_SECURE_AUTH, value);
^~~~~~~~~~~~~~~~~
MYSQL_DEFAULT_AUTH
/usr/local/Cellar/mysql/8.0.12/include/mysql/mysql.h:188:3: note: 'MYSQL_DEFAULT_AUTH' declared here
MYSQL_DEFAULT_AUTH,
^
10 errors generated.
make: *** [client.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/jwan/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mysql2-0.3.21 for inspection.
What does it mean and what is going on?
What does this line do: Setting rpath to /usr/local/Cellar/mysql/8.0.12/lib
Can I try pointing it to another version of mysql?
Because you're using an incomaptible version of the mysql2 gem for your rails version You have to make all the gem versions in your Gemfile a proper match One good way to do that is to google rubygems (gem name) versions and see it's runtime dependences and it's release date The release dates can be compared to the release dates of rails versions and other gems that it depends on When you're new it can take a little time
Installing Ruby/Rails/MySQL on a new MacBook Pro running OS High Sierra 10.13.6
I have Ruby version 2.1.4 installed via RVM (it's the version of Ruby used for this particular repo).
mysql is installed via brew:
mysql --version
mysql Ver 8.0.12 for osx10.13 on x86_64 (Homebrew)
Then running bundle install and everything looks good except the process breaks when it tries to install the mysql2 gem:
Fetching mysql2 0.3.17
Installing mysql2 0.3.17 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/Users/gregorybilello/.rvm/gems/ruby-2.1.4/gems/mysql2-0.3.17/ext/mysql2
/Users/gregorybilello/.rvm/rubies/ruby-2.1.4/bin/ruby -r
./siteconf20180926-52571-ppybdv.rb extconf.rb
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Using mysql_config at /usr/local/bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
-----
Setting rpath to /usr/local/Cellar/mysql/8.0.12/lib
-----
creating Makefile
current directory:
/Users/gregorybilello/.rvm/gems/ruby-2.1.4/gems/mysql2-0.3.17/ext/mysql2
make "DESTDIR=" clean
current directory:
/Users/gregorybilello/.rvm/gems/ruby-2.1.4/gems/mysql2-0.3.17/ext/mysql2
make "DESTDIR="
compiling infile.c
compiling client.c
client.c:359:33: warning: implicit conversion loses integer precision: 'long' to
'unsigned int' [-Wshorten-64-to-32]
elapsed_time = end_time - start_time;
~ ~~~~~~~~~^~~~~~~~~~~~
client.c:431:3: error: use of undeclared identifier 'my_bool'
my_bool res = mysql_read_query_result(client);
^
client.c:433:19: error: use of undeclared identifier 'res'
return (void *)(res == 0 ? Qtrue : Qfalse);
^
client.c:762:3: error: use of undeclared identifier 'my_bool'
my_bool boolval;
^
client.c:793:7: error: use of undeclared identifier 'boolval'
boolval = (value == Qfalse ? 0 : 1);
^
client.c:794:17: error: use of undeclared identifier 'boolval'
retval = &boolval;
^
client.c:797:10: error: use of undeclared identifier 'MYSQL_SECURE_AUTH'; did
you mean 'MYSQL_DEFAULT_AUTH'?
case MYSQL_SECURE_AUTH:
^~~~~~~~~~~~~~~~~
MYSQL_DEFAULT_AUTH
/usr/local/Cellar/mysql/8.0.12/include/mysql/mysql.h:188:3: note:
'MYSQL_DEFAULT_AUTH' declared here
MYSQL_DEFAULT_AUTH,
^
client.c:798:7: error: use of undeclared identifier 'boolval'
boolval = (value == Qfalse ? 0 : 1);
^
client.c:799:17: error: use of undeclared identifier 'boolval'
retval = &boolval;
^
client.c:830:38: error: use of undeclared identifier 'boolval'
wrapper->reconnect_enabled = boolval;
^
client.c:1163:56: warning: implicit conversion loses integer precision: 'size_t'
(aka 'unsigned long') to 'unsigned int' [-Wshorten-64-to-32]
mysql2rb = mysql2_mysql_enc_name_to_rb(charset_name, charset_name_len);
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~
client.c:1196:38: error: use of undeclared identifier 'MYSQL_SECURE_AUTH'; did
you mean 'MYSQL_DEFAULT_AUTH'?
return _mysql_client_options(self, MYSQL_SECURE_AUTH, value);
^~~~~~~~~~~~~~~~~
MYSQL_DEFAULT_AUTH
/usr/local/Cellar/mysql/8.0.12/include/mysql/mysql.h:188:3: note:
'MYSQL_DEFAULT_AUTH' declared here
MYSQL_DEFAULT_AUTH,
^
2 warnings and 10 errors generated.
make: *** [client.o] Error 1
make failed, exit code 2
Gem files will remain installed in
/Users/gregorybilello/.rvm/gems/ruby-2.1.4/gems/mysql2-0.3.17 for inspection.
Results logged to
/Users/gregorybilello/.rvm/gems/ruby-2.1.4/extensions/x86_64-darwin-17/2.1.0/mysql2-0.3.17/gem_make.out
An error occurred while installing mysql2 (0.3.17), and Bundler cannot
continue.
Make sure that `gem install mysql2 -v '0.3.17' --source 'https://rubygems.org/'`
succeeds before bundling.
In Gemfile:
mysql2
gregorybilello#Gregorys-MBP-2 portal (production) $ mysql --version
mysql Ver 8.0.12 for osx10.13 on x86_64 (Homebrew)
gregorybilello#Gregorys-MBP-2 portal (production) $ gem install mysql2 -v '0.3.17' -- --with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include
Building native extensions with: '--with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include'
This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
current directory: /Users/gregorybilello/.rvm/gems/ruby-2.1.4/gems/mysql2-0.3.17/ext/mysql2
/Users/gregorybilello/.rvm/rubies/ruby-2.1.4/bin/ruby -r ./siteconf20180926-53492-1uypkd1.rb extconf.rb --with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Using mysql_config at /usr/local/bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
-----
Setting rpath to /usr/local/Cellar/mysql/8.0.12/lib
-----
creating Makefile
current directory: /Users/gregorybilello/.rvm/gems/ruby-2.1.4/gems/mysql2-0.3.17/ext/mysql2
make "DESTDIR=" clean
current directory: /Users/gregorybilello/.rvm/gems/ruby-2.1.4/gems/mysql2-0.3.17/ext/mysql2
make "DESTDIR="
compiling infile.c
compiling client.c
client.c:359:33: warning: implicit conversion loses integer precision: 'long' to 'unsigned int' [-Wshorten-64-to-32]
elapsed_time = end_time - start_time;
~ ~~~~~~~~~^~~~~~~~~~~~
client.c:431:3: error: use of undeclared identifier 'my_bool'
my_bool res = mysql_read_query_result(client);
^
client.c:433:19: error: use of undeclared identifier 'res'
return (void *)(res == 0 ? Qtrue : Qfalse);
^
client.c:762:3: error: use of undeclared identifier 'my_bool'
my_bool boolval;
^
client.c:793:7: error: use of undeclared identifier 'boolval'
boolval = (value == Qfalse ? 0 : 1);
^
client.c:794:17: error: use of undeclared identifier 'boolval'
retval = &boolval;
^
client.c:797:10: error: use of undeclared identifier 'MYSQL_SECURE_AUTH'; did you mean 'MYSQL_DEFAULT_AUTH'?
case MYSQL_SECURE_AUTH:
^~~~~~~~~~~~~~~~~
MYSQL_DEFAULT_AUTH
/usr/local/Cellar/mysql/8.0.12/include/mysql/mysql.h:188:3: note: 'MYSQL_DEFAULT_AUTH' declared here
MYSQL_DEFAULT_AUTH,
^
client.c:798:7: error: use of undeclared identifier 'boolval'
boolval = (value == Qfalse ? 0 : 1);
^
client.c:799:17: error: use of undeclared identifier 'boolval'
retval = &boolval;
^
client.c:830:38: error: use of undeclared identifier 'boolval'
wrapper->reconnect_enabled = boolval;
^
client.c:1163:56: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Wshorten-64-to-32]
mysql2rb = mysql2_mysql_enc_name_to_rb(charset_name, charset_name_len);
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~
client.c:1196:38: error: use of undeclared identifier 'MYSQL_SECURE_AUTH'; did you mean 'MYSQL_DEFAULT_AUTH'?
return _mysql_client_options(self, MYSQL_SECURE_AUTH, value);
^~~~~~~~~~~~~~~~~
MYSQL_DEFAULT_AUTH
/usr/local/Cellar/mysql/8.0.12/include/mysql/mysql.h:188:3: note: 'MYSQL_DEFAULT_AUTH' declared here
MYSQL_DEFAULT_AUTH,
^
2 warnings and 10 errors generated.
make: *** [client.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/gregorybilello/.rvm/gems/ruby-2.1.4/gems/mysql2-0.3.17 for inspection.
Results logged to /Users/gregorybilello/.rvm/gems/ruby-2.1.4/extensions/x86_64-darwin-17/2.1.0/mysql2-0.3.17/gem_make.out
I'm sure I've done something wrong with the install, but any ideas of how to get this working? Thanks.
So I'm trying to run
rake db:migrate
and got the following error
rake aborted!
LoadError: dlopen(/Users/scott/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mysql2-0.4.5/lib/mysql2/mysql2.bundle, 9): Library not loaded: /usr/local/opt/mysql/lib/libmysqlclient.20.dylib
Referenced from: /Users/scott/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mysql2-0.4.5/lib/mysql2/mysql2.bundle
Reason: image not found - /Users/scott/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mysql2-0.4.5/lib/mysql2/mysql2.bundle
/Users/scott/Google Drive/playground/myApp/myApp/config/application.rb:21:in `<top (required)>'
/Users/scott/Google Drive/playground/myApp/myApp/Rakefile:4:in `<top (required)>'
I uninstalled mysql2 and then ran
gem install mysql2 -v '0.4.5'
and hit the following error....
git:(master) ✗ gem install mysql2 -v '0.4.5'
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
current directory: /Users/scott/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mysql2-0.4.5/ext/mysql2
/Users/scott/.rbenv/versions/2.4.1/bin/ruby -r ./siteconf20180709-8149-znoxt9.rb extconf.rb
checking for rb_absint_size()... yes
checking for rb_absint_singlebit_p()... yes
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
checking for rb_big_cmp()... yes
-----
Using mysql_config at /usr/local/mysql/bin/mysql_config
-----
checking for mysql.h... yes
checking for SSL_MODE_DISABLED in mysql.h... yes
checking for SSL_MODE_PREFERRED in mysql.h... yes
checking for SSL_MODE_REQUIRED in mysql.h... yes
checking for SSL_MODE_VERIFY_CA in mysql.h... yes
checking for SSL_MODE_VERIFY_IDENTITY in mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
-----
Setting rpath to /usr/local/mysql/lib
-----
creating Makefile
current directory: /Users/scott/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mysql2-0.4.5/ext/mysql2
make "DESTDIR=" clean
current directory: /Users/scott/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mysql2-0.4.5/ext/mysql2
make "DESTDIR="
compiling client.c
In file included from client.c:1:
In file included from ./mysql2_ext.h:41:
./result.h:24:3: error: unknown type name 'my_bool'
my_bool *is_null;
^
./result.h:25:3: error: unknown type name 'my_bool'
my_bool *error;
^
client.c:507:3: error: use of undeclared identifier 'my_bool'
my_bool res = mysql_read_query_result(client);
^
client.c:509:19: error: use of undeclared identifier 'res'
return (void *)(res == 0 ? Qtrue : Qfalse);
^
client.c:828:3: error: use of undeclared identifier 'my_bool'
my_bool boolval;
^
client.c:859:7: error: use of undeclared identifier 'boolval'
boolval = (value == Qfalse ? 0 : 1);
^
client.c:860:17: error: use of undeclared identifier 'boolval'
retval = &boolval;
^
client.c:863:10: error: use of undeclared identifier 'MYSQL_SECURE_AUTH'; did you mean 'MYSQL_DEFAULT_AUTH'?
case MYSQL_SECURE_AUTH:
^~~~~~~~~~~~~~~~~
MYSQL_DEFAULT_AUTH
/usr/local/mysql/include/mysql.h:188:3: note: 'MYSQL_DEFAULT_AUTH' declared here
MYSQL_DEFAULT_AUTH,
^
client.c:864:7: error: use of undeclared identifier 'boolval'
boolval = (value == Qfalse ? 0 : 1);
^
client.c:865:17: error: use of undeclared identifier 'boolval'
retval = &boolval;
^
client.c:896:38: error: use of undeclared identifier 'boolval'
wrapper->reconnect_enabled = boolval;
^
client.c:1285:38: error: use of undeclared identifier 'MYSQL_SECURE_AUTH'; did you mean 'MYSQL_DEFAULT_AUTH'?
return _mysql_client_options(self, MYSQL_SECURE_AUTH, value);
^~~~~~~~~~~~~~~~~
MYSQL_DEFAULT_AUTH
/usr/local/mysql/include/mysql.h:188:3: note: 'MYSQL_DEFAULT_AUTH' declared here
MYSQL_DEFAULT_AUTH,
^
12 errors generated.
make: *** [client.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/scott/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mysql2-0.4.5 for inspection.
Results logged to /Users/scott/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-15/2.4.0-static/mysql2-0.4.5/gem_make.out
I have tried adding the following to my .bash_profile like other suggestions
export DYLD_LIBRARY_PATH="/usr/local/mysql/lib:$DYLD_LIBRARY_PATH"
But no luck. I also have Mysql 8.0.11 running in the background..
Any ideas?
I am running following command to install mongrel (downgraded ruby to 1.8.7p302 for an app and when tried to do bundle create --local, it asks to install mysql which then asked for mongrel)
gem install win32-open3 -v '0.3.2'
(master) $ gem install mongrel -v '1.1.5'
Building native extensions. This could take a while...
ERROR: Error installing mongrel:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20150509-1034-1akenv5.rb extconf.rb
checking for main() in -lc... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling http11.c
http11.c: In function ‘http_field’:
http11.c:70:3: warning: format not a string literal and no format arguments [-Wformat-security]
VALIDATE_MAX_LENGTH(flen, FIELD_NAME);
^
http11.c:71:3: warning: format not a string literal and no format arguments [-Wformat-security]
VALIDATE_MAX_LENGTH(vlen, FIELD_VALUE);
^
http11.c:77:22: error: ‘struct RString’ has no member named ‘ptr’
for(ch = RSTRING(f)->ptr, end = ch + RSTRING(f)->len; ch < end; ch++) {
^
http11.c:77:50: error: ‘struct RString’ has no member named ‘len’
for(ch = RSTRING(f)->ptr, end = ch + RSTRING(f)->len; ch < end; ch++) {
^
http11.c:77:27: warning: left-hand operand of comma expression has no effect [-Wunused-value]
for(ch = RSTRING(f)->ptr, end = ch + RSTRING(f)->len; ch < end; ch++) {
^
http11.c: In function ‘request_uri’:
http11.c:102:3: warning: format not a string literal and no format arguments [-Wformat-security]
VALIDATE_MAX_LENGTH(length, REQUEST_URI);
^
http11.c: In function ‘fragment’:
http11.c:113:3: warning: format not a string literal and no format arguments [-Wformat-security]
VALIDATE_MAX_LENGTH(length, FRAGMENT);
^
http11.c: In function ‘request_path’:
http11.c:124:3: warning: format not a string literal and no format arguments [-Wformat-security]
VALIDATE_MAX_LENGTH(length, REQUEST_PATH);
^
http11.c: In function ‘query_string’:
http11.c:135:3: warning: format not a string literal and no format arguments [-Wformat-security]
VALIDATE_MAX_LENGTH(length, QUERY_STRING);
^
In file included from /usr/include/string.h:635:0,
from /usr/local/rvm/rubies/ruby-2.1.5/include/ruby-2.1.0/ruby/defines.h:45,
from /usr/local/rvm/rubies/ruby-2.1.5/include/ruby-2.1.0/ruby/ruby.h:29,
from /usr/local/rvm/rubies/ruby-2.1.5/include/ruby-2.1.0/ruby.h:33,
from http11.c:5:
http11.c: In function ‘header_done’:
http11.c:172:33: error: ‘struct RString’ has no member named ‘ptr’
colon = strchr(RSTRING(temp)->ptr, ':');
^
http11.c:172:33: error: ‘struct RString’ has no member named ‘ptr’
colon = strchr(RSTRING(temp)->ptr, ':');
^
http11.c:172:33: error: ‘struct RString’ has no member named ‘ptr’
colon = strchr(RSTRING(temp)->ptr, ':');
^
http11.c:174:89: error: ‘struct RString’ has no member named ‘ptr’
rb_hash_aset(req, global_server_name, rb_str_substr(temp, 0, colon - RSTRING(temp)->ptr));
^
http11.c:176:52: error: ‘struct RString’ has no member named ‘ptr’
rb_str_substr(temp, colon - RSTRING(temp)->ptr+1,
^
http11.c:177:26: error: ‘struct RString’ has no member named ‘len’
RSTRING(temp)->len));
^
http11.c: In function ‘HttpParser_execute’:
http11.c:298:23: error: ‘struct RString’ has no member named ‘ptr’
dptr = RSTRING(data)->ptr;
^
http11.c:299:23: error: ‘struct RString’ has no member named ‘len’
dlen = RSTRING(data)->len;
^
http11.c:307:5: warning: format not a string literal and no format arguments [-Wformat-security]
VALIDATE_MAX_LENGTH(http_parser_nread(http), HEADER);
^
make: *** [http11.o] Error 1
make failed, exit code 2
Gem files will remain installed in /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/mongrel-1.1.5 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.1.5#rails4/extensions/x86_64-linux/2.1.0/mongrel-1.1.5/gem_make.out
Go cd to /usr/local/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5/ext/http11
and Use sudo nano or vi on http11.c and:
replace line 77 with
for(ch = RSTRING_PTR(f), end = ch + RSTRING_LEN(f); ch < end; ch++) {
And then
replace line 172 with
colon = strchr(RSTRING_PTR(temp), ':');
replace line 174 with
rb_hash_aset(req, global_server_name, rb_str_substr(temp, 0, colon - RSTRING_PTR(temp)));
replce line 176,177
rb_str_substr(temp, colon - RSTRING_PTR(temp)+1,
RSTRING_LEN(temp)));
replace lines 298 299
dptr = RSTRING_PTR(data);
dlen = RSTRING_LEN(data);
save the file,
sudo ruby extconf.rb && sudo make && sudo make install
Go cd ../../lib/mongrel
(or the full path “/usr/local/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5/lib/mongrel”
sudo nano handlers.rb
To fix the case statements in
On lines 208-212, change instances of “: false” to “then false”
Then sudo gem install mongrel if that build fails simply
go with the second option like this
You Can Force To Install mongrel like this
sudo gem install mongrel -v 1.2.0.pre2 -- --with-cflags=\"-O2 -pipe -march=native -w\"
This Works For Me hope t will work for you too.