GHC 6.8 (STABLE) branch build framework does not pass correctly CPPFLAGS/LDFLAGS env vars to subsequent configure scripts
hello, it seems that build framework is a little bit buggy, since it does not pass correctly CPPFLAGS and LDFLAGS environment variables to the subsequent configure calls. For example, I do have libreadline installed in not usual location and I would like to do this:
export CPPFLAGS=-I/usr/local/ghc-reqs/include/ export LDFLAGS=-L/usr/local/ghc-reqs/lib/
- /configure --prefix=/usr/local/ghc-2008-05-04
ghc-reqs directory contains libreadline installation. The problem is that build invoked by `make' fails with:
gmake[1]: Entering directory `/export/home/karel/darcs/ghc/libraries' rm -f -f stamp/configure.library.*.base base/unbuildable ( cd base && setup/Setup configure \
--enable-library-profiling --enable-split-objs \
--prefix=/NONEXISTANT \
--bindir=/NONEXISTANT \
--libdir=/NONEXISTANT \
--libsubdir='$pkgid' \
--libexecdir=/NONEXISTANT \
--datadir=/NONEXISTANT \
--docdir=/NONEXISTANT \
--htmldir=/NONEXISTANT \
--interfacedir=/NONEXISTANT \
--with-compiler=../../compiler/stage1/ghc-inplace \
--with-hc-pkg=../../utils/ghc-pkg/ghc-pkg-inplace \
--with-hsc2hs=../../utils/hsc2hs/hsc2hs-inplace \
--with-ld=/usr/bin/ld \
--haddock-options="--use-contents=../index.html \
--use-index=../doc-index.html" \
--prefix=/usr/local/ghc-2008-05-04 CPPFLAGS=-I/usr/local/ghc-reqs/include/ LDFLAGS=-L/usr/local/ghc-reqs/lib/ \
--configure-option=--with-cc=gcc ) \
&& touch stamp/configure.library.build-profiling-splitting.base || touch base/unbuildable
Setup: Errors: unexpected argument: CPPFLAGS=-I/usr/local/ghc-reqs/include/ unexpected argument: LDFLAGS=-L/usr/local/ghc-reqs/lib/ unexpected argument: --configure-option=--with-cc=gcc if ifBuildable/ifBuildable base; then \
cd base && \
cmp -s ../Makefile.local Makefile.local || cp ../Makefile.local .; \
mv GNUmakefile GNUmakefile.tmp; \
setup/Setup makefile -f GNUmakefile; \
cmp -s GNUmakefile GNUmakefile.tmp && mv GNUmakefile.tmp GNUmakefile; \
gmake -wr --jobserver-fds=3,4 -j && \
setup/Setup register --inplace; \
fi
mv: cannot access GNUmakefile Setup: error reading dist/setup-config; run "setup configure" command?
gmake[2]: Entering directory /export/home/karel/darcs/ghc/libraries/base' gmake[2]: *** No targets specified and no makefile found. Stop. gmake[2]: Leaving directory /export/home/karel/darcs/ghc/libraries/base'
gmake[1]: *** [make.library.base] Error 2
gmake[1]: Leaving directory `/export/home/karel/darcs/ghc/libraries'
gmake: *** [stage1] Error 2
Is there any known workaround for this issue?
Thanks, Karel
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.8.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Build System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |