# Install\_gems fails when compiling mysql.c

**URL:** <https://forum.opennebula.io/t/install-gems-fails-when-compiling-mysql-c/7348>\
**Category:** Product Support\
**Created:** [June 16, 2019, 5:36am UTC](https://forum.opennebula.io/t/install-gems-fails-when-compiling-mysql-c/7348 "2019-06-16T05:36:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmoritomo](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@mmoritomo](https://forum.opennebula.io/u/mmoritomo)\
**Post date:** [June 16, 2019, 5:36am UTC](https://forum.opennebula.io/t/install-gems-fails-when-compiling-mysql-c/7348/1 "2019-06-16T05:36:07Z")

</div>

compiling mysql.c fails when running: /usr/share/one/install\_gems

checking for mysql.h… yes  
creating Makefile

current directory: /usr/local/rvm/gems/ruby-2.5.5/gems/mysql-2.9.1/ext/mysql\_api  
make “DESTDIR=” clean

current directory: /usr/local/rvm/gems/ruby-2.5.5/gems/mysql-2.9.1/ext/mysql\_api  
make “DESTDIR=”  
compiling mysql.c  
mysql.c: In function ‘stmt\_bind\_result’:  
mysql.c:1320:74: error: ‘rb\_cFixnum’ undeclared (first use in this function); did you mean ‘rb\_isalnum’?  
else if (argv[i] == rb\_cNumeric || argv[i] == rb\_cInteger || argv[i] == rb\_cFixnum)  
^ ~~~~~~~~~  
rb\_isalnum  
mysql.c:1320:74: note: each undeclared identifier is reported only once for each function it appears in

* * *

\*\*Versions:

# ruby -v

ruby 2.5.5p157 (2019-03-15 revision 67260) [x86\_64-linux]  
root@s1:/var/log/one# rvm list  
=\* ruby-2.5.5 [x86\_64]  
root@s1:/var/log/one# gem list

\*\*\* LOCAL GEMS \*\*\*

addressable (2.6.0)  
amazon-ec2 (0.9.17)  
aws-sdk (1.33.0)  
azure (0.7.10)  
azure-core (0.1.15)  
bigdecimal (default: 1.3.4)  
builder (3.2.3)  
bundler (default: 1.16.6)  
bundler-unload (1.0.2)  
cmath (default: 1.0.0)  
configparser (0.1.7)  
csv (default: 1.0.0)  
curb (0.9.10)  
daemons (1.3.1)  
date (default: 1.0.0)  
did\_you\_mean (1.2.0)  
etc (default: 1.0.0)  
eventmachine (1.2.7)  
executable-hooks (1.6.0)  
faraday (0.15.4)  
faraday\_middleware (0.13.1)  
fcntl (default: 1.0.0)  
fiddle (default: 1.0.0)  
fileutils (default: 1.0.2)  
gdbm (default: 2.0.0)  
gem-wrappers (1.4.0)  
hashie (3.6.0)  
inflection (1.0.0)  
io-console (default: 0.4.6)  
ipaddr (default: 1.2.0)  
json (default: 2.1.0, 1.8.6)  
mime-types (3.2.2)  
mime-types-data (3.2019.0331)  
mini\_portile2 (2.4.0)  
minitest (5.10.3)  
multipart-post (2.1.1)  
mustermann (1.0.3)  
mysql2 (0.5.2)  
net-ldap (0.16.1)  
net-telnet (0.1.1)  
nokogiri (1.10.3)  
openssl (default: 2.1.2)  
ox (2.11.0)  
parse-cron (0.1.4)  
polyglot (0.3.5)  
power\_assert (1.1.1)  
psych (default: 3.0.2)  
public\_suffix (3.1.0)  
rack (2.0.7)  
rack-protection (2.0.5)  
rake (12.3.0)  
rdoc (default: 6.0.1)  
rubygems-bundler (1.4.5)  
rvm (1.11.3.9)  
scanf (default: 1.0.0)  
sdbm (default: 1.0.0)  
sequel (5.21.0)  
sinatra (2.0.5)  
softlayer\_api (3.2.3)  
sqlite3 (1.4.1)  
stringio (default: 0.0.1)  
strscan (default: 1.0.0)  
systemu (2.6.5)  
test-unit (3.2.7)  
thin (1.7.2)  
thor (0.20.3)  
tilt (2.0.9)  
treetop (1.6.10)  
trollop (2.9.9)  
uuidtools (2.1.5)  
webrick (default: 1.4.2)  
xml-simple (1.1.5)  
xmlrpc (0.3.0)  
zendesk\_api (1.19.0)  
zlib (default: 1.0.0)

DISTRIB\_DESCRIPTION=“Ubuntu 18.04.2 LTS”  
VERSION=“18.04.2 LTS (Bionic Beaver)”

**Steps to reproduce:**  
Very start of the installation:  
as root: /usr/share/one/install\_gems

**Current results:**  
I can only assume that since the above will not compile it maybe causing the following error:  
/var/log/one/oned.log  
…  
Sat Jun 15 22:14:49 2019 [Z0][MAD][E]: MAD did not answer INIT command  
Sat Jun 15 22:14:49 2019 [Z0][ONE][E]: Could not load driver  
…

**Expected results:**  
I expected NOT to have the following error:  
root@s1:/var/log/one# more /usr/local/rvm/gems/ruby-2.5.5/extensions/x86\_64-linux/2.5.0/mysql-2.9.1/gem\_make.out  
current directory: /usr/local/rvm/gems/ruby-2.5.5/gems/mysql-2.9.1/ext/mysql\_api  
/usr/local/rvm/rubies/ruby-2.5.5/bin/ruby -r ./siteconf20190615-37938-1m55l1.rb extconf.rb  
checking for mysql\_ssl\_set()… yes  
checking for rb\_str\_set\_len()… yes  
checking for rb\_thread\_start\_timer()… no  
checking for mysql.h… yes  
creating Makefile

current directory: /usr/local/rvm/gems/ruby-2.5.5/gems/mysql-2.9.1/ext/mysql\_api  
make “DESTDIR=” clean

current directory: /usr/local/rvm/gems/ruby-2.5.5/gems/mysql-2.9.1/ext/mysql\_api  
make “DESTDIR=”  
compiling mysql.c  
mysql.c: In function ‘stmt\_bind\_result’:  
mysql.c:1320:74: error: ‘rb\_cFixnum’ undeclared (first use in this function); did you mean ‘rb\_isalnum’?  
else if (argv[i] == rb\_cNumeric || argv[i] == rb\_cInteger || argv[i] == rb\_cFixnum)  
^ ~~~~~~~~~  
rb\_isalnum  
mysql.c:1320:74: note: each undeclared identifier is reported only once for each function it appears in  
mysql.c: At top level:  
cc1: warning: unrecognized command line option ‘-Wno-self-assign’  
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’  
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’  
Makefile:241: recipe for target ‘mysql.o’ failed  
make: \*\*\* [mysql.o] Error 1

make failed, exit code 2
