Building head on Openbsd

Sergei Trofimovich slyich at gmail.com
Sun Mar 26 13:04:08 UTC 2017


On Sun, 26 Mar 2017 19:24:07 +0800
Adam Steen <adam at adamsteen.com.au> wrote:

> Hi
> 
> I attempt to build head today on OpenBSD current and failed, but i not sure
> where to start to fix the problems. The full configure and build logs are
> attached. Just a note: ghc-8.0 builds fine, ghc-8.2 fails with the same
> error.
> 
> the first error is
...
> rts/linker/Elf.c:539:0: error:  warning: unused variable 'secno'

There are just warnings. I think the real error is:

rts/linker/Elf.c:402:0: error:
     error: (Each undeclared identifier is reported only once
    |
402 |       case EM_PPC64: IF_DEBUG(linker,debugBelch( "powerpc64" ));
    | ^

I guess openbsd does not have definition of EM_PPC64 (yet?).
Try that to see how far it progresses:

diff --git a/rts/linker/Elf.c b/rts/linker/Elf.c
index 604c3dc..e8f6aab 100644
--- a/rts/linker/Elf.c
+++ b/rts/linker/Elf.c
@@ -400,8 +400,10 @@ ocVerifyImage_ELF ( ObjectCode* oc )
 #endif
       case EM_PPC:   IF_DEBUG(linker,debugBelch( "powerpc32" )); break;
+#ifdef EM_PPC64
       case EM_PPC64: IF_DEBUG(linker,debugBelch( "powerpc64" ));
           errorBelch("%s: RTS linker not implemented on PowerPC 64-bit",
                      oc->fileName);
           return 0;
+#endif
 #ifdef EM_X86_64
       case EM_X86_64: IF_DEBUG(linker,debugBelch( "x86_64" )); break;

-- 

  Sergei
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: Цифровая подпись OpenPGP
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20170326/e3f891fa/attachment.sig>


More information about the ghc-devs mailing list