Path: utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request From: cczdao@mips.ccc.nottingham.ac.uk (David Osborne) Newsgroups: comp.sys.sun Subject: Building Emacs 18.57 with SunOS 4.1, OpenWindows 2.0 Keywords: Software Message-ID: <1897@brchh104.bnr.ca> Date: 15 Mar 91 22:44:00 GMT Sender: news@brchh104.bnr.ca Organization: Sun-Spots Lines: 35 Approved: Sun-Spots@rice.edu X-Original-Date: 25 Feb 91 19:27:18 GMT X-Sun-Spots-Digest: Volume 10, Issue 53, message 2 X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu I have a problem with static vs. dynamic linking, trying to get X support in Emacs 18.57, using the X11 library in /usr/openwin/lib, and the SunOS cc. I can build a runnable xemacs if I don't define HAVE_X_WINDOWS in config.h. No problem. However, as I want X support in Emacs, linking temacs fails because the OpenWindows X11 library is only available as a shared object on my IPC. I'm using -Bstatic on the ld command which makes temacs, so ld -L/usr/openwin/lib -e __start -Bstatic -o temacs crt0.o .... -lX11 .... fails because the libX11.a doesn't exist. Changing from static to dynamic linking gives the error ld: _DYNAMIC bootstrapping not available: use -Bstatic Having checked the Programming Utilities & Libraries manual about shared libraries, I tried the suggested mixture of static and dynamic linking ld -L/usr/openwin/lib -e __start -Bstatic -o temacs crt0.o .... \ -Bdynamic -lX11 -Bstatic .... but that provokes the same error about _DYNAMIC bootstrapping. I read that the __DYNAMIC symbol is referred to by the standard /usr/lib/crt0.o, but using that and changing the entry point to "start" just gives a runtime error of "ld.so: Undefined symbol: __start". I'm sure someone must have succeeded in building Emacs with this configuration. What's the trick? (David Osborne, Cripps Computing Centre, University of Nottingham)