Using Mkmf to Verify Libraries

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

Steven Hansen wrote:

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

I have two identical machines.

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

On machine 1:
find_library(‘mysqlclient’, ‘mysql_query’, ‘/path/to/lib’) => true
On machine 2:
find_library(‘mysqlclient’, ‘mysql_query’, ‘/path/to/lib’) => false
libmysqlclient.a is installed in the exact same location on both
machines.

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

Same md5 doesn't mean identical.

···

2006/12/6, vincent.fourmond@9online.fr <vincent.fourmond@9online.fr>:

> I have two identical machines.

Careful, 'identical' means the md5sum of all disks match

--
Michel Casabianca

Daniel and Vince, thanks for the leads. :slight_smile:

Regards,
Steven

···

vincent.fourmond@9online.fr wrote:

> I have two identical machines.

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

> On machine 1:
> find_library('mysqlclient', 'mysql_query', '/path/to/lib') => true
> On machine 2:
> find_library('mysqlclient', 'mysql_query', '/path/to/lib') => false
> libmysqlclient.a is installed in the exact same location on both
> machines.

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