[GHC] #15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux ---------------------------------+---------------------------------------- Reporter: pkubaj | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Research needed Component: Compiler | Version: 8.6.2 Keywords: | Operating System: Unknown/Multiple Architecture: powerpc64 | Type of failure: Building GHC failed Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: ---------------------------------+---------------------------------------- I'd like to bootstrap GHC for FreeBSD/powerpc64, but GHC seems to be supported only on Linux for powerpc64 architecture. Relevant code: https://github.com/ghc/ghc/blob/1c2c2d3dfd4c36884b22163872feb87122b4528d/rts... https://github.com/ghc/ghc/blob/1c2c2d3dfd4c36884b22163872feb87122b4528d/rts... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Research | needed Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by pkubaj): * type: bug => feature request -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Research | needed Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by trommler): FreeBSD uses ELF so you could just try to add it to the `#ifdef` guards and see how far you get. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: new Priority: normal | Milestone: Research | needed Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by trommler): * owner: (none) => trommler Comment: I am going to look into this. I just installed FreeBSD on my PowerMac. Do you know if the linux execution environment is available for powerpc64? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

I am going to look into this. I just installed FreeBSD on my PowerMac.
Do you know if the linux execution environment is available for
#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: new Priority: normal | Milestone: Research | needed Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by trommler): Replying to [comment:3 trommler]: powerpc64?
Never mind, I built an unregisterised cross-compiler. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux ----------------------------------------+--------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: new Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+--------------------------------- Changes (by trommler): * milestone: Research needed => 8.10.1 Comment: I might be able to do this for 8.10. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux ----------------------------------------+--------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: new Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC failed | Test Case: Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+--------------------------------- Changes (by trommler): * blockedby: => 15411 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux ----------------------------------------+--------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: new Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC failed | Test Case: Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+--------------------------------- Comment (by trommler): I have put up a branch on GHC's Gitlab as [[https://gitlab.haskell.org/ghc/ghc/tree/wip/T15916|wip/T15916]]. Note, this branch only works on powerpc64 with a workaround for #15411. I had some trouble with my FreeBSD 11 locale setup and could not run the testsuite. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux ----------------------------------------+--------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: new Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC failed | Test Case: Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+--------------------------------- Comment (by pkubaj): I don't see a patch for #15411. Could you upload it? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

I don't see a patch for #15411. Could you upload it? I attached the patch, which I prepared for openSUSE, to #15411. Here is a
#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux ----------------------------------------+--------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: new Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC failed | Test Case: Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+--------------------------------- Comment (by trommler): Replying to [comment:8 pkubaj]: direct link: https://ghc.haskell.org/trac/ghc/attachment/ticket/15411 /Disable-unboxed-arrays.patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Changes (by trommler): * status: new => patch * differential: => https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by trommler): @pkubaj, I also have the patches based on the 8.6.3 release in https://gitlab.haskell.org/trommler/ghc/commits/wip/T15916. They most likely also apply cleanly to other 8.6 releases. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by pkubaj): Unfortunately with 8.6.3 I'm getting: {{{ inplace/bin/deriveConstants --gen-header -o includes/dist- derivedconstants/header/DerivedConstants.h --tmpdir includes/dist- derivedconstants/header/ --gcc-program "powerpc64-unknown-freebsd-gcc" --gcc-flag -Wall --gcc-flag -Werror=unused-but-set-variable --gcc-flag -Wno-error=inline --gcc-flag -fno-stack-protector --gcc-flag -Iincludes --gcc-flag -Iincludes/dist --gcc-flag -Iincludes/dist- derivedconstants/header --gcc-flag -Iincludes/dist-ghcconstants/header --gcc-flag -Irts --gcc-flag -fcommon --nm-program "" --target-os "freebsd" deriveConstants: : readCreateProcess: runInteractiveProcess: exec: does not exist (No such file or directory) libraries/hpc/ghc.mk:3: libraries/hpc/dist-boot/build/.depend-v.haskell: No such file or directory gmake[1]: *** [includes/ghc.mk:193: includes/dist- derivedconstants/header/DerivedConstants.h] Error 1 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by trommler): Replying to [comment:12 pkubaj]:
Unfortunately with 8.6.3 I'm getting: Do you have some more context for me so I can reproduce the error? What was in your `build.mk` and what was your `./configure` command line?
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

Replying to [comment:12 pkubaj]:
Unfortunately with 8.6.3 I'm getting: Do you have some more context for me so I can reproduce the error? What was in your `build.mk` and what was your `./configure` command
#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by pkubaj): Replying to [comment:13 trommler]: line? I think I fixed it (although build is still going). The error can be seen in the compiler flags (--nm-program ""). I needed to add nm for crosscompiling to powerpc64. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

