Bug 1112139
Summary: | gem install mysql failed when ruby scalable app with mysql-5.5 | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Brenton Leanhardt <bleanhar> |
Component: | ImageStreams | Assignee: | Brenton Leanhardt <bleanhar> |
Status: | CLOSED ERRATA | QA Contact: | libra bugs <libra-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 2.1.0 | CC: | adellape, bleanhar, bparees, cryan, gpei, gusun, jhadvig, jialiu, jokerman, libra-onpremise-devel, mfojtik, mmccomas, wjiang, yanpzhan |
Target Milestone: | --- | Keywords: | Upstream |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | openshift-origin-cartridge-ruby-1.23.3.7-1.el6op | Doc Type: | Bug Fix |
Doc Text: |
Due to an incompatibility between Red Hat Software Collections (SCL) packages, the mysql gem, and the Ruby cartridge, gem installations would fail in applications with Ruby and mysql-5.5 cartridges. This bug fix introduces a workaround to the Ruby cartridge that points bundler to the correct version of libmysqlclient until the MySQL 5.5 SCL is updated. After applying this fix, a cartridge upgrade is required.
|
Story Points: | --- |
Clone Of: | 1109645 | Environment: | |
Last Closed: | 2014-10-02 13:59:32 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1109645 | ||
Bug Blocks: |
Description
Brenton Leanhardt
2014-06-23 08:29:58 UTC
The bug exsits on OpenShiftEnterpriseErrata/2.1.z/2014-08-13.1. When in a scalable ruby app with mysql-5.5 added, do gem install mysql, will have the same error: [srb19-domtest.ose21z-new.com 53edb797029dac9ba6000032]\> gem install mysql -v '2.9.1' Fetching: mysql-2.9.1.gem (100%) Building native extensions. This could take a while... ERROR: Error installing mysql: ERROR: Failed to build gem native extension. /opt/rh/ruby193/root/usr/bin/ruby extconf.rb checking for mysql_ssl_set()... *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. …… <--snip--> Check log in file .gem/gems/mysql-2.9.1/ext/mysql_api/mkmf.log : "gcc -o conftest -I/opt/rh/ruby193/root/usr/include/x86_64-linux -I/opt/rh/ruby193/root/usr/include/ruby/backward -I/opt/rh/ruby193/root/usr/include -I. -I/opt/rh/mysql55/root/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC -fPIC -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fPIC conftest.c -L. -L/opt/rh/ruby193/root/usr/lib64 -L. -rdynamic -Wl,-export-dynamic -m64 -L/opt/rh/mysql55/root/usr/lib64/mysql -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl -lruby -lpthread -lrt -ldl -lcrypt -lm -lc" /usr/bin/ld: cannot find -lmysqlclient Hi Brenton, Could you merge this fix into enterprise from upstream ASAP? Upstream commits: commit fb5d46ad01ab9d698404f42fd7f2099dd79a704b Author: jhadvig <jhadvig> Date: Thu Jun 19 09:59:44 2014 +0200 Bug 1109645: Setting mysql2 variable for bundler commit 2068d7d9af300b933c7cb05373bce3dcd0c895cd Author: Michal Fojtik <mfojtik> Date: Mon Jun 23 10:01:13 2014 +0200 Bug 1109645 - Fix the wrong path of libmysqlclient for Ruby 1.8 Verify this bug with openshift-origin-cartridge-ruby-1.23.3.7-1.el6op.noarch on puddle 2.1.z/2014-09-12.1 gem install mysql could work well with both scalable ruby-1.8 and ruby-1.9 cartridge. 1. create one scalable ruby app with cartridge mysql-5.5 rhc app create r19smy55 ruby-1.9 mysql-5.5 -s 2. add Gemfile and Gemfile.lock as below to app repo $ cat Gemfile source 'http://rubygems.org' gem 'sinatra' gem 'mysql' $ cat Gemfile.lock GEM remote: http://rubygems.org/ specs: mysql (2.9.1) rack (1.5.2) rack-protection (1.5.3) rack sinatra (1.4.5) rack (~> 1.4) rack-protection (~> 1.4) tilt (~> 1.3, >= 1.3.4) tilt (1.4.1) PLATFORMS ruby DEPENDENCIES mysql sinatra 3. git push git add .; git commit -am "test"; git push ... remote: Fetching gem metadata from http://rubygems.org/.......... remote: Installing mysql (2.9.1) remote: Installing rack (1.5.2) remote: Installing rack-protection (1.5.3) remote: Installing tilt (1.4.1) remote: Installing sinatra (1.4.5) remote: Using bundler (1.3.5) remote: Cannot write a changed lockfile while frozen. remote: Your bundle is complete! ... Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-1353.html |