cczdao@mips.ccc.nottingham.ac.uk (David Osborne) (03/16/91)
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)