Created attachment 181588 [details] Straightforward patch ghc, which devel/stack depends on, pulls in GCC via USE_GCC=yes. devel/stack itself also has a dependency of ${LOCALBASE}/bin/gcc:lang/gcc So, when/if USE_GCC=yes implies a different one of the lang/gcc* ports (which will happen after PR 218330 or when the user sets a different version of GCC via Mk/bsd.default-versions.mk), devel/stacks pulls in two conflicting ports - lang/gcc and lang/gcc5 - in the first case, or pulls in the wrong port for its own dependency. See http://package18.nyi.freebsd.org/data/110amd64-default-PR218330/2017-04-06_19h28m41s/logs/errors/stack-1.4.0.log for an example (with the patch from PR 218330 applied). The most straightforward patch would be the one I am attaching here.
I added the dependency because some Haskell packages by default assume that "gcc" is available in the PATH. Something that AFAICT USE_GCC=yes does not guarantee. For example 'stack install idris' will fail if "gcc" is not in the PATH: gmake: Entering directory '/tmp/stack61184/idris-1.0/rts' gmake: gcc: Command not found ldd: illegal option -- - usage: ldd [-a] [-v] [-f format] program ... gcc -O2 -Wall -DHAS_PTHREAD -DIDRIS_ENABLE_STATS -I/usr/local/include -DIDRIS_TARGET_OS="\"unix\"" -DIDRIS_TARGET_TRIPLE="\"\"" -fPIC -c -o idris_rts.o idris_rts.c /bin/sh: gcc: not found In the case of Idris this can be solved with 'env CC=clang stack install idris'. Since not all Haskell applications/libraries require gcc or workarounds like this, I think I'd prefer removing the forced gcc run dependency instead.
(In reply to Tobias Kortkamp from comment #1) > Since not all Haskell applications/libraries require gcc or > workarounds like this, I think I'd prefer removing the forced gcc run > dependency instead. From the lang/gcc* ports perspective that certainly would be even easier. Are you going to make this change? (This is one of the two last issues blocking PR 218330 ;-), so any help is appreciated.)
A commit references this bug: Author: tobik Date: Fri Apr 28 13:08:04 UTC 2017 New revision: 439606 URL: https://svnweb.freebsd.org/changeset/ports/439606 Log: Remove gcc run dependency - ghc uses USE_GCC=yes and when USE_GCC=yes implies a different one of the lang/gcc* ports (which will happen after PR 218330 or when the user sets a different version of GCC via Mk/bsd.default-versions.mk), devel/stacks pulls in two conflicting ports - lang/gcc and lang/gcc5 - in the first case, or pulls in the wrong port for its own dependency. - Some Haskell libraries/programs require gcc in the PATH, but not all do; the port should not have a gcc dependency for this reason alone. PR: 218482 Reported by: gerald Approved by: lme (mentor) Differential Revision: https://reviews.freebsd.org/D10459 Changes: head/devel/stack/Makefile
Fixed. Sorry that it took so long.