I've got a minor problem when building Oracle support on a Solaris system. Apparently the oracle libraries come in both 32 and 64 bit flavor, with 64 being the default. The problem is that when building a 32 bit binary, the link fails because the wrong library gets linked. By editing the module's makefile and pointing to lib32 for the oracle libraries the problem goes away. The question is, is there any way to know whether we're building 32 or 64 bit binaris, so that we can make the appropriate choice?
Bill
In the last episode (Apr 15), Bill Welliver said:
I've got a minor problem when building Oracle support on a Solaris system. Apparently the oracle libraries come in both 32 and 64 bit flavor, with 64 being the default. The problem is that when building a 32 bit binary, the link fails because the wrong library gets linked. By editing the module's makefile and pointing to lib32 for the oracle libraries the problem goes away. The question is, is there any way to know whether we're building 32 or 64 bit binaris, so that we can make the appropriate choice?
Solaris itself has a convention that 32-bit libraries are in the main lib directory, and 64-bit ones are in a sparcv9 subdirectory. Too bad Oracle doesn't follow it :) You could probably test the size of a long, and select your library directory based on that.
A better test might be to link a minimal program and check if the generated binary starts with "\177ELF\2". Or use /usr/bin/file.
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
Previous text:
2004-04-15 19:58: Subject: Re: oracle and 32/64 bit binaris
In the last episode (Apr 15), Bill Welliver said:
I've got a minor problem when building Oracle support on a Solaris system. Apparently the oracle libraries come in both 32 and 64 bit flavor, with 64 being the default. The problem is that when building a 32 bit binary, the link fails because the wrong library gets linked. By editing the module's makefile and pointing to lib32 for the oracle libraries the problem goes away. The question is, is there any way to know whether we're building 32 or 64 bit binaris, so that we can make the appropriate choice?
Solaris itself has a convention that 32-bit libraries are in the main lib directory, and 64-bit ones are in a sparcv9 subdirectory. Too bad Oracle doesn't follow it :) You could probably test the size of a long, and select your library directory based on that.
-- Dan Nelson dnelson@allantgroup.com
/ Brevbäraren
pike-devel@lists.lysator.liu.se