RE: [Hugs-bugs] problems building on Solaris
After a hiatus, I'm back trying to get Hugs built for Solaris. I never had a reply to the message attached below. Can anyone help? One newly noticed bit of puzzlement: configure yields: /* C compiler invocation use to build a dynamically loadable library. * Typical value: "gcc -shared" * Must evaluate to a literal C string. */ #define MKDLL_CMD "gcc -g -r" but I can't find any mention of "-r" for gcc on Sparc. Dean
-----Original Message----- From: hugs-bugs-bounces@haskell.org [mailto:hugs-bugs-bounces@haskell.org] On Behalf Of herington, dean Sent: Thursday, April 08, 2004 10:03 AM To: 'Alastair Reid'; hugs-bugs@haskell.org Subject: RE: [Hugs-bugs] problems building on Solaris
-----Original Message----- From: hugs-bugs-bounces@haskell.org [mailto:hugs-bugs-bounces@haskell.org] On Behalf Of Alastair Reid Sent: Wednesday, April 07, 2004 6:21 PM To: hugs-bugs@haskell.org Subject: Re: [Hugs-bugs] problems building on Solaris
Looks like it's trying to put a value bigger than 22 bits (about 4 million) into a 22 bit slot. If so, you need to persuade your C compiler to use bigger slots. Maybe the compiler/assembler/linker has a 'big binary' flag you can supply?
What compiler are you using? (grep MKDLL_CMD src/config.h)
If you see a plausible flag to use, tweak MKDLL_CMD in src/config.h to try it and let us know if it works.
-- Alastair Reid
I'm using: GNU C version 3.2.2 (sparc-sun-solaris2.8) compiled by GNU C version 3.2.2. /usr/ccs/bin/as: Sun WorkShop 6 update 2 Compiler Common 6.2 Solaris_9_CBE 2001/04/02 ld: Software Generation Utilities - Solaris Link Editors: 5.9-1.343 on: SunOS lca1071 5.9 Generic sun4u sparc
I don't see any switches in any of these tools' man pages for "big binaries".
Dean
P.S. Please confirm my understanding of the error. It appears that Hugs is trying to compile the Network/BSD module (to a shared object BSD.so) when dynamic linking fails, and that the erroneous BSD.so is produced anyway.
Compiling ../../hugsdir/libraries/Network/BSD.hs runhugs: Error occurred ERROR "../../hugsdir/libraries/Network/BSD.hs" - Error while importing DLL "/emc/dheringt/hugs98-Nov2003/hugsdir/libraries/Network/BSD.so": ld.so.1: ../ffihugs: fatal: relocation error: R_SPARC_WDISP22: file /emc/dheringt/hugs98-Nov2003/hugsdir/libraries/Network/BSD.so: symbol _cerror: value 0x20c5d4 does not fit
On Wednesday 07 April 2004 20:13, herington, dean wrote:
In trying to build Hugs using
/hugs98-Nov2003.tar.gz>
http://cvs.haskell.org/Hugs/downloads/Nov2003/hugs98-Nov2003.t ar.gz for Solaris (SunOS lca1071 5.9 Generic sun4u sparc), I get fatal relocation errors. Any idea of what's wrong?
...
relocation error: R_SPARC_WDISP22: file
/emc/dheringt/hugs98-Nov2003/hugsdir/libraries/Network/BSD.so: symbol
_cerror: value 0x20c5d4 does not fit
Hugs-Bugs mailing list Hugs-Bugs@haskell.org http://www.haskell.org/mailman/listinfo/hugs-bugs _______________________________________________ Hugs-Bugs mailing list Hugs-Bugs@haskell.org http://www.haskell.org/mailman/listinfo/hugs-bugs
On Monday 31 May 2004 23:07, herington, dean wrote:
After a hiatus, I'm back trying to get Hugs built for Solaris. I never had a reply to the message attached below. Can anyone help?
One newly noticed bit of puzzlement: configure yields:
/* C compiler invocation use to build a dynamically loadable library. * Typical value: "gcc -shared" * Must evaluate to a literal C string. */ #define MKDLL_CMD "gcc -g -r"
but I can't find any mention of "-r" for gcc on Sparc.
Try editing the value of MKDLL_CMD using flags like: -Wl,-r -Wl,-shared -Wl,-split-by-reloc -Wl,32768 The -Wl, part passes the following flag through to the linker. I'm not sure exactly what flags to use though because the sparc system available to me only seems to have GNU ld on it so I can't find a Sun ld manpage. (If you can forward 'man ld' to me, I might recognise the flags to use.) The goal in all this is to perform a 'partial link' which combines a bunch of separate .o and .a files into a single .o (or .so?) file. This differs from a normal link in that there is no 'start symbol' (e.g., '_main') in the input files and the output is _not_ an executable file. -- Alastair Reid
participants (2)
-
Alastair Reid -
herington, dean