I installed some native libraries in /usr/local/lib.
I am now trying to install a gem which needs these in order to build correctly but, the gem build fails as it cannot find the libraries.
The gem's extconf.rb file tries to confirm it can find the library with
have_library()
but this fails for some reason.
I tried setting a bunch of environment variables but nothing seems to work:
irb(main):003:0> require 'mkmf'
=> true
irb(main):004:0> have_library('gecodesearch')
checking for main() in -lgecodesearch... no
=> false
irb(main):005:0> ENV['LD_LIBRARY_PATH']='/usr/local/lib'
=> "/usr/local/lib"
irb(main):006:0> have_library('gecodesearch')
checking for main() in -lgecodesearch... no
=> false
irb(main):007:0> ENV['DYLD_LIBRARY_PATH']='/usr/local/lib'
=> "/usr/local/lib"
irb(main):008:0> have_library('gecodesearch')
checking for main() in -lgecodesearch... no
=> false
irb(main):009:0> have_library('libgecodesearch')
checking for main() in -llibgecodesearch... no
=> false
irb(main):010:0> ENV['C_INCLUDE_PATH']='/usr/local/lib'
=> "/usr/local/lib"
irb(main):011:0> have_library('gecodesearch')
checking for main() in -lgecodesearch... no
=> false
irb(main):012:0> ENV['PATH']='/usr/local/lib'
=> "/usr/local/lib"
irb(main):013:0> have_library('gecodesearch')
checking for main() in -lgecodesearch... no
=> false
What is the best way to solve this problem?