[MacPorts] #65157: ghc @9.2.2 error on 10.6.8: dyld: Symbol not found: _environ, expected in: /opt/x86_64/lib/libMacportsLegacySystem.B.dylib

MacPorts noreply at macports.org
Sun May 15 00:59:39 UTC 2022


#65157: ghc @9.2.2 error on 10.6.8: dyld: Symbol not found: _environ, expected in:
/opt/x86_64/lib/libMacportsLegacySystem.B.dylib
---------------------------+---------------------------------
  Reporter:  barracuda156  |      Owner:  essandess
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.7.2
Resolution:                |   Keywords:  x86_64, snowleopard
      Port:  ghc           |
---------------------------+---------------------------------

Comment (by barracuda156):

 Replying to [comment:9 kencu]:
 > ghc is set up to build one and two newer versions of itself.
 >
 > So ghc 9.0.2 would be expected to build ghc 9.2.x and 9.4.x, but not
 9.6.x when it comes along.
 >
 > Therefore, you should be able to build ghc 9.2.2 using the ghc 9.0.x I
 fixed for SnowLeopard here:
 >
 > https://github.com/kencu/ghc-for-older-darwin-
 systems/releases/download/9.0.1/ghc-9.0.1-x86_64-apple-darwin10.tar.xz

 I tried to install it now, but it ignores `--with-gcc=` flag:
 {{{
 macmini:~ svacchanda$ cd /Users/svacchanda/GHC_Kencu/ghc-9.0.1
 macmini:ghc-9.0.1 svacchanda$ ./configure --prefix=/opt/svacchanda/ghc9
 --with-gcc=/opt/svacchanda/gcc11/bin/gcc
 configure: WARNING: unrecognized options: --with-gcc
 checking build system type... x86_64-apple-darwin10.8.0
 checking host system type... x86_64-apple-darwin10.8.0
 checking target system type... x86_64-apple-darwin10.8.0
 Build platform inferred as: x86_64-apple-darwin
 Host platform inferred as: x86_64-apple-darwin
 Target platform inferred as: x86_64-apple-darwin
 GHC build  : x86_64-apple-darwin
 GHC host   : x86_64-apple-darwin
 GHC target : x86_64-apple-darwin
 LLVM target: x86_64-apple-darwin
 checking for path to top of build tree...
 /Users/svacchanda/GHC_Kencu/ghc-9.0.1
 checking for a BSD-compatible install... /opt/local/bin/ginstall -c
 checking whether ln -s works... yes
 checking for gsed... /opt/local/bin/gsed
 checking for python3... no
 checking Xcode version... not found (too old?)
 checking for gcc... gcc
 checking whether the C compiler works... yes
 checking for C compiler default output file name... a.out
 checking for suffix of executables...
 checking whether we are cross compiling... no
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc accepts -g... yes
 checking for gcc option to accept ISO C89... none needed
 checking how to run the C preprocessor... gcc -E
 checking for gcc option to accept ISO C99... -std=gnu99
 checking for gcc option to accept ISO C99... -std=gnu99
 checking for gcc option to accept ISO C99... -std=gnu99
 checking for -ld.lld... no
 checking for ld.lld... no
 checking for -ld.gold... no
 checking for ld.gold... no
 checking for -ld... no
 checking for ld... ld
 ld: unknown option: --version
 configure: unknown linker version
 configure: unable to convince 'gcc' to use linker 'ld'
 checking for -ld... no
 checking for ld... ld
 checking for ld.gold object merging bug (binutils 22266)... ld: unknown
 option: --version
 checking whether ld is GNU ld... NO
 checking whether ld understands --build-id... no
 checking whether ld understands -no_compact_unwind... yes
 checking whether ld understands -filelist... yes
 checking for -strip... no
 checking for strip... strip
 checking for llc-9... no
 checking for llc-9.0... no
 checking for llc... no
 checking for opt-9... no
 checking for opt-9.0... no
 checking for opt... no
 checking version of gcc... checking version of gcc... 4.2.1
 configure: error: Need at least gcc version 4.7 (newer recommended)
 }}}

 What to do? )
 `gcc11` I point to is build for `x86_64`, of course:
 {{{
 macmini:ghc-9.0.1 svacchanda$ /opt/svacchanda/gcc11/bin/gcc -v
 Using built-in specs.
 COLLECT_GCC=/opt/svacchanda/gcc11/bin/gcc
 COLLECT_LTO_WRAPPER=/opt/svacchanda/gcc11/libexec/gcc/x86_64-apple-
 darwin10/11.2.0/lto-wrapper
 Target: x86_64-apple-darwin10
 Configured with: /Users/svacchanda/Dev/gcc11/gcc-11.2.0/configure
 --prefix=/opt/svacchanda/gcc11 --build=x86_64-apple-darwin10 --with-
 as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=all --with-tune-
 cpu=ivybridge CC=/opt/svacchanda/gcc10/bin/gcc
 CXX=/opt/svacchanda/gcc10/bin/g++ --with-sysroot=/ --enable-host-shared
 --disable-nls
 Thread model: posix
 Supported LTO compression algorithms: zlib
 gcc version 11.2.0 (GCC)
 }}}

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


More information about the macports-tickets mailing list