[MacPorts] #19856: ghc: uses "gcc"
#19856: ghc: uses "gcc" -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: gwright@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: ghc -------------------------------------+-------------------------------------- ghc builds using the compiler "`gcc`". Ports should instead build using the compiler specified in the variable ${configure.cc} to prevent unexpected side-effects when a user has selected a nonstandard compiler using `gcc_select`. -- Ticket URL: <http://trac.macports.org/ticket/19856> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19856: ghc: uses "gcc" -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: gwright@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: ghc -------------------------------------+-------------------------------------- Comment(by ryandesign@…): One side-effect of using gcc_select is documented in duplicate #19873. -- Ticket URL: <http://trac.macports.org/ticket/19856#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19856: ghc: uses "gcc" -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: gwright@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: ghc -------------------------------------+-------------------------------------- Changes (by gwright@…): * status: new => assigned Comment: Yes, this needs to be changed. The makefile probably ignores the usual environment variable, but there is a --with-gcc option. I'll give that a try. -- Ticket URL: <http://trac.macports.org/ticket/19856#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19856: ghc: uses "gcc" -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: gwright@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: ghc -------------------------------------+-------------------------------------- Comment(by gwright@…): Ugh. The ghc makefile system is OK, but the problem is in the internal cabal used to build the libraries. It ignores the top level environment variable and configure settings, and goes off scouring the PATH for plausible binaries. This will have to be fixed by patching all of the cabal configure statements. The patches are just modifications of the ones used by the cabal_configure_debug variant, but this kind of crap ought not to be happening. -- Ticket URL: <http://trac.macports.org/ticket/19856#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19856: ghc: uses "gcc" -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: gwright@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: ghc -------------------------------------+-------------------------------------- Comment(by gwright@…): r53708 should fix this. -- Ticket URL: <http://trac.macports.org/ticket/19856#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19856: ghc: uses "gcc" -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: gwright@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: ghc -------------------------------------+-------------------------------------- Comment(by ryandesign@…): Replying to [comment:2 gwright@…]:
there is a --with-gcc option. I'll give that a try. Yes, I had hoped that would suffice, but when I tried it, it still got "gcc" from somewhere.
Replying to [comment:4 gwright@…]:
r53708 should fix this. Unfortunately I still see the problem, on Tiger/Intel.
-- Ticket URL: <http://trac.macports.org/ticket/19856#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19856: ghc: uses "gcc" -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: gwright@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: ghc -------------------------------------+-------------------------------------- Comment(by gwright@…): Replying to [comment:5 ryandesign@…]:
Replying to [comment:2 gwright@…]:
there is a --with-gcc option. I'll give that a try. Yes, I had hoped that would suffice, but when I tried it, it still got "gcc" from somewhere.
Replying to [comment:4 gwright@…]:
r53708 should fix this. Unfortunately I still see the problem, on Tiger/Intel. Can you build with the +cabal_configure_debug variant and send (or attach) the output? On Leopard/intel r53708 fixed the problem for me (all invocations of gcc were to the specified ${configure.cc}, none to "/usr/bin/gcc"). There are only a finite number of places to patch, so it should be possible to track it down quickly.
-- Ticket URL: <http://trac.macports.org/ticket/19856#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19856: ghc: uses "gcc" -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: gwright@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: ghc -------------------------------------+-------------------------------------- Comment(by gwright@…): Replying to [comment:6 gwright@…]:
Replying to [comment:5 ryandesign@…]:
Replying to [comment:2 gwright@…]:
there is a --with-gcc option. I'll give that a try. Yes, I had hoped that would suffice, but when I tried it, it still got "gcc" from somewhere.
Replying to [comment:4 gwright@…]:
r53708 should fix this. Unfortunately I still see the problem, on Tiger/Intel. Can you build with the +cabal_configure_debug variant and send (or attach) the output? On Leopard/intel r53708 fixed the problem for me (all invocations of gcc were to the specified ${configure.cc}, none to "/usr/bin/gcc"). There are only a finite number of places to patch, so it should be possible to track it down quickly.
I just finished building revision 6 on Tiger/ppc and did not see any "gcc"s in the build log. If you can provide a log of the failure you saw it would be a big help. -- Ticket URL: <http://trac.macports.org/ticket/19856#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19856: ghc: uses "gcc" -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: gwright@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: ghc -------------------------------------+-------------------------------------- Comment(by ryandesign@…): On Tiger/Intel, ghc @6.10.3_7 (with or without the +cabal_configure_debug variant) says: {{{ checking for path to top of build tree... gcc -I. -I/mp/include -c /tmp/ghc9619_0/ghc9619_0.s -o pwd.o gcc: Error: You should be using ${configure.cc} See http://trac.macports.org/wiki/UsingTheRightCompiler }}} That's these lines in the configure script: {{{ { $as_echo "$as_me:$LINENO: checking for path to top of build tree" >&5 $as_echo_n "checking for path to top of build tree... " >&6; } if test ! -f utils/pwd/pwd && test ! -f utils/pwd/pwd.exe; then cd utils/pwd rm -f *.o rm -f *.hi rm -f pwd rm -f pwd.exe $WithGhc -v0 --make pwd -o pwd cd ../.. fi }}} $WithGhc presumably is the ghc-bootstrap/bin/ghc binary, and I can replicate the problem myself running that command, if I set up the environment the same: {{{ cd $(port work ghc)/ghc-6.10.3/utils/pwd PATH=/mp/bin/no_default_gcc:/bin:/sbin:/usr/bin:/usr/sbin \ DYLD_LIBRARY_PATH=../../../ghc-bootstrap/lib:/mp/lib \ ../../../ghc-bootstrap/bin/ghc -v0 --make pwd -o pwd gcc -I. -I/mp/include -c /tmp/ghc9734_0/ghc9734_0.s -o pwd.o gcc: Error: You should be using ${configure.cc} See http://trac.macports.org/wiki/UsingTheRightCompiler }}} So ghc-bootstrap/bin/ghc is itself running "gcc". Would that maybe be fixed if this ghc bootstrap had been compiled with the --with-gcc flag pointing at the right compiler, or is there maybe a runtime switch that can be given to ghc to tell it where gcc is? -- Ticket URL: <http://trac.macports.org/ticket/19856#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19856: ghc: uses "gcc" -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: gwright@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: ghc -------------------------------------+-------------------------------------- Comment(by gwright@…): Thank you for tracking that down. There were two separate problems here. Some of the makefiles did not pass the right flags to cabal, which then searched the PATH for the first gcc that turned up. r53708 fixed that. The second problem is the one you showed, that the bootstrap compiler invokes the incorrect gcc. Might only need to patch build.mk with the -pgmc flag. I will give it a try. -- Ticket URL: <http://trac.macports.org/ticket/19856#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19856: ghc: uses "gcc" -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: gwright@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: ghc -------------------------------------+-------------------------------------- Comment(by gwright@…): It is ugly be eventually fixable. There are a number of hand-written portfiles that invoke the bootstrap or new ghc with inconsistent options. These all have to be patched. Will take a few days. -- Ticket URL: <http://trac.macports.org/ticket/19856#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19856: ghc: uses "gcc" --------------------------------------+------------------------------------- Reporter: ryandesign@… | Owner: gwright@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Resolution: fixed | Keywords: Port: ghc | --------------------------------------+------------------------------------- Changes (by gwright@…): * status: assigned => closed * resolution: => fixed Comment: Fixed in r56583. As I mentioned, the fix was ugly. Now that all of the files that need to be patched are known, I will try to get this fixed upstream. -- Ticket URL: <http://trac.macports.org/ticket/19856#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts