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:
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
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.
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