oester+@rchland.ibm.com (Bob Oesterlin) (11/20/90)
Can anyone explain this behavior? 1) I have a copy of ATK in dir /usr/dev/andrew. I copy the entire tree to/usr/prod/andrew. 2) I switch to /usr/prod/andrew (CLASSPATH, ANDREWDIR, PATH, etc) 3) I try to run various Andrew apps (works ok. So it should, it the samefiles!) 4) Try to run a "locally written" ATK app: /usr > /usr/andrew/bin/runapp calapp Could not find the class methods for application version 0x4190738 (68749112)! Memory fault (core dumped) ... Huh? It's the same data! OK, what's up? (fyi, this version numbermatches the one in /usr/prod/andrew/dlib/atk/index) I went ito /usr/prod/andrew, and started sym-linking various dirs back to/usr/dev/andrew. By process of elimination I find that if/usr/andew/lib/libclass.a is a file, it fails, but if it's a sym-link back to/usr/dev/andrew/lib/libclass.a, it works! What's going on here?? Both /usr/prod/andrew/lib/libclass.a and/usr/prod/andrew/lib/libclass.a are the same (dates, checksums, premissions,etc). What could the sym-link have to do with it? Some strangeness becauselibclass.a is a shared lib?? Help! Bob
gk5g+@ANDREW.CMU.EDU (Gary Keim) (11/20/90)
Excerpts from misc: 19-Nov-90 rs_aix31 problems Bob Oesterlin@rchland.ib (1095+0) > I find that if /usr/andew/lib/libclass.a is a file, it fails, but if > it's a sym-link back to /usr/dev/andrew/lib/libclass.a, it works! > What's going on here?? Both /usr/prod/andrew/lib/libclass.a and > /usr/prod/andrew/lib/libclass.a are the same (dates, checksums, > premissions, etc). What could the sym-link have to do with it? Some > strangeness because libclass.a is a shared lib?? Each dynamic object has the full path of libclass.a within. From ld Command: -LDirectory Adds Directory to the list of directories to be searched for libraries designated by -l key. This flag may be repeated. The list of directories is also recorded in the output object file loader section for use by the dynamic loader. and from load Subroutine: When the loader resolves a symbol it uses the filename recorded with that symbol to find the object file that exports the symbol. If the file name contains any "/" characters, it is used directly and must name an appropriate object file. However, if the filename is a basename (contains no "/" characters), the loader searches the directories specified in the default library path for an object file with that basename. It was done this way, in lieu of using the LIBPATH env. var, so that it wouldn't be necessary to set LIBPATH before building the system. It's a toss up as to which is a better method.
gk5g+@ANDREW.CMU.EDU (Gary Keim) (11/21/90)
Excerpts from misc: 20-Nov-90 Re: rs_aix31 problems Bob Oesterlin@rchland.ib (696+0) > I even tried copying it to /lib, and deleteing it from /usr/andrew/lib. > This should work, since libclass.a is still in my LIBPATH. > So the question remains - How do I solve this problem? This is a nasty > problem when using AFS. You tend specify the some absolute AFS path, and > then move it to some other place for installation You can copy your Andrew object tree to a new location. But... you will have to set these environment variables: ANDREWDIR [/usr/andrew] CLASSPATH [$ANDREWDIR/dlib/atk] LIBPATH [$ANDREWDIR/lib:/lib:/usr/lib] and (cd $ANDREWDIR/X11fonts;mkfontdir).