[ ghc-Bugs-447757 ] build error (Mac OS X)

noreply@sourceforge.net noreply@sourceforge.net
Mon, 15 Oct 2001 09:31:09 -0700


Bugs item #447757, was opened at 2001-08-03 16:31
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=108032&aid=447757&group_id=8032

Category: Build System
Group: 5.00
>Status: Open
Resolution: Out of Date
Priority: 5
Submitted By: Dale Vaillancourt (dalev321)
Assigned to: Nobody/Anonymous (nobody)
Summary: build error (Mac OS X)

Initial Comment:
../../ghc/compiler/ghc-inplace -optc-O -optc-O2 -optc-fomit-frame-pointer -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wbad-function-cast -optc-DCOMPILING_RTS -I../includes -I. -Iparallel -O2 -DCOMPILING_RTS -static    -c Adjustor.c -o Adjustor.o
cc: cannot specify -o with -c or -S and multiple compilations

The above error message is given when the build system begins to use ghc-inplace to build the C sources in fptools/ghc/rts. (This occurs after the build of gmp, I believe).

I'm trying to build ghc 5.00.2 (using binaries of GHC 4.08.1 provided by Atze Dijkstra, linked from the GHC download page).

Out of curiosity, I ran the following command (eliminating the '-o' option that the error message referred to & various warnings):
../../ghc/compiler/ghc-inplace -optc-fomit-frame-pointer -optc-DCOMPILING_RTS -I../includes -I. -Iparallel -DCOMPILING_RTS -c Adjustor.c
cc: cannot specify -o with -c or -S and multiple compilations

As you can see, the exact same error resulted.  It looks like ghc-inplace is passing cc a bad set of options internally, as the error message doesn't have to do with the options provided directly on the command line...

----------------------------------------------------------------------

Comment By: Dale Vaillancourt (dalev321)
Date: 2001-08-05 18:20

Message:
Logged In: YES 
user_id=54153

Well, what're ya waiting for? ;)  Upload away! :)

----------------------------------------------------------------------

Comment By: Sebastien Carlier (sebc_)
Date: 2001-08-04 08:02

Message:
Logged In: YES 
user_id=289249

Several changes to the compiler and to the runtime system
are required to build a working compiler on MacOS X.
I have a patch (quite ugly, I'm afraid, and parts of the
build process are still tricky).  I have a binary build
of GHC 5.00.2 (built with itself) waiting to be uploaded
to www.haskell.org...


----------------------------------------------------------------------

Comment By: Dale Vaillancourt (dalev321)
Date: 2001-08-03 17:03

Message:
Logged In: YES 
user_id=54153

[localhost:~/ghc-5.00.2/ghc/rts] dale% ../../ghc/compiler/ghc-inplace -optc-O -optc-O2 -optc-fomit-frame-pointer -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wbad-function-cast -optc-DCOMPILING_RTS -I../includes -I. -Iparallel -O2 -DCOMPILING_RTS -static    -c Adjustor.c -o Adjustor.o -v
Glasgow Haskell Compiler, Version 5.00.2, for Haskell 98, compiled by GHC version 4.08.1
Using package config file: /Users/dale/ghc-5.00.2/ghc/compiler/../driver/package.conf.inplace
Hsc static flags: -static -fignore-asserts -ffoldr-build-on -fdo-eta-reduction -fdo-lambda-eta-expansion -fcase-merge -flet-to-case -flet-no-escape
*** C Compiler
cc -x c Adjustor.c -o /tmp/ghc459.s static -v -S -Wimplicit -O -D__GLASGOW_HASKELL__=500 -O -O2 -fomit-frame-pointer -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Winline -Waggregate-return -Wbad-function-cast -DCOMPILING_RTS -ffloat-store -I. -I../includes -I. -Iparallel -I/Users/dale/ghc-5.00.2/ghc/driver/../lib/std/cbits -I/Users/dale/ghc-5.00.2/ghc/driver/../includes
cc: cannot specify -o with -c or -S and multiple compilations
Removing: /tmp/ghc459.s
Warning: can't remove tmp file /tmp/ghc459.s


This is the output upon adding the -v flag.

----------------------------------------------------------------------

Comment By: Ken Shan (ccshan)
Date: 2001-08-03 16:46

Message:
Logged In: YES 
user_id=275868

Could you please run ghc-inplace with the -v flag, so that
it displays what flags it used to invoke cc internally?


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=108032&aid=447757&group_id=8032