Paddy Krishnan <[EMAIL PROTECTED]> writes:
> I tried to install hugs version 1.4 with plugins for a Solaris (SunOS
> 5.5) machine but ran into problems.
Not having a full transcript of the build process, it's a bit hard to
guess what's gone wrong. When you hit linking problems during a build,
there's usually two suspects:
1) Dynamic linking
2) The -L/usr/lib/X11 flags are wrong.
In this case, it sounds like dynamic linking (but do check that the -L
flags are right - or send us a full transcript of the failed link).
We prefer to use dynamic linking for the "plugins" - but there's no
portable way of doing it on every machine. Here are some suggestions:
1) Upgrade your copy of gcc to 2.7.2
As far as I know gcc 2.7.2 generates shared-object-libraries in the
same way on every machine and that the "magic incantation" you need
is "-shared -nostdlib" - as "configure" had guessed.
2) Find out how to build shared objects using whatever compiler you're
using, edit the Makefile, try it out and mail us instructions that
we can pass onto other people.
3) Use static linking instead of dynamic linking.
1) Configure without --with-plugins.
2) Make install
3) Reconfigure with --with-plugins
4) Make xhugs
5) Copy xhugs to wherever the install script put hugs.
6) Use xhugs whenever you want to do X graphics.
--
Alastair Reid Yale Haskell Project Hacker
[EMAIL PROTECTED] http://WWW.CS.Yale.EDU/homes/reid-alastair/
ps Here's what the file hugs/Install has to say about dynamic linking.
I suspect that you have a slightly earlier version of Hugs which may
not contain this text.
--with-plugins
Generate Xlib or Win32 libraries.
Note that this does not work on DEC Alphas (or any other machines where
sizeof(int) != sizeof(int*))
These "foreign plugins" can be statically linked or dynamically
linked to the Hugs interpreter.
o Static linking is portable but results in a much larger
interpreter than normal. This can be irritating if you
create your own plugins and only want to use a subset
of the plugins at any one time.
1) Configure with --with-plugins
2) "make xhugs"
o Dynamic linking is much less portable but produces better results.
Here's a list of what to do on the compilers we know about - please
tell us if you find how to build DLLs on any other system.
DEC Alpha:
Not supported - see above.
Linux + gcc 2.7.2:
env "DLL_FLAGS=-shared -nostdlib" ./configure --with-plugins
Solaris + gcc 2.6.3:
env "DLL_FLAGS=-r" ./configure --with-plugins
Solaris + cc:
ld -r
Sunos4 + gcc:
env "DLL_FLAGS=-r" ./configure --with-plugins
make Xlib.so
chmod 111 Xlib.so
Sunos4 + acc
acc -pic -c Foo.c
ld -assert pure-text Foo.o -o Foo.so
HPUX + cc
cc -D_HPUX_SOURCE -Aa +z -c Foo.c
ld -b Foo.o -o Foo.so
Visual C++:
The distributed Makefile contains this line:
DLL_FLAGS=/LD