Newsgroups: comp.unix.aix Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!wross From: wross@caen.engin.umich.edu (Wendy Ross) Subject: Re: Can motif programs in C++ be written for RS/6000? Message-ID: <1991Apr1.210000.6909@engin.umich.edu> Sender: news@engin.umich.edu (CAEN Netnews) Organization: University of Michigan Engineering, Ann Arbor References: <1991Mar31.060749.3749@vax5.cit.cornell.edu> <1991Apr1.100448@ibmpa.awdpa.ibm.com> Distribution: comp Date: Mon, 1 Apr 1991 21:00:00 GMT In article <1991Apr1.100448@ibmpa.awdpa.ibm.com> marc@ibmpa.awdpa.ibm.com (Marc Pawliger) writes: >[... talk of executing a program and getting 'cannot load libXXX.a, incorrect >format' deleted ...] > >What has probably happened is that you have linked with a shared library that >is not in the 'standard' place i.e. /lib or /usr/lib. When you go to run the >program, the loaded can't find the library and bails out. Unfortunately it >sometimes reports the wrong library as the one it couldn't find or that was >in the 'wrong format'. > >The solution is to use the -L switch when compiling. This basically adds >another directory to the path searched for shared libraries. So if the R4 >libraries were in /usr/local/lib, you would add "-L/usr/local/lib -lX11" to >use /usr/local/lib/libX11.a instead of /usr/lib/libX11.a. > >To see if this will work, you could also set LIBPATH to >/usr/local/lib:/lib:/usr/lib and try re-running the program. If that works, >then recompiling should help. > >+--Marc Pawliger----IBM Advanced Workstations Division----Palo Alto, CA---+ >| Internet: marc@ibminet.awdpa.ibm.com VNET: MARCP at AUSVM6 | >| UUCP: uunet!ibminet.awdpa.ibm.com!marc Phone: (415) 855-3493 | >+-----IBMinet: marc@ibmpa.awdpa.ibm.com----------IBM T/L: 465-3493------+ > >These are my opinions, not IBM's etc etc etc I have a question. We also are compiling X11R4 with the suggested patches. We did compile it with the -L option so that the clients will use our X11R4 shared libraries instead of /usr/lib libraries. Everything works just fine if the clients (ie xterm) is not suid. xterm runs without problems, and finds the right library. However, as soon as we make xterm suid root, it bombs out with the XCOFF error, saying something about /usr/lib/libXt.a. Is there some reason that suid programs only look in /usr/lib? Does anyone have any other suggestions? Wendy Ross wross@caen.engin.umich.edu Computer Aided Engineering Network College of Engineering University of Michigan