Bug 1040065 - Unable to compile mysql2 ruby gem with MySQL 5.5 (SCL)
Summary: Unable to compile mysql2 ruby gem with MySQL 5.5 (SCL)
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OKD
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Michal Fojtik
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-10 16:08 UTC by Michal Fojtik
Modified: 2015-05-15 02:21 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-10 16:43:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Michal Fojtik 2013-12-10 16:08:03 UTC
Description of problem:

When testing a MySQL 5.5 cartridge, I found that users are not able to
compile the mysql2 gem (required by Rails) due to missing 'libmysqlclient'

The 'libmysqlclient' is not included in SCL, intentionaly, because SCL team
wants users to compile their clients against the system libmysqlclient.

The problem is that mysql_config script that 'mysql2' execute during
the gem build, reports the MySQL directory from SCL...


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Prepare devenv with mysql55 SCL installed and with this PR synced: https://github.com/openshift/origin-server/pull/4299
2. rhc app create rails01 ruby-1.9
3. rhc add-cartridge mysql-5.5 --app rails01
4. Follow the steps described in rails quickstart
5. git push

Actual results:
 remote: gcc -shared -o mysql2.so client.o mysql2_ext.o result.o -L. -L/opt/rh/ruby193/root/usr/lib64 -L. -rdynamic 
                -Wl,-export-dynamic -Wl,-rpath,/opt/rh/mysql55/root/usr/lib64/mysql  -m64  -lruby -L/opt/rh/mysql55/root/usr/lib64/mysql 
                -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl  -lpthread -lrt -ldl -lcrypt -lm   -lc
remote: /usr/bin/ld: cannot find -lmysqlclient



Expected results:


Additional info:

Comment 1 Michal Fojtik 2013-12-10 16:17:01 UTC
Note: The

 -L/opt/rh/mysql55/root/usr/lib64/mysql -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl  -lpthread -lrt -ldl -lcrypt -lm   -lc

is produced by mysql_config... The easiest solution would be to overide this to point into /usr/lib64/mysql

Comment 2 Michal Fojtik 2013-12-10 16:43:22 UTC
The problem was found in the PR, where we set the OPENSHIFT_MYSQL_PATH_ELEMENT to point into SCL directory, which also include the mysql_config script. Removing this solved this problem.

Comment 3 openshift-github-bot 2013-12-11 18:32:02 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/edb7b7b3902def2375b5db613ed0832876aae466
Bug 1040065 - Disabled OPENSHIFT_MYSQL_PATH_ELEMENT via SCL


Note You need to log in before you can comment on or make changes to this bug.