Hi Grant,
I further investigated the issue and found out that the difference was not which user I used to build the driver, but how I invoked extconf.rb.
I invoked extconf.rb as per README yesterday:
Code:
$ ruby -r mkmf extconf.rb --with-ingres-include='/opt/ingres/ingres/files/' --with-ingres-lib='/opt/ingres/ingres/lib'
Start extconf.rb
Using supplied directories:
Headers - /opt/ingres/ingres/files/
Libraries - /opt/ingres/ingres/lib
checking for iiapi.h... yes
checking for main() in -liiapi... yes
creating Makefile
$ make
cc -I. -I. -I/usr/lib/ruby/1.8/i486-linux -I. -DHAVE_IIAPI_H -I/opt/ingres/ingres/files/ -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -c Ingres.c
Ingres.c: In function âgetColumnNamesAndTypesâ:
Ingres.c:1982: warning: cast from pointer to integer of different size
cc -shared -o Ingres.so Ingres.o -L"." -L"/usr/lib" -L"/opt/ingres/ingres/lib" -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8 -liiapi -lpthread -ldl -lcrypt -lm -lc
$ ldd Ingres.so
linux-gate.so.1 => (0xb7ee7000)
libruby1.8.so.1.8 => /usr/lib/libruby1.8.so.1.8 (0xb7dd7000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7dbf000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7dba000)
libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0xb7d88000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7d63000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7c14000)
/lib/ld-linux.so.2 (0xb7ee8000)
However, I invoked it as per your output today:
Code:
$ ruby extconf.rb
Start extconf.rb
Using II_SYSTEM=/opt/ingres
checking for iiapi.h... yes
checking for main() in -liiapi... yes
creating Makefile
$ make
cc -I. -I. -I/usr/lib/ruby/1.8/i486-linux -I. -DHAVE_IIAPI_H -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -I/opt/ingres/ingres/files -c Ingres.c
Ingres.c: In function âgetColumnNamesAndTypesâ:
Ingres.c:1982: warning: cast from pointer to integer of different size
cc -shared -o Ingres.so Ingres.o -L"." -L"/usr/lib" -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -L/opt/ingres/ingres/lib -lq.1 -lcompat.1 -lframe.1 -lrt -liiapi.1 -lruby1.8 -liiapi -lpthread -ldl -lcrypt -lm -lc
$ ldd Ingres.so
linux-gate.so.1 => (0xb7fba000)
libq.1.so => /opt/ingres/ingres/lib/libq.1.so (0xb7e29000)
libcompat.1.so => /opt/ingres/ingres/lib/libcompat.1.so (0xb7cdd000)
libframe.1.so => /opt/ingres/ingres/lib/libframe.1.so (0xb7bce000)
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7bc1000)
libiiapi.1.so => /opt/ingres/ingres/lib/libiiapi.1.so (0xb7b8e000)
libruby1.8.so.1.8 => /usr/lib/libruby1.8.so.1.8 (0xb7abe000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7aa6000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7aa1000)
libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0xb7a6f000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7a4a000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb78fb000)
/lib/ld-linux.so.2 (0xb7fbb000)
As you can see, library related parameters to GCC are different in both cases. Is this a bug in extconf.rb? Perhaps you could update the README so that users run just "ruby extconf.rb" first and then to try to override library paths if necessary?
Thanks
Best Regards
Anton