Using Mkmf to Verify Libraries

S

Steven Hansen

Hi,

I'm trying to use the 'mkmf' library to determine if a given library is
installed.

I have two identical machines.

On machine 1:
find_library('mysqlclient', 'mysql_query', '/path/to/lib') => true


On machine 2:
find_library('mysqlclient', 'mysql_query', '/path/to/lib') => false


I'm stumped. Does anyone have any idea what could be causing this?

libmysqlclient.a is installed in the exact same location on both machines.

Regards,
Steven
 
D

Daniel Berger

Steven said:
Hi,

I'm trying to use the 'mkmf' library to determine if a given library is
installed.

I have two identical machines.

On machine 1:
find_library('mysqlclient', 'mysql_query', '/path/to/lib') => true


On machine 2:
find_library('mysqlclient', 'mysql_query', '/path/to/lib') => false


I'm stumped. Does anyone have any idea what could be causing this?

libmysqlclient.a is installed in the exact same location on both machines.

The last time I hit a similar situation it turned out I didn't have read
permissions on the library I was looking for. That may be it.

Regards,

Dan
 
S

Steven Hansen

Careful, 'identical' means the md5sum of all disks match and the
hardware is the same. That's hard ;-)...


There are several things that could be causing this. First, are you
sure that the rbconfig.rb files are the same in both machines ? There
are several path stored in this file. Moreover, mkmf is aware of some
environment variables. Check first that
set
and
ruby -r rbconfig -e 'p Config::CONFIG'
gives you the same things. If not, it should be easy to track the problem.

Cheers,

Vince

Daniel and Vince, thanks for the leads. :)

Regards,
Steven
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top