[MacPorts] #64698: approach to fix Haskell (GHC) for PowerPC: some progress, ghc @7.6.3 builds for ppc

MacPorts noreply at macports.org
Sun Feb 20 20:40:02 UTC 2022


#64698: approach to fix Haskell (GHC) for PowerPC: some progress, ghc @7.6.3 builds
for ppc
---------------------------------+------------------------------
  Reporter:  barracuda156        |      Owner:  (none)
      Type:  enhancement         |     Status:  new
  Priority:  Normal              |  Milestone:
 Component:  ports               |    Version:  2.7.1
Resolution:                      |   Keywords:  powerpc, leopard
      Port:  ghc, ghc-bootstrap  |
---------------------------------+------------------------------

Comment (by barracuda156):

 Okay, on Tiger we got a problem. Apparently ghc 7.0.1 is built against
 system version of libiconv which does not exist in Tiger.


 {{{
 44-49:~ svacchanda$ sudo port -v install ghc-ppc-bootstrap
 Password:
 Portfile changed since last build; discarding previous state.
 --->  Computing dependencies for ghc-ppc-bootstrap.
 --->  Fetching distfiles for ghc-ppc-bootstrap
 --->  Verifying checksums for ghc-ppc-bootstrap
 --->  Checksumming ghc-7.0.1-powerpc-apple-darwin.tar.bz2
 --->  Extracting ghc-ppc-bootstrap
 --->  Extracting ghc-7.0.1-powerpc-apple-darwin.tar.bz2
 Executing:  cd "/opt/local/var/macports/build/_opt_PPCTigerPorts_lang_ghc-
 ppc-bootstrap/ghc-ppc-bootstrap/work" && /usr/bin/bzip2 -dc
 '/opt/local/var/macports/distfiles/ghc-ppc-bootstrap/ghc-7.0.1-powerpc-
 apple-darwin.tar.bz2' | /usr/bin/gnutar --no-same-owner -xf -
 --->  Configuring ghc-ppc-bootstrap
 Executing:  cd "/opt/local/var/macports/build/_opt_PPCTigerPorts_lang_ghc-
 ppc-bootstrap/ghc-ppc-bootstrap/work/ghc-7.0.1" && ./configure
 --prefix=/opt/local/share/ghc-ppc-bootstrap --with-macosx-deployment-
 target=10.4 --with-libiconv-prefix=/opt/local/lib
 checking for path to top of build tree... dyld: Library not loaded:
 /usr/lib/libiconv.2.dylib
   Referenced from: /opt/local/var/macports/build
 /_opt_PPCTigerPorts_lang_ghc-ppc-bootstrap/ghc-ppc-
 bootstrap/work/ghc-7.0.1/utils/ghc-pwd/ghc-pwd
   Reason: Incompatible library version: ghc-pwd requires version 7.0.0 or
 later, but libiconv.2.dylib provides version 5.0.0
 configure: error: cannot determine current directory
 Command failed:  cd "/opt/local/var/macports/build
 /_opt_PPCTigerPorts_lang_ghc-ppc-bootstrap/ghc-ppc-
 bootstrap/work/ghc-7.0.1" && ./configure --prefix=/opt/local/share/ghc-
 ppc-bootstrap --with-macosx-deployment-target=10.4 --with-libiconv-
 prefix=/opt/local/lib
 Exit code: 1
 Error: Failed to configure ghc-ppc-bootstrap: consult
 /opt/local/var/macports/build/_opt_PPCTigerPorts_lang_ghc-ppc-bootstrap
 /ghc-ppc-bootstrap/work/ghc-7.0.1/config.log
 Error: Failed to configure ghc-ppc-bootstrap: configure failure: command
 execution failed
 }}}


 Do I get it correctly that we are out of luck with 7.0.1 for Tiger, since
 it is pre-built and we cannot use Macports libiconv instead?

 To be sure, I tried adding to port file this:


 {{{
 platform darwin 8 powerpc {
                 depends_lib-append port:libiconv
                 configure.cflags-append "-I${prefix}/include"
                 configure.ldflags-append "-L/usr/lib"
                 configure.env-append
 DYLD_FALLBACK_LIBRARY_PATH=${prefix}/lib
                 configure.args-append --with-macosx-deployment-target=10.4
 \
                                                           --with-libiconv-
 prefix=${prefix}/lib
                 configure.compiler-append apple-gcc-4.2
 }
 }}}

 Configure failed identically.

 Personally it is not a big deal, I just thought initially to solve the
 problem for all PPC systems. We may accept that it will be broken for
 Tiger, if no easy fix is there.

 P. S. I see people are having pains with libiconv and ghc:
 https://trac.macports.org/ticket/57821
 https://trac.macports.org/ticket/61222

-- 
Ticket URL: <https://trac.macports.org/ticket/64698#comment:19>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list