Actually the solution is interesting.
When running DB2setup on an Opteron it actually installs DB2 as a 32
bit application. Because of this it tried to compile a stored
procedure it wanted to compile it as 32 bit. The 32 bit libraries did
not exist.
It is not in the IBM documentation, but you need to do a db2iupdt -w
64 <instance> to change DB2 to 64 bit. Now if you look at the
db2iupdt -h it will tell you that the -w parm is only valid for AIX or
Solaris, in this case it is valid for Linux as well. Once you update
the instance, you'll be running 64 bit and the compiles will work
correctly.
I found this documented through AMD and not IBM. (It may be there, I
just never found it). If you are curious what you are running do a
db2level command to find out.
jb
amurchis <am******@ca.ibm.com> wrote in message news:<41********@news3.prserv.net>...
I believe there are some issues with using GNU compilers (ie, gcc) to
create DB2 stored procedure libraries. It's not that they can't be
used, but I believe they require some additional tweaking (ie, compiler
options) if you want to them to create binary files that DB2 can load.
Please don't hold me to that (it may be platform specific, ie, Windows
not Linux), but it's worth looking into.
Norbert Munkel wrote:
Hi again,
Norbert Munkel wrote:
We have recently installed DB2 8.1.6 on an Opteron with RHEL AS 3.3
for evaluation. We have run into a problem compiling Procs. The
compile fails looking for ctri.o. I believe the compile is looking in
/usr/lib, but the file actually exists in /usr/lib64. I haven't been
able to find where to change things so the compile will look in the
right lib. Is this parameter driven or should I change it with some
links?
have you checked "/etc/ld.so.conf" ? /usr/lib64 should be in there. If
not, insert it and run ldconfig.
I checked the gcc manual and /etc/ld.so.conf is possibly not the point.
I don't know that much about c-compilers but if you are using gcc,
man gcc
should give you some options to specify libs and lib-directories.
Options I would have a look at are
-l and -L
From the Environment Section:
LIBRARY_PATH
so maybee
export LIBRARY_PATH=/usr/lib64:$LIBRARY_PATH
would do the job.
(check with "echo $LIBRARY_PATH")
Norbert