MySQL shared library error with Ruby on Rails

rails
ruby
mysql

#1

Hi, I’m getting this issue appearing at the point of test database creation.

I’m not using a circle.yml.

The ‘undefined symbol’ changes on each build, but always is prefixed with __asan.

Anyone else seen this, or know what to do about it?

export RAILS_ENV="test"
export RACK_ENV="test"
bundle exec rake db:create db:schema:load --trace
rake aborted!
LoadError: /home/ubuntu/romantica-admin/vendor/bundle/ruby/2.3.0/gems/mysql2-0.4.1/lib/mysql2/mysql2.so: undefined symbol: __asan_unregister_globals - /home/ubuntu/romantica-admin/vendor/bundle/ruby/2.3.0/gems/mysql2-0.4.1/lib/mysql2/mysql2.so
/home/ubuntu/romantica-admin/vendor/bundle/ruby/2.3.0/gems/mysql2-0.4.1/lib/mysql2.rb:31:in `require'
/home/ubuntu/romantica-admin/vendor/bundle/ruby/2.3.0/gems/mysql2-0.4.1/lib/mysql2.rb:31:in `<top (required)>'
/opt/circleci/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `require'
/opt/circleci/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `block (2 levels) in require'
/opt/circleci/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `each'
/opt/circleci/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `block in require'
/opt/circleci/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `each'
/opt/circleci/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `require'
/opt/circleci/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler.rb:102:in `require'
/home/ubuntu/romantica-admin/config/application.rb:7:in `<top (required)>'
/home/ubuntu/romantica-admin/Rakefile:4:in `require_relative'
/home/ubuntu/romantica-admin/Rakefile:4:in `<top (required)>'
/home/ubuntu/romantica-admin/vendor/bundle/ruby/2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load'
/home/ubuntu/romantica-admin/vendor/bundle/ruby/2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/home/ubuntu/romantica-admin/vendor/bundle/ruby/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:686:in `raw_load_rakefile'
/home/ubuntu/romantica-admin/vendor/bundle/ruby/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:96:in `block in load_rakefile'
/home/ubuntu/romantica-admin/vendor/bundle/ruby/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling'
/home/ubuntu/romantica-admin/vendor/bundle/ruby/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:95:in `load_rakefile'
/home/ubuntu/romantica-admin/vendor/bundle/ruby/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:79:in `block in run'
/home/ubuntu/romantica-admin/vendor/bundle/ruby/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling'
/home/ubuntu/romantica-admin/vendor/bundle/ruby/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:77:in `run'
/home/ubuntu/romantica-admin/vendor/bundle/ruby/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/home/ubuntu/romantica-admin/vendor/bundle/ruby/2.3.0/bin/rake:23:in `load'
/home/ubuntu/romantica-admin/vendor/bundle/ruby/2.3.0/bin/rake:23:in `<top (required)>'
/opt/circleci/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:63:in `load'
/opt/circleci/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:63:in `kernel_load'
/opt/circleci/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:24:in `run'
/opt/circleci/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/cli.rb:304:in `exec'
/opt/circleci/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/opt/circleci/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/opt/circleci/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/opt/circleci/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/opt/circleci/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/cli.rb:11:in `start'
/opt/circleci/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/exe/bundle:27:in `block in <top (required)>'
/opt/circleci/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/friendly_errors.rb:98:in `with_friendly_errors'
/opt/circleci/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/exe/bundle:19:in `<top (required)>'
/opt/circleci/.rvm/gems/ruby-2.3.1/bin/bundle:23:in `load'
/opt/circleci/.rvm/gems/ruby-2.3.1/bin/bundle:23:in `<main>'
/home/ubuntu/romantica-admin/vendor/bundle/ruby/2.3.0/bin/rake: symbol lookup error: /home/ubuntu/romantica-admin/vendor/bundle/ruby/2.3.0/gems/mysql2-0.4.1/lib/mysql2/mysql2.so: undefined symbol: __asan_unregister_globals

export RAILS_ENV="test"
export RACK_ENV="test"
bundle exec rake db:create db:schema:load --trace
 returned exit code 127

Action failed: rake db:create db:schema:load

#2