The error can be seen in the compiler flags (--nm-program ""). I needed to add nm for crosscompiling to powerpc64. Could that be a bug in the build system? I would expect `nm` to be set to `<platform>-nm` automatically. Could you create a new ticket if there is a
#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by trommler): Replying to [comment:14 pkubaj]: problem with the build system? Thanks. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by pkubaj): It's set up automatically. But build should fail at configure with explicit info that nm is needed. I managed to build it, now I need to test it on POWER. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by pkubaj): It seems like binaries are properly compiled, but running them fails due to not found libraries. {{{ root@talos:$/usr/ports/lang/ghc$ /usr/ports/default/lang/ghc/work/ghc-8.6.3-boot/lib/ghc-8.6.3/bin/ghc ld-elf.so.1: Shared object "libHShaskeline-0.7.4.3-ghc8.6.3.so" not found, required by "ghc" }}} The libraries are there, though: {{{ root@talos:$/usr/ports/lang/ghc$ find work/ghc-8.6.3-boot/libraries -name "*.so" work/ghc-8.6.3-boot/libraries/Cabal/Cabal/dist- install/build/libHSCabal-2.4.0.1-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/array/dist- install/build/libHSarray-0.5.3.0-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/base/dist- install/build/libHSbase-4.12.0.0-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/binary/dist- install/build/libHSbinary-0.8.6.0-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/bytestring/dist- install/build/libHSbytestring-0.10.8.2-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/containers/dist- install/build/libHScontainers-0.6.0.1-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/deepseq/dist- install/build/libHSdeepseq-1.4.4.0-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/directory/dist- install/build/libHSdirectory-1.3.3.0-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/filepath/dist- install/build/libHSfilepath-1.4.2.1-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/ghc-boot-th/dist-install/build/libHSghc- boot-th-8.6.3-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/ghc-boot/dist-install/build/libHSghc- boot-8.6.3-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/ghc-compact/dist-install/build/libHSghc- compact-0.1.0.0-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/ghc-heap/dist-install/build/libHSghc- heap-8.6.3-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/ghc-prim/dist-install/build/libHSghc- prim-0.5.3-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/ghci/dist- install/build/libHSghci-8.6.3-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/haskeline/dist- install/build/libHShaskeline-0.7.4.3-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/hpc/dist- install/build/libHShpc-0.6.0.3-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/integer-simple/dist-install/build /libHSinteger-simple-0.1.1.1-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/libiserv/dist- install/build/libHSlibiserv-8.6.3-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/mtl/dist- install/build/libHSmtl-2.2.2-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/parsec/dist- install/build/libHSparsec-3.1.13.0-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/pretty/dist- install/build/libHSpretty-1.1.3.6-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/process/dist- install/build/libHSprocess-1.6.3.0-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/stm/dist- install/build/libHSstm-2.5.0.0-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/template-haskell/dist-install/build /libHStemplate-haskell-2.14.0.0-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/terminfo/dist- install/build/libHSterminfo-0.4.1.2-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/text/dist- install/build/libHStext-1.2.3.1-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/time/dist- install/build/libHStime-1.8.0.2-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/transformers/dist- install/build/libHStransformers-0.5.5.0-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/unix/dist- install/build/libHSunix-2.7.2.2-ghc8.6.3.so work/ghc-8.6.3-boot/libraries/xhtml/dist- install/build/libHSxhtml-3000.2.2.1-ghc8.6.3.so }}} Is it possible to compile binaries statically? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:17 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by trommler): Replying to [comment:17 pkubaj]:
Is it possible to compile binaries statically? Yes, set `DYNAMIC_GHC_PROGRAMS = NO` in your `build.mk`. See [[wiki:DynamicGhcPrograms]].
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:18 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by trommler): Replying to [comment:17 pkubaj]:
{{{ root@talos:$/usr/ports/lang/ghc$ /usr/ports/default/lang/ghc/work/ghc-8.6.3-boot/lib/ghc-8.6.3/bin/ghc ld-elf.so.1: Shared object "libHShaskeline-0.7.4.3-ghc8.6.3.so" not found, required by "ghc"
}}} Do not use `ghc` in `<prefix>/lib` but the shell script `ghc` in `<prefix>/bin`. It sets an `LD-LIBRARY_PATH` if necessary.
The libraries are there, though:
{{{ root@talos:$/usr/ports/lang/ghc$ find work/ghc-8.6.3-boot/libraries -name "*.so" work/ghc-8.6.3-boot/libraries/Cabal/Cabal/dist- install/build/libHSCabal-2.4.0.1-ghc8.6.3.so [...] }}} This looks like you did not do `make install`. In that case you want to use `inplace/bin/ghc-stage2`.
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:19 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by pkubaj): Running {{{make install}}} on powerpc64 throws error: {{{ghc-cabal: '/usr/local/lib/ghc-8.6.3/bin/ghc-pkg' exited with an error: array-0.5.3.0: Warning: haddock-interfaces: /usr/local/share/doc/ghc-8.6.3/html/libraries/array-0.5.3.0/array.haddock doesn't exist or isn't a file array-0.5.3.0: dependency "base-4.12.0.0" doesn't exist (use --force to override)}}} Still, {{{ghc}}} binary was installed, and it works. When i had {{{DYNAMIC_GHC_PROGRAMS=YES}}}, I used the script from {{{bin/ghc}}}, but it threw the same error. It works with it disabled. When {{{DYNAMIC_GHC_PROGRAMS=YES}}}, {{{inplace/bin/ghc-stage2}}} is not present. {{{ghc-stage2}}} is in {{{ghc/stage2/build/tmp}}}: {{{ root@talos:$/home/pkubaj/ghc-8.6.3-boot$ find . -name ghc-stage2 ./ghc/stage2/build/tmp/ghc-stage2 }}} This binary seems to run ok. {{{ root@talos:$/home/pkubaj/ghc-8.6.3-boot$ ./ghc/stage2/build/tmp/ghc-stage2 --version The Glorious Glasgow Haskell Compilation System, version 8.6.3 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:20 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by trommler): Replying to [comment:20 pkubaj]:
Running {{{make install}}} on powerpc64 throws error: {{{ghc-cabal: '/usr/local/lib/ghc-8.6.3/bin/ghc-pkg' exited with an error: array-0.5.3.0: Warning: haddock-interfaces:
/usr/local/share/doc/ghc-8.6.3/html/libraries/array-0.5.3.0/array.haddock
doesn't exist or isn't a file array-0.5.3.0: dependency "base-4.12.0.0" doesn't exist (use --force to override)}}}
Still, {{{ghc}}} binary was installed, and it works. This is the bootstrap compiler that was cross compiled, isn't it?
Does the compiler produced with the bootstrap compiler work? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:21 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

When i had {{{DYNAMIC_GHC_PROGRAMS=YES}}}, I used the script from {{{bin/ghc}}}, but it threw the same error. It works with it disabled.
When {{{DYNAMIC_GHC_PROGRAMS=YES}}}, {{{inplace/bin/ghc-stage2}}} is not
#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by trommler): Replying to [comment:20 pkubaj]: present. {{{ghc-stage2}}} is in {{{ghc/stage2/build/tmp}}}:
{{{ root@talos:$/home/pkubaj/ghc-8.6.3-boot$ find . -name ghc-stage2 ./ghc/stage2/build/tmp/ghc-stage2 }}}
This binary seems to run ok. Does that compiler work to bootstrap GHC?
{{{ root@talos:$/home/pkubaj/ghc-8.6.3-boot$ ./ghc/stage2/build/tmp/ghc- stage2 --version The Glorious Glasgow Haskell Compilation System, version 8.6.3 }}} Good, but does the compiler also produce working executables?
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:22 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

Also, when I bootstrap on amd64 and apply https://ghc.haskell.org/trac/ghc/attachment/ticket/15411/Disable-unboxed- arrays.patch, the following happens: {{{ "inplace/bin/ghc-stage1" -hisuf hi -osuf o -hcsuf hc -static -O0 -H64m -Wall -this-unit-id base-4.12.0.0 -hide-all-packages -i -ilibraries/base/. -ilibraries/base/dist-install/build -Ilibraries/base /dist-install/build -ilibraries/base/dist-install/build/./autogen -Ilibraries/base/dist-install/build/./autogen -Ilibraries/base/include -Ilibraries/base/dist-install/build/include -optP-include -optPlibraries/base/dist-install/build/./autogen/cabal_macros.h -package- id ghc-prim-0.5.3 -package-id integer-simple-0.1.1.1 -package-id rts -this-unit-id base -Wcompat -Wnoncanonical-monad-instances -XHaskell2010 -O0 -no-user-package-db -rtsopts -Wno-trustworthy-safe -Wno-deprecated- flags -Wnoncanonical-monad-instances -odir libraries/base/dist- install/build -hidir libraries/base/dist-install/build -stubdir
#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by trommler): Replying to [comment:20 pkubaj]: libraries/base/dist-install/build -c libraries/base/./GHC/Num.hs -o
libraries/base/dist-install/build/GHC/Num.o ghc-stage1: panic! (the 'impossible' happened) (GHC version 8.6.3 for powerpc64-portbld-freebsd): Can't use Natural in base }}} The error message says `powerpc64-portbld-freebsd` and it could also be #15411.
On openSUSE I conditionally apply the patch (workaround) only on powerpc64, but just for fun I applied it on all platforms and build (in my home project) passes no problem.
Without this patch, it compiles fine on amd64, but then fails on
powerpc64. The latter is due to #15411. There is another patch that I apply to 8.6.3. That patch fixes an issue mentioned in my comments on #15399. You can find the patch in Phab:D5001. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:23 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by pkubaj): Replying to [comment:21 trommler]:
Replying to [comment:20 pkubaj]:
Running {{{make install}}} on powerpc64 throws error: {{{ ghc-cabal: '/usr/local/lib/ghc-8.6.3/bin/ghc-pkg' exited with an error: array-0.5.3.0: Warning: haddock-interfaces:
/usr/local/share/doc/ghc-8.6.3/html/libraries/array-0.5.3.0/array.haddock
doesn't exist or isn't a file array-0.5.3.0: dependency "base-4.12.0.0" doesn't exist (use --force to override) }}}
Still, {{{ghc}}} binary was installed, and it works. This is the bootstrap compiler that was cross compiled, isn't it?
Does the compiler produced with the bootstrap compiler work?
Not really. {{{ gmake install }}} didn't finish because of an error. {{{ghc}}} is there, but not all libraries are. {{{ root@talos:$~$ ghc --interactive GHCi, version 8.6.3: http://www.haskell.org/ghc/ :? for help <interactive>:1:6: error: Not in scope: `System.IO.hSetBuffering' No module named `System.IO' is imported. <interactive>:1:30: error: Not in scope: `System.IO.stdin' No module named `System.IO' is imported. <interactive>:1:46: error: Not in scope: data constructor `System.IO.NoBuffering' No module named `System.IO' is imported. <interactive>:1:70: error: Not in scope: `System.IO.hSetBuffering' No module named `System.IO' is imported. <interactive>:1:94: error: Not in scope: `System.IO.stdout' No module named `System.IO' is imported. <interactive>:1:111: error: Not in scope: data constructor `System.IO.NoBuffering' No module named `System.IO' is imported. <interactive>:1:135: error: Not in scope: `System.IO.hSetBuffering' No module named `System.IO' is imported. <interactive>:1:159: error: Not in scope: `System.IO.stderr' No module named `System.IO' is imported. <interactive>:1:176: error: Not in scope: data constructor `System.IO.NoBuffering' No module named `System.IO' is imported. }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:24 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by pkubaj): Replying to [comment:22 trommler]:
Replying to [comment:20 pkubaj]:
When i had {{{DYNAMIC_GHC_PROGRAMS=YES}}}, I used the script from {{{bin/ghc}}}, but it threw the same error. It works with it disabled.
When {{{DYNAMIC_GHC_PROGRAMS=YES}}}, {{{inplace/bin/ghc-stage2}}} is not present. {{{ghc-stage2}}} is in {{{ghc/stage2/build/tmp}}}: {{{ root@talos:$/home/pkubaj/ghc-8.6.3-boot$ find . -name ghc-stage2 ./ghc/stage2/build/tmp/ghc-stage2 }}}
This binary seems to run ok. Does that compiler work to bootstrap GHC?
{{{ root@talos:$/home/pkubaj/ghc-8.6.3-boot$ ./ghc/stage2/build/tmp/ghc- stage2 --version The Glorious Glasgow Haskell Compilation System, version 8.6.3 }}} Good, but does the compiler also produce working executables?
No, I couldn't bootstrap natively because of failed {{{gmake install}}}. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:25 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

Replying to [comment:20 pkubaj]:
Also, when I bootstrap on amd64 and apply https://ghc.haskell.org/trac/ghc/attachment/ticket/15411/Disable-unboxed- arrays.patch, the following happens: {{{ "inplace/bin/ghc-stage1" -hisuf hi -osuf o -hcsuf hc -static -O0 -H64m -Wall -this-unit-id base-4.12.0.0 -hide-all-packages -i -ilibraries/base/. -ilibraries/base/dist-install/build -Ilibraries/base /dist-install/build -ilibraries/base/dist-install/build/./autogen -Ilibraries/base/dist-install/build/./autogen -Ilibraries/base/include -Ilibraries/base/dist-install/build/include -optP-include -optPlibraries/base/dist-install/build/./autogen/cabal_macros.h -package- id ghc-prim-0.5.3 -package-id integer-simple-0.1.1.1 -package-id rts -this-unit-id base -Wcompat -Wnoncanonical-monad-instances -XHaskell2010 -O0 -no-user-package-db -rtsopts -Wno-trustworthy-safe -Wno-deprecated- flags -Wnoncanonical-monad-instances -odir libraries/base/dist- install/build -hidir libraries/base/dist-install/build -stubdir
libraries/base/dist-install/build/GHC/Num.o ghc-stage1: panic! (the 'impossible' happened) (GHC version 8.6.3 for powerpc64-portbld-freebsd): Can't use Natural in base }}} The error message says `powerpc64-portbld-freebsd` and it could also be an instance of #15411.
On openSUSE I conditionally apply the patch (workaround) only on
Without this patch, it compiles fine on amd64, but then fails on
#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by pkubaj): Replying to [comment:23 trommler]: libraries/base/dist-install/build -c libraries/base/./GHC/Num.hs -o powerpc64, but just for fun I applied it on all platforms and build (in my home project) passes no problem. powerpc64.
The latter is due to #15411.
There is another patch that I apply to 8.6.3. That patch fixes an issue mentioned in my comments on #15399. You can find the patch in Phab:D5001.
I can see that the patch at Phab:D5001 is already in 8.6.3. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:26 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

Replying to [comment:23 trommler]:
There is another patch that I apply to 8.6.3. That patch fixes an issue mentioned in my comments on #15399. You can find the patch in Phab:D5001.
I can see that the patch at Phab:D5001 is already in 8.6.3. My bad. The additional patch is in Phab:D5212. There is no ticket for that
#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by trommler): Replying to [comment:26 pkubaj]: patch. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:27 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

Replying to [comment:26 pkubaj]:
Replying to [comment:23 trommler]:
There is another patch that I apply to 8.6.3. That patch fixes an issue mentioned in my comments on #15399. You can find the patch in Phab:D5001.
I can see that the patch at Phab:D5001 is already in 8.6.3. My bad. The additional patch is in Phab:D5212. There is no ticket for
#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by pkubaj): Replying to [comment:27 trommler]: that patch. With this patch, I have the same result. I can bootstrap on amd64 just fine, but when compiling natively on powerpc64, I get: {{{ echo "version, targetOS, targetARCH :: String" >> utils/ghc- pkg/dist/build/Version.hs echo "version = \"8.6.3\"" >> utils/ghc-pkg/dist/build/Version.hs echo "targetOS = \"freebsd\"" >> utils/ghc- pkg/dist/build/Version.hs echo "targetARCH = \"powerpc64\"" >> utils/ghc- pkg/dist/build/Version.hs "/wrkdirs/usr/ports/lang/ghc/work/ghc-8.6.3-boot/bin/ghc-8.6.3" -H32m -O -I/usr/include -L/usr/lib -I/usr/local/include -L/usr/local/lib -Wall \ -optc-O2 -optc-pipe -optc-Wall -optc-fno-stack-protector \ \ -hide-all-packages \ -package ghc-prim -package base -package array -package transformers -package time -package containers -package bytestring -package deepseq -package process -package pretty -package directory -package unix \ --make utils/ghc-cabal/Main.hs -o utils/ghc-cabal/dist/build/tmp /ghc-cabal \ -no-user-package-db \ -Wall -fno-warn-unused-imports -fno-warn-warnings-deprecations \ -DCABAL_VERSION=2,4,0,1 \ -DCABAL_PARSEC \ -DBOOTSTRAPPING \ -odir bootstrapping \ -hidir bootstrapping \ libraries/Cabal/Cabal/Distribution/Parsec/Lexer.hs \ -ilibraries/Cabal/Cabal \ -ilibraries/binary/src \ -ilibraries/filepath \ -ilibraries/hpc \ -ilibraries/mtl \ -ilibraries/text \ libraries/text/cbits/cbits.c \ -Ilibraries/text/include \ -ilibraries/parsec/src \ \ <command line>: cannot satisfy -package ghc-prim (use -v for more information) utils/genprimopcode/ghc.mk:19: utils/genprimopcode/dist/package-data.mk: No such file or directory }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:28 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

With this patch, I have the same result.
I can bootstrap on amd64 just fine, but when compiling natively on
{{{ echo "version, targetOS, targetARCH :: String" >> utils/ghc-
echo "version = \"8.6.3\"" >> utils/ghc-
echo "targetOS = \"freebsd\"" >> utils/ghc-
echo "targetARCH = \"powerpc64\"" >> utils/ghc-
#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by trommler): Replying to [comment:28 pkubaj]: powerpc64, I get: pkg/dist/build/Version.hs pkg/dist/build/Version.hs pkg/dist/build/Version.hs pkg/dist/build/Version.hs
"/wrkdirs/usr/ports/lang/ghc/work/ghc-8.6.3-boot/bin/ghc-8.6.3" -H32m -O -I/usr/include -L/usr/lib -I/usr/local/include -L/usr/local/lib -Wall \ -optc-O2 -optc-pipe -optc-Wall -optc-fno-stack-protector \ }}}
What are the steps to reproduce this? Without those it is really hard to help. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:29 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by pkubaj): OK. You need FreeBSD sources in {{{/usr/src}}} and the current ports tree in {{{/usr/ports}}} (all on amd64). {{{ cd /usr/src pkg install devel/powerpc64-xtoolchain-gcc make CROSS_TOOLCHAIN=powerpc64-gcc TARGET=powerpc TARGET_ARCH=powerpc64 buildworld make CROSS_TOOLCHAIN=powerpc64-gcc TARGET=powerpc TARGET_ARCH=powerpc64 installworld DESTDIR=/sysroots/powerpc64 make CROSS_TOOLCHAIN=powerpc64-gcc TARGET=powerpc TARGET_ARCH=powerpc64 distribution DESTDIR=/sysroots/powerpc64 }}} Now you need wrappers for toolchain. I put mine to ~/bin: powerpc64-portbld-freebsd-ar: #!/bin/sh exec /usr/local/bin/powerpc64-unknown-freebsd12.0-ar "$@" powerpc64-portbld-freebsd-g++: #!/bin/sh exec /usr/local/bin/powerpc64-unknown-freebsd12.0-g++ --sysroot=/sysroots/powerpc64 "$@" powerpc64-portbld-freebsd-gcc: #!/bin/sh exec /usr/local/bin/powerpc64-unknown-freebsd12.0-gcc --sysroot=/sysroots/powerpc64 "$@" powerpc64-portbld-freebsd-ld: #!/bin/sh exec /usr/local/bin/powerpc64-unknown-freebsd12.0-ld --sysroot=/sysroots/powerpc64 "$@" powerpc64-portbld-freebsd-nm: #!/bin/sh exec /usr/local/bin/powerpc64-unknown-freebsd12.0-gcc-nm "$@" powerpc64-portbld-freebsd-objdump: #!/bin/sh exec /usr/local/bin/powerpc64-unknown-freebsd12.0-objdump "$@" powerpc64-portbld-freebsd-ranlib: #!/bin/sh exec /usr/local/bin/powerpc64-unknown-freebsd12.0-ranlib "$@" powerpc64-portbld-freebsd-strip: #!/bin/sh exec /usr/local/bin/powerpc64-unknown-freebsd12.0-strip "$@" {{{ cd /usr/ports/lang/ghc }}} Put your patches to {{{files}}}. {{{ make patch cd work/ghc-8.6.3 cp mk/build.mk.sample mk/build.mk }}} Add to mk/build.mk: {{{ INTEGER_LIBRARY = integer-simple BIN_DIST_NAME=ghc-8.6.3-boot BIN_DIST_TAR=ghc-8.6.3-boot.tar DYNAMIC_GHC_PROGRAMS = NO }}} Then it doesn't build with dtrace): {{{ ./configure --target=powerpc64-portbld-freebsd --disable-dtrace gmake gmake binary-dist TAR_COMP=xz mv ghc-8.6.3-boot-powerpc64-portbld-freebsd.tar.xz ghc-8.6.3-boot- powerpc64-freebsd.tar.xz }}} And copy ghc-8.6.3-boot-powerpc64-freebsd.tar.xz to my POWER box to {{{/usr/ports/distfiles}}}. On it, I have the same set of patches and a patch to {{{lang/ghc/bsd.ghc.mk}}}: {{{ Index: bsd.ghc.mk =================================================================== --- bsd.ghc.mk (revision 489844) +++ bsd.ghc.mk (working copy) @@ -5,12 +5,13 @@ # Maintained by: haskell@FreeBSD.org # -ONLY_FOR_ARCHS= aarch64 amd64 armv6 armv7 i386 +ONLY_FOR_ARCHS= aarch64 amd64 armv6 armv7 i386 powerpc64 DATADIR= ${PREFIX}/share/ghc-${GHC_VERSION} EXAMPLESDIR= ${PREFIX}/share/examples/ghc-${GHC_VERSION} -USES= autoreconf gmake iconv:translit localbase:ldflags ncurses perl5 tar:xz +USES= autoreconf compiler:c11 gmake iconv:translit localbase:ldflags \ + ncurses perl5 tar:xz USE_LOCALE= en_US.UTF-8 USE_PERL5= build NO_CCACHE= ccache: error: Failed to create directory /nonexistent/.ccache/tmp: Permission denied @@ -83,6 +84,8 @@ .if empty(PORT_OPTIONS:MBOOT) . if ${ARCH} == armv6 || ${ARCH} == armv7 BOOT_GHC_VERSION= 8.4.2 +.elif ${ARCH} == powerpc64 +BOOT_GHC_VERSION= 8.6.3 . else BOOT_GHC_VERSION= 8.4.3 . endif }}} You also need to add a proper SHA256 and SIZE entries to {{{lang/ghc/distinfo}}}: {{{ SHA256 (ghc-8.6.3-boot-powerpc64-freebsd.tar.xz) = 258f4d41d2cf7977f756e6a5ac718e5ed140065d31ba89c8aee4f654d57a6315 SIZE (ghc-8.6.3-boot-powerpc64-freebsd.tar.xz) = 179817644 }}} SHA256 is returned by {{{sha256}}} and SIZE is from {{{stat -f %z ghc-8.6.3-boot-powerpc64-freebsd.tar.xz}}}. Then: {{{ cd /usr/ports/lang/ghc make (I disable all options to avoid further problems) }}} Then just wait for an error. Alternatively, you could mark a BOOT option, and install ghc locally like this. {{{ cd /usr/ports/distfiles tar xvvf ghc-8.6.3-boot-powerpc64-freebsd.tar.xz cd ghc-8.6.3-boot CFLAGS="-Wl,-rpath=/usr/local/lib/gcc8 -isystem /usr/local/include" CXXFLAGS="-Wl,-rpath=/usr/local/lib/gcc8 -isystem /usr/local/include" CC=gcc8 CXX=g++8 ./configure gmake install }}} I hope it's clear enough :) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:30 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by trommler): Replying to [comment:30 pkubaj]:
Add to mk/build.mk: {{{ INTEGER_LIBRARY = integer-simple BIN_DIST_NAME=ghc-8.6.3-boot BIN_DIST_TAR=ghc-8.6.3-boot.tar DYNAMIC_GHC_PROGRAMS = NO }}}
You want to add to `mk/build.mk`: {{{ Stage1Only = NO }}} Then you will find `inplace/bin/ghc-stage2` and that will be the compiler running on powerpc64. The file that is executed by `inplace/bin/ghc-stage1` runs on amd64 (the host machine) as you can see from the output of `file`: {{{ /ghc-8.6.2/inplace/lib> file bin/ghc-stage1 bin/ghc-stage1: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=846ac234d6774bbd928e3da433fd4f75482c0609, with debug_info, not stripped }}} Note: I built the cross compiler on Linux. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:31 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by pkubaj): I added {{{Stage1Only = NO}}} {{{ root@oamd64:$/usr/ports/lang/ghc/work/ghc-8.6.3$ tail mk/build.mk HADDOCK_DOCS = NO #EXTRA_HADDOCK_OPTS += --quickjump --hyperlinked-source # Don't strip debug and other unneeded symbols from libraries and executables. STRIP_CMD = : INTEGER_LIBRARY = integer-simple BIN_DIST_NAME=ghc-8.6.3-boot BIN_DIST_TAR=ghc-8.6.3-boot.tar DYNAMIC_GHC_PROGRAMS = NO Stage1Only = NO }}} Then: {{{ gmake clean gmake -j 8 && gmake binary-dist TAR_COMP=xz }}} But after untaring it, ghc-stage2 is still in {{{ghc/stage2/build/tmp}}}. {{{ root@talos:$/home/pkubaj/ghc-8.6.3-boot$ find . -name ghc-stage2 ./ghc/stage2/build/tmp/ghc-stage2 }}} And it's a binary: {{{ root@talos:$/home/pkubaj/ghc-8.6.3-boot$ file ./ghc/stage2/build/tmp/ghc- stage2 ./ghc/stage2/build/tmp/ghc-stage2: ELF 64-bit MSB executable, 64-bit PowerPC or cisco 7500, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, FreeBSD-style, for FreeBSD 12.0 (1200086), with debug_info, not stripped }}} I attempted to install it anyway with: {{{ CFLAGS="-Wl,-rpath=/usr/local/lib/gcc8 -isystem /usr/local/include" CXXFLAGS="-Wl,-rpath=/usr/local/lib/gcc8 -isystem /usr/local/include" CC=gcc8 CXX=g++8 ./configure gmake install }}} This threw the following error: {{{ ghc-cabal: '/usr/local/lib/ghc-8.6.3/bin/ghc-pkg' exited with an error: ghc-boot-th-8.6.3: Warning: haddock-interfaces: /usr/local/share/doc/ghc-8.6.3/html/libraries/ghc-boot-th-8.6.3/ghc-boot- th.haddock doesn't exist or isn't a file ghc-boot-th-8.6.3: dependency "base-4.12.0.0" doesn't exist (use --force to override) gmake[1]: *** [ghc.mk:991: install_packages] Error 1 gmake: *** [Makefile:51: install] Error 2 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:32 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by pkubaj): Would a full build log from amd64 help? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:33 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by trommler): Replying to [comment:32 pkubaj]:
Then: {{{ gmake clean gmake -j 8 && gmake binary-dist TAR_COMP=xz }}} On amd64, what is the contents of `inplace/bin` after the above?
On powerpc64, what is your PATH environment variable set to, when you install? You want `/usr/local/bin` before `/usr/bin` so during installation new binutils are used. Can you also add the output of `ldd /usr/local/lib/ghc-8.6.3/bin/ghc-pkg`? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:34 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by trommler): Replying to [comment:33 pkubaj]:
Would a full build log from amd64 help? Why don't you just attach it to the ticket and I'll have a look.
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:35 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by pkubaj): I'm running build with one thread (so that it's clearer to look at, but it will take a while to build). My PATH is definitely wrong, though: {{{ /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:36 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by pkubaj): {{{ root@openvas:$/usr/ports/lang/ghc/work/ghc-8.6.3/inplace/bin$ ls count_lines deriveConstants genapply genprimopcode ghc-cabal ghc-pkg ghc-stage1 ghc-stage2 hp2ps hpc hsc2hs mkdirhier runghc }}} {{{ root@openvas:$/usr/ports/lang/ghc/work/ghc-8.6.3$ tar tvvf ghc-8.6.3-boot- powerpc64-portbld-freebsd.tar.xz | grep inplace -rwxr-xr-x 0 root wheel 43 Jan 13 19:42 ghc-8.6.3-boot/inplace/bin/mkdirhier -rwxr-xr-x 0 root wheel 8864 Jan 13 20:15 ghc-8.6.3-boot/inplace/lib/bin/ghc-split }}} So it looks like {{{binary-dist}}} step is wrong. I'll soon upload a full log. ldd: {{{ /usr/local/lib/ghc-8.6.3/bin/ghc-pkg: libm.so.5 => /lib/libm.so.5 (0x811318000) libncursesw.so.8 => /lib/libncursesw.so.8 (0x81135e000) libutil.so.9 => /lib/libutil.so.9 (0x8113e4000) librt.so.1 => /usr/lib/librt.so.1 (0x81140f000) libdl.so.1 => /usr/lib/libdl.so.1 (0x811427000) libthr.so.3 => /lib/libthr.so.3 (0x811439000) libc.so.7 => /lib/libc.so.7 (0x811483000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x8117ea000) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:37 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Changes (by pkubaj): * Attachment "ghc.log.xz" added. log file -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by pkubaj): Log has ./configure, gmake and gmake binary-dist steps. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:38 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

So it looks like {{{binary-dist}}} step is wrong. I'll soon upload a full log. No, it is fine. A binary dist is prepared so the files in it can be installed, and for that it doesn't need most of the `inplace` scripts.
ldd (on powerpc64): {{{ /usr/local/lib/ghc-8.6.3/bin/ghc-pkg: libm.so.5 => /lib/libm.so.5 (0x811318000) libncursesw.so.8 => /lib/libncursesw.so.8 (0x81135e000) libutil.so.9 => /lib/libutil.so.9 (0x8113e4000) librt.so.1 => /usr/lib/librt.so.1 (0x81140f000) libdl.so.1 => /usr/lib/libdl.so.1 (0x811427000) libthr.so.3 => /lib/libthr.so.3 (0x811439000) libc.so.7 => /lib/libc.so.7 (0x811483000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x8117ea000) }}} Here we are at something. `libgcc_s.so.1` is taken from `/lib` while it should be coming from `gcc8`. Did you set `CFLAGS` and`LDFLAGS` to also point gcc's
#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by trommler): Replying to [comment:37 pkubaj]: directory on powerpc64 (with `-Wl,rpath=...`) when you were building on amd64? Could you also post the output of `readelf -d /usr/local/lib/ghc-8.6.3/bin /ghc-pkg` on powerpc64? I am only interested in lines that contain `RUNPATH` or `RPATH`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:39 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by pkubaj): My wrappers for GCC have {{{--sysroot}}} option: {{{ root@openvas:$~$ cat /root/bin/powerpc64-portbld-freebsd-gcc #!/bin/sh exec /usr/local/bin/powerpc64-unknown-freebsd12.0-gcc --sysroot=/sysroots/powerpc64 "$@" }}} {{{ root@openvas:$~$ cat /root/bin/powerpc64-portbld-freebsd-ld #!/bin/sh exec /usr/local/bin/powerpc64-unknown-freebsd12.0-ld --sysroot=/sysroots/powerpc64 "$@" }}} This should take care of {{{CFLAGS}}} and {{{LDFLAGS}}}. There are no {{{RUNPATH}}} or {{{RPATH}}} entries: {{{ root@talos:$~$ readelf -d /usr/local/lib/ghc-8.6.3/bin/ghc-pkg | awk '/RUNPATH/ || /RPATH/' root@talos:$~$ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:40 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by trommler): Replying to [comment:40 pkubaj]:
This should take care of {{{CFLAGS}}} and {{{LDFLAGS}}}.
There are no {{{RUNPATH}}} or {{{RPATH}}} entries: {{{ root@talos:$~$ readelf -d /usr/local/lib/ghc-8.6.3/bin/ghc-pkg | awk '/RUNPATH/ || /RPATH/' root@talos:$~$ }}} This explains why ghc-pkg is picking up `libgcc_s.so.1` from `/lib`. You want to make sure `/usr/local/lib/gcc8/libgcc_s.so.1` shows up in `ldd ghc-pkg`.
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:41 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by trommler): Replying to [comment:38 pkubaj]:
Log has ./configure, gmake and gmake binary-dist steps. The cross compiler on amd64 is gcc 6.4 while on powerpc64 it is gcc 8. Could you make sure both versions agree? I want to get as many potential sources of trouble out of the equation.
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:42 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by trommler): Replying to [comment:32 pkubaj]:
I attempted to install it anyway with: {{{ CFLAGS="-Wl,-rpath=/usr/local/lib/gcc8 -isystem /usr/local/include" CXXFLAGS="-Wl,-rpath=/usr/local/lib/gcc8 -isystem /usr/local/include" CC=gcc8 CXX=g++8 ./configure gmake install }}} It is too late to specify `-Wl,-rpath=/usr/local/lib/gcc8` during install, you need to do it on amd64 during build-time. Installing a binary-dist does not re-link libraries like `libtool` AFAIK.
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:43 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: 15411 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Comment (by mikael.urankar): I managed to build ghc-8.6.3 on FreeBSD powerpc64: https://reviews.freebsd.org/D18886 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:44 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15916: GHC doesn't build on powerpc64 architecture on systems other than GNU / Linux -------------------------------------+------------------------------------- Reporter: pkubaj | Owner: trommler Type: feature request | Status: closed Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.6.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc64 Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: 15411 | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/81 -------------------------------------+------------------------------------- Changes (by trommler): * status: patch => closed * resolution: => fixed * related: => 15411 * blockedby: 15411 => Comment: Replying to [comment:44 mikael.urankar]:
I managed to build ghc-8.6.3 on FreeBSD powerpc64: https://reviews.freebsd.org/D18886 Excellent.
I'll switch my PowerMac to FreeBSD when GHC is available for it in ports. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15916#comment:45 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC