RE: [Hugs-bugs] problems building on Solaris
-----Original Message----- From: Alastair Reid [mailto:alastair@reid-consulting-uk.ltd.uk] Sent: Tuesday, June 01, 2004 10:27 AM To: herington, dean Subject: Re: [Hugs-bugs] problems building on Solaris
It looks as though you want to use one of:
'-r' or '-Dy -G'
I think both of these are equally likely to work. Hugs needs something it can load with dlopen and one part of the page says this means it must be a shared library (so use -Dy -G) but Sigbjorn Finne used to strongly believe that all that was wanted was a relocatable object file (so use -r).
'-r' is what configure chose, but it didn't work for me. '-dy -G' (note: lower-case 'd') did work! Thanks!
Other flags you might play with are:
-z combreloc Make loading a little faster.
-z defs I think this would catch errors sooner.
but I don't think they will improve the chances of it working, so try -r and '-dy -G' first.
-- Alastair
ps The problem is not Hugs+Solaris but Hugs+SunOS ld (instead of gcc ld).
This is a bit puzzling -- I would have thought that
gcc -shared -fPIC foo.c -o foo.so
would get you there on that platform. Even so, you
shouldn't end up with a duff option (-r).
If you're in the mood for some experimentation, have a
look at aclocal.m4:HUGS_TRY_DYNLINK (and its
use in configure.ac / configure.in ) and try re-creating
those tests manually to find out what's going wrong.
--sigbjorn
----- Original Message -----
From: "herington, dean"
-----Original Message----- From: Alastair Reid [mailto:alastair@reid-consulting-uk.ltd.uk] Sent: Tuesday, June 01, 2004 10:27 AM To: herington, dean Subject: Re: [Hugs-bugs] problems building on Solaris
It looks as though you want to use one of:
'-r' or '-Dy -G'
I think both of these are equally likely to work. Hugs needs something it can load with dlopen and one part of the page says this means it must be a shared library (so use -Dy -G) but Sigbjorn Finne used to strongly believe that all that was wanted was a relocatable object file (so use -r).
'-r' is what configure chose, but it didn't work for me. '-dy -G' (note: lower-case 'd') did work! Thanks!
Other flags you might play with are:
-z combreloc Make loading a little faster.
-z defs I think this would catch errors sooner.
but I don't think they will improve the chances of it working, so try -r and '-dy -G' first.
-- Alastair
ps The problem is not Hugs+Solaris but Hugs+SunOS ld (instead of gcc ld).
_______________________________________________ Hugs-Bugs mailing list Hugs-Bugs@haskell.org http://www.haskell.org/mailman/listinfo/hugs-bugs
Dean Herington reports:
'-dy -G' (note: lower-case 'd') did work!
Great! Was that combined with the -Wl, prefix to push it through gcc? Could I ask you to do a few more experiments to see what change we need in the configure script? Try tweaking hugs98/configure.ac by moving the call to HUGS_TRY_DYNLINK(-G) up about 6 lines to just before the -r flag (adding -dy and/or -Wl, if required) then delete any cache, rebuild ./configure and rerun. Hopefully it will pick the right flags this time. [But why was the config test deciding that -r was good enough? If it doesn't work in Hugs at runtime, it shouldn't work at config time. I wonder if the test needs to be strengthened to invoke a function from some other shared library?] Hmmmm, I'm having trouble ssh-ing into cvs.haskell.org so I can't update the repository directly but if you report back to hugs-bugs, I'm sure some kind soul will add it in. -- Alastair Reid
participants (3)
-
Alastair Reid -
herington, dean -
Sigbjorn Finne