Ticket #2263 (closed bug: worksforme)

Opened 5 years ago

Last modified 5 years ago

GHC 6.8 (STABLE) branch build framework does not pass correctly CPPFLAGS/LDFLAGS env vars to subsequent configure scripts

Reported by: kgardas Owned by:
Priority: normal Milestone:
Component: Build System Version: 6.8.2
Keywords: Cc:
Operating System: Solaris Architecture: x86
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

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

Change History

Changed 5 years ago by judah

  • status changed from new to closed
  • resolution set to worksforme

You should be able to do this by configuring ghc with the following arguments:

./configure --with-readline-libraries=/usr/local/ghc-reqs/lib --with-readline-includes=/usr/local/ghc-reqs/include

(You may want to use --with-gmp-includes and --with-gmp-libraries as well.)

Please reopen this ticket if the above does not work for you.

Changed 5 years ago by kgardas

  • status changed from closed to reopened
  • resolution worksforme deleted

Hello,

the problem is that with your suggested --with-readline-* options, build fails even more early:

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 --with-readline-libraries=/usr/local/ghc-reqs/lib/ --with-readline-includes=/usr/local/ghc-reqs/include/ \

--configure-option=--with-cc=gcc ) \

&& touch stamp/configure.library.build-profiling-splitting.base touch base/unbuildable

Setup: Unrecognised flags:

--with-readline-libraries=/usr/local/ghc-reqs/lib/ --with-readline-includes=/usr/local/ghc-reqs/include/

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 && \ 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

BTW: I'm using recommended autoconf 2.52/automake 1.9.

I'm curious how have you been able to pass thorough this issue.

Thanks, Karel

Changed 5 years ago by kgardas

Hello,

you might close this bug since this seems to be autoconf 2.52 issue. I've already filled different bug report:  http://hackage.haskell.org/trac/ghc/ticket/2265 which points this out.

Thanks! Karel

Changed 5 years ago by igloo

  • status changed from reopened to closed
  • difficulty set to Unknown
  • resolution set to worksforme
Note: See TracTickets for help on using tickets.