
Hi, Today I was building HEAD using macports and had the error: configure: Using compiler: ../../compiler/ghc-inplace configure: Compiler flavor: GHC configure: Compiler version: 6.7.20070607 configure: Using package tool: ../../utils/ghc-pkg/ghc-pkg-inplace checking for gcc... gcc checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. (this was in libraries/base). The config.log showed the problem: configure:1680: checking for C compiler default output file name configure:1683: gcc -I/opt/local/include --configure-option=-O2 -I/ opt/local/include --configure-option=-I/opt/local/include -L/opt/ local/lib --configure-option=-L/opt/local/lib conftest.c >&5 cc1: error: unrecognized command line option "-fconfigure-option=-O2" cc1: error: unrecognized command line option "-fconfigure-option=-I/ opt/local/include"cc1: error: unrecognized command line option "- fconfigure-option=-L/opt/local/lib"configure:1686: $? = 1 It looks like cabal is messed up, passing "--configure-option=" when it should be stripping it out. Is this a problem with the HEAD branch or do I need a development version of cabal from the darcs repository to build the latest ghc? Best Wishes, Greg

On Thu, Jun 07, 2007 at 11:56:35AM -0400, Gregory Wright wrote:
Is this a problem with the HEAD branch or do I need a development version of cabal from the darcs repository to build the latest ghc?
I'm not sure exactly what you mean. You need the latest darcs Cabal in libraries/Cabal in your GHC tree, and if this is a tree that you have previously built then you may also need to first remove libraries/stamp/bootstrapping.Cabal. However, you don't need the latest Cabal registered with the GHC that you are building /with/. Thanks Ian

Hi Ian, On Jun 8, 2007, at 11:24 AM, Ian Lynagh wrote:
On Thu, Jun 07, 2007 at 11:56:35AM -0400, Gregory Wright wrote:
Is this a problem with the HEAD branch or do I need a development version of cabal from the darcs repository to build the latest ghc?
I'm not sure exactly what you mean. You need the latest darcs Cabal in libraries/Cabal in your GHC tree, and if this is a tree that you have previously built then you may also need to first remove libraries/stamp/bootstrapping.Cabal. However, you don't need the latest Cabal registered with the GHC that you are building /with/.
I started by deleting my old directory and doing a fresh get from the darcs repository so there was nothing left over from a previous build. It looks as if something is broken then. For example, "--configure-option=-O2" is showing up in the command line of gcc when one of the test programs is built by the configure script in libraries/base. I assume that this should just have been "- O2". The configure script fails because gcc barfs on the unrecognized option. So no new dependencies have been introduced in the HEAD build as I understand it. Anyone else have problems building HEAD in the last couple of days. I know it's not just me; it was reported to me by another person using macports to build HEAD. Best Wishes, Greg

Hi Gregory, On Fri, Jun 08, 2007 at 11:35:04AM -0400, Gregory Wright wrote:
I started by deleting my old directory and doing a fresh get from the darcs repository so there was nothing left over from a previous build. It looks as if something is broken then. For example, "--configure-option=-O2" is showing up in the command line of gcc when one of the test programs is built by the configure script in libraries/base. I assume that this should just have been "- O2". The configure script fails because gcc barfs on the unrecognized option.
Hmm, what is the complete command (i.e. with all arguments) that starts "cd base && setup/Setup configure"? Do you have a mk/build.mk? Thanks Ian

Hi Ian, On Jun 8, 2007, at 12:03 PM, Ian Lynagh wrote:
Hmm, what is the complete command (i.e. with all arguments) that starts "cd base && setup/Setup configure"?
make -C libraries all rm -f -f stamp/configure.library.*.base base/unbuildable ( cd base && setup/Setup configure \ --enable-library-profiling --enable-split-objs \ --prefix=/opt/local/var/db/dports/build/ _Users_gwright_src_macports-trunk_dports_lang_ghc-devel/work/ destroot//opt/local \ --with-compiler=../../compiler/ghc-inplace \ --with-hc-pkg=../../utils/ghc-pkg/ghc-pkg-inplace \ --with-hsc2hs=../../utils/hsc2hs/hsc2hs-inplace \ --with-ld=/usr/bin/ld \ --datasubdir=ghc \ --haddock-args="--use-contents=../index.html \ --use-index=../doc-index.html" \ --configure-option='--prefix=/opt/local' --configure- option='--prefix=/opt/local/var/db/dports/build/ _Users_gwright_src_macports-trunk_dports_lang_ghc-devel/work/ destroot//opt/local' --configure-option='--mandir=/opt/local/var/db/ dports/build/_Users_gwright_src_macports-trunk_dports_lang_ghc-devel/ work/destroot//opt/local/share/man/' --configure-option='--with- readline-includes=/opt/local/include' --configure-option='--with- readline-libraries=/opt/local/lib' --configure-option='--with-gmp- includes=/opt/local/include' --configure-option='--with-gmp- libraries=/opt/local/lib' --configure-option='--disable-openal' -- configure-option='--disable-alut' --configure-option='CFLAGS=-I/opt/ local/include --configure-option=-O2' --configure-option='CPPFLAGS=-I/ opt/local/include --configure-option=-I/opt/local/include' -- configure-option='LDFLAGS=-L/opt/local/lib --configure-option=-L/opt/ local/lib' \ --configure-option=--with-cc=gcc ) \ && touch stamp/configure.library.build-profiling- splitting.base || touch base/unbuildable Setup: Warning: Unknown field 'nhc98-options' configure: Reading installed packages... Configuring base-2.1... configure: Using install prefix: /opt/local/var/db/dports/build/ _Users_gwright_src_macports-trunk_dports_lang_ghc-devel/work/destroot/ opt/local configure: Binaries installed in: /opt/local/var/db/dports/build/ _Users_gwright_src_macports-trunk_dports_lang_ghc-devel/work/destroot/ opt/local/bin configure: Libraries installed in: /opt/local/var/db/dports/build/ _Users_gwright_src_macports-trunk_dports_lang_ghc-devel/work/destroot/ opt/local/lib/base-2.1/ghc-6.7.20070608 configure: Private binaries installed in: /opt/local/var/db/dports/ build/_Users_gwright_src_macports-trunk_dports_lang_ghc-devel/work/ destroot/opt/local/libexec configure: Data files installed in: /opt/local/var/db/dports/build/ _Users_gwright_src_macports-trunk_dports_lang_ghc-devel/work/destroot/ opt/local/share/ghc configure: Using compiler: ../../compiler/ghc-inplace configure: Compiler flavor: GHC configure: Compiler version: 6.7.20070608 configure: Using package tool: ../../utils/ghc-pkg/ghc-pkg-inplace configure: Using ar found on system at: /usr/bin/ar configure: Using haddock found on system at: /opt/local/bin/haddock configure: Using ld given by user at: /usr/bin/ld configure: No pfesetup found configure: Using ranlib found on system at: /usr/bin/ranlib configure: Using runghc found on system at: /opt/local/bin/runghc configure: Using runhugs found on system at: /opt/local/bin/runhugs configure: Using tar found on system at: /usr/bin/tar configure: Using happy: /opt/local/bin/happy configure: Using alex: /opt/local/bin/alex configure: Using hsc2hs: ../../utils/hsc2hs/hsc2hs-inplace configure: Using c2hs: /opt/local/bin/c2hs configure: Using cpphs: /opt/local/bin/cpphs configure: No greencard found configure: Reading installed packages... Configuring base-2.1... configure: Dependency rts-any: using rts-1.0 configure: Using install prefix: /opt/local/var/db/dports/build/ _Users_gwright_src_macports-trunk_dports_lang_ghc-devel/work/destroot/ opt/local configure: Binaries installed in: /opt/local/var/db/dports/build/ _Users_gwright_src_macports-trunk_dports_lang_ghc-devel/work/destroot/ opt/local/bin configure: Libraries installed in: /opt/local/var/db/dports/build/ _Users_gwright_src_macports-trunk_dports_lang_ghc-devel/work/destroot/ opt/local/lib/base-2.1/ghc-6.7.20070608 configure: Private binaries installed in: /opt/local/var/db/dports/ build/_Users_gwright_src_macports-trunk_dports_lang_ghc-devel/work/ destroot/opt/local/libexec configure: Data files installed in: /opt/local/var/db/dports/build/ _Users_gwright_src_macports-trunk_dports_lang_ghc-devel/work/destroot/ opt/local/share/ghc configure: Using compiler: ../../compiler/ghc-inplace configure: Compiler flavor: GHC configure: Compiler version: 6.7.20070608 configure: Using package tool: ../../utils/ghc-pkg/ghc-pkg-inplace checking for gcc... gcc checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. configure: Using ar found on system at: /usr/bin/ar configure: Using haddock found on system at: /opt/local/bin/haddock configure: Using ld given by user at: /usr/bin/ld configure: No pfesetup found configure: Using ranlib found on system at: /usr/bin/ranlib configure: Using runghc found on system at: /opt/local/bin/runghc configure: Using runhugs found on system at: /opt/local/bin/runhugs configure: Using tar found on system at: /usr/bin/tar configure: Using happy: /opt/local/bin/happy configure: Using alex: /opt/local/bin/alex configure: Using hsc2hs: ../../utils/hsc2hs/hsc2hs-inplace configure: Using c2hs: /opt/local/bin/c2hs configure: Using cpphs: /opt/local/bin/cpphs configure: No greencard found ifBuildable/ifBuildable base setup/Setup build \ --ghc-option=-O --ghc-option=-Rghc- timing --ghc-option=-fgenerics ifBuildable: base is unbuildable make[1]: *** [build.library.base] Error 1 make: *** [stage1] Error 2 Error: Target com.apple.build returned: shell command "env DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib make all" returned error 2
Do you have a mk/build.mk?
Here is mk/build.mk. Some of these may be obsolete; I think this is mostly unchanged from 6.5 days when more hints were needed to link libraries not in the usual locations. # # Local configuration overrides for DarwinPorts # SRC_CC_OPTS += -I/opt/local/include SRC_HC_OPTS += -I/opt/local/include -I/usr/include -L/opt/local/lib - L/usr/lib EXTRA_HSC2HS_OPTS += -I/opt/local/include EXTRA_LD_OPTS += -L/opt/local/lib EXTRA_LD_OPTS += -L/usr/lib ~ Best Wishes, Greg
participants (2)
-
Gregory Wright
-
Ian Lynagh