ast - error on -luutil
Hi,
I built a binary with SGCC (-O3 -xpec).
Trying ats on a binary, I get this:
Recompiling with: /var/gcc/bin -fast -fsimple=0 -fns=no
Compilation command = /var/gcc/bin/gcc -fast -fsimple=0 -fns=no-L /lib -lsocket -lc -lnsl -lmp -lmd5 -lscf -ldoor -luutil -lm -Wd,-pec=/var/home/jdf/mybinary.saved_by_ats -o /var/home/jdf/ATS/run1/mybinary.2
Compilation command status = 256
Compilation command ERROR
Compilation command returned non-zero status: 1
Compilation command output:
ld: fatal: library -luutil: not found
Where is libuutil?
Jim
[622 byte] By [
jimdfiori] at [2007-11-25 23:11:37]

# 1
ats tries its best to find the location of the libraries that the executable needs automatically. Sometimes it cannot do so. The common reasons are the 1) the executable has been moved from its original location. and 2) LD_LIBRARY_PATH is not set appropriately.
Try doing "ldd mybinary". You should see a dependency for libuutll. If you can normally run the executable it should show you the location of the library. On the ats command line specify "-ob -L <the_directory_of_the_library>".
Let us know if you still have a problem.
# 2
There is a libuutil in /lib on Solaris10 but not in older versions of Solaris.
If the binary was compiled on a Solaris10 machine, but then another machine (non-Solaris10) was used to run ats, then that could explain your recompile failure.
I can see that ats found the -L /lib and added it to your recompile command line, so you should not have to add it yourself with the ats -ob flag.
if you ever try using the -ob flag make sure you enter the quotes correctly, like this:
ats ... a.out -ob "-L /lib"
Keep us posted!
--Tom Kirkley