compiling ghc-6.8.3: unrecognized command line option "-fconfigure-option=" (SOLVED)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

compiling ghc-6.8.3: unrecognized command line option "-fconfigure-option=" (SOLVED)

Poor Yorick-18
For anyone who might experience the same problem...

Intalling ghc-6.8.3, the following error occurred:

    make -C libraries all
    make[1]: Entering directory `/path/to/src/gh
    c-6.8.3/ghc-6.8.3/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=/path/to/bin/ld \                                                                              
                       --haddock-options="--use-contents=../index.html \
                                       --use-index=../doc-index.html" \
                          --configure-option='--prefix=/path/to/ghc-6.8.3'
                          --configure-option='CC=gcc -m32'
                          --configure-option='LDFLAGS=-Wl,-rpath,/path/to/lib
                          -Wl,-rpath,/path/to/lib64 -Wl,--enable-new-dtags
                          -L/path/to/lib -L/path/to/lib64
                          --configure-option='
                          --configure-option='CPPFLAGS=-I/path/to/include
                          --configure-option=' \        
                   --configure-option=--with-cc=gcc ) \
              && touch stamp/configure.library.build-profiling-splitting.base
              || touch base/unbuildable                                                        
    Configuring base-3.0.2.0...
    configure: WARNING: Unrecognized options: --with-hc, --with-hc-pkg
    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.


config.log showed this:


    configure:2171: checking for C compiler default output file name
    configure:2193: gcc  -I/path/to/include  --configure-option= -Wl,-rpath,/path/to/lib -Wl,-rpath,/path/to/lib64 -Wl,--enable-new-dtags -L/path/to/lib -L/path/to/lib64    --configure-option= conftest.c  >&5
    cc1: error: unrecognized command line option "-fconfigure-option="
    cc1: error: unrecognized command line option "-fconfigure-option="
    configure:2197: $? = 1
    configure:2235: result:
    configure: failed program was:
    | /* confdefs.h.  */
    | #define PACKAGE_NAME "Haskell base package"
    | #define PACKAGE_TARNAME "base"
    | #define PACKAGE_VERSION "1.0"
    | #define PACKAGE_STRING "Haskell base package 1.0"
    | #define PACKAGE_BUGREPORT "[hidden email]"
    | /* end confdefs.h.  */
    |
    | int
    | main ()
    | {
    |
    |   ;
    |   return 0;
    | }
    configure:2242: error: C compiler cannot create executables
    See `config.log' for more details.

    ## ---------------- ##
    ## Cache variables. ##
    ## ---------------- ##

    ac_cv_env_CC_set=set
    ac_cv_env_CC_value='gcc -m32'
    ac_cv_env_CFLAGS_set=
    ac_cv_env_CFLAGS_value=
    ac_cv_env_CPPFLAGS_set=set
    ac_cv_env_CPPFLAGS_value='-I/path/to/include  --configure-option='
    ac_cv_env_CPP_set=
    ac_cv_env_CPP_value=
    ac_cv_env_LDFLAGS_set=set
    ac_cv_env_LDFLAGS_value='-Wl,-rpath,/path/to/lib -Wl,-rpath,/path/to/lib64 -Wl,--enable-new-dtags -L/path/to/lib -L/path/to/lib64    --configure-option='
    ac_cv_env_LIBS_set=
    ac_cv_env_LIBS_value=
    ac_cv_env_build_alias_set=
    ac_cv_env_build_alias_value=
    ac_cv_env_host_alias_set=
    ac_cv_env_host_alias_value=
    ac_cv_env_target_alias_set=
    ac_cv_env_target_alias_value=
    ac_cv_prog_ac_ct_CC=gcc

    ## ----------------- ##
    ## Output variables. ##
    ## ----------------- ##

    CC='gcc'
    CFLAGS=''
    CPP=''
    CPPFLAGS='-I/path/to/include  --configure-option='
    DEFS=''
    ECHO_C=''
    ECHO_N='-n'
    ECHO_T=''
    EGREP=''
    EXEEXT=''
    GREP=''
    LDFLAGS='-Wl,-rpath,/path/to/lib -Wl,-rpath,/path/to/lib64 -Wl,--enable-new-dtags -L/path/to/lib -L/path/to/lib64    --configure-option='
    LIBOBJS=''
    LIBS=''
    LTLIBOBJS=''
    OBJEXT=''
    PACKAGE_BUGREPORT='[hidden email]'
    PACKAGE_NAME='Haskell base package'
    PACKAGE_STRING='Haskell base package 1.0'
    PACKAGE_TARNAME='base'
    PACKAGE_VERSION='1.0'
    PATH_SEPARATOR=':'
    SHELL='/bin/sh'
    ac_ct_CC='gcc'
    bindir='/NONEXISTANT'
    build_alias=''
    datadir='/NONEXISTANT'
    datarootdir='${prefix}/share'
    docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
    dvidir='${docdir}'
    exec_prefix='NONE'
    host_alias=''
    htmldir='${docdir}'
    includedir='${prefix}/include'
    infodir='${datarootdir}/info'
    libdir='/NONEXISTANT'
    libexecdir='/NONEXISTANT'
    localedir='${datarootdir}/locale'
    localstatedir='${prefix}/var'
    mandir='${datarootdir}/man'
    oldincludedir='/usr/include'
    pdfdir='${docdir}'
    prefix='/path/to/ghc-6.8.3'
    program_transform_name='s,x,x,'
    psdir='${docdir}'
    sbindir='${exec_prefix}/sbin'
    sharedstatedir='${prefix}/com'
    sysconfdir='${prefix}/etc'
    target_alias=''

It turned out that trailing whitespace in the LDFLAGS and CPPFLAGS environment variables were causing these problems.  see libraries/Makfile:

    # We rely on all the CONFIGURE_ARGS being quoted with '...', and there
    # being no 's inside the values.
    FLAGGED_CONFIGURE_ARGS = $(subst $(space)',\
                                     $(space)--configure-option=',\
                                     $(space)$(CONFIGURE_ARGS))


--
Yorick
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Cabal: error on configure

David Barton-2
OK, I suspect this is a real newbie error, but please have mercy.  I have
downloaded and installed cabal (at least it responds to the --help command
from the command line).  Yet when I do, say (to give a real example):

cabal configure parameterized_ data

(having done he fetch)  I get this error:

cabal.exe: Using 'build-type" Custom' but there is no Setup.hs or Setup.lhs
script.'

When I download the package manually and look, there is a perfectly
servicable Setup.hs script, which I call manually.

So what gives?

Dave Barton

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Cabal: error on configure

Don Stewart-2
dlb:

> OK, I suspect this is a real newbie error, but please have mercy.  I have
> downloaded and installed cabal (at least it responds to the --help command
> from the command line).  Yet when I do, say (to give a real example):
>
> cabal configure parameterized_ data
>
> (having done he fetch)  I get this error:
>
> cabal.exe: Using 'build-type" Custom' but there is no Setup.hs or
> Setup.lhs script.'
>
> When I download the package manually and look, there is a perfectly
> servicable Setup.hs script, which I call manually.
>
> So what gives?
>
> Dave Barton

    $ cabal update
    Downloading package list from server
    'http://hackage.haskell.org/packages/archive'

    $ cabal install parameterized-data
    Downloading parameterized-data-0.1.3...
    Configuring parameterized-data-0.1.3...
    Preprocessing library parameterized-data-0.1.3...
    Building parameterized-data-0.1.3...
    [1 of 2] Compiling Data.Param.FSVec ( src/Data/Param/FSVec.hs,
    dist/build/Data/Param/FSVec.o )
    [2 of 2] Compiling Data.Param       ( src/Data/Param.hs,
    dist/build/Data/Param.o )
    /usr/bin/ar: creating dist/build/libHSparameterized-data-0.1.3.a
    Installing library in
    /home/dons/.cabal/lib/parameterized-data-0.1.3/ghc-6.8.2
    Registering parameterized-data-0.1.3...
    Reading package info from "dist/installed-pkg-config" ... done.
    Saving old package config file... done.
    Writing new package config file... done.

Looks ok to me?
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Cabal: error on configure

Duncan Coutts
In reply to this post by David Barton-2
On Tue, 2008-10-07 at 15:50 -0400, David Barton wrote:

> OK, I suspect this is a real newbie error, but please have mercy.  I have
> downloaded and installed cabal (at least it responds to the --help command
> from the command line).  Yet when I do, say (to give a real example):
>
> cabal configure parameterized_ data
>
> (having done he fetch)  I get this error:
>
> cabal.exe: Using 'build-type" Custom' but there is no Setup.hs or Setup.lhs
> script.'
>
> When I download the package manually and look, there is a perfectly
> servicable Setup.hs script, which I call manually.
>
> So what gives?

You mean to run:

cabal install parameterized-data

"cabal configure" expects to be run inside the build tree. It's looking
for a Setup.hs in the current directory. The configure command is for
developers working with their own packages locally, rather than for
working with released packages directly from hackage.

There are basically two sets of commands, those for working with
released packages by name, and those for working with a local package in
the current directory. I'll tried to make that clearer in the
cabal-install README, and perhaps in the --help output in future.

Duncan


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Cabal: error on configure

Bugzilla from alfonso.acosta@gmail.com
In reply to this post by David Barton-2
On Tue, Oct 7, 2008 at 9:50 PM, David Barton <[hidden email]> wrote:
> OK, I suspect this is a real newbie error, but please have mercy.  I have
> downloaded and installed cabal (at least it responds to the --help command
> from the command line).  Yet when I do, say (to give a real example):
>
> cabal configure parameterized_ data

It's great to read that you are using the parameterized-data package.
If you have any questions on its use, or have any suggestions, don't
hesitate to ask.
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe