public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/49919] New: problem with building gcc 4.6.1 on Mac OS X Lion
@ 2011-07-31  3:11 dmarkman at mac dot com
  2011-07-31  9:05 ` [Bug bootstrap/49919] " paolo.carlini at oracle dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: dmarkman at mac dot com @ 2011-07-31  3:11 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49919

           Summary: problem with building gcc 4.6.1 on Mac OS X Lion
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dmarkman@mac.com


Created attachment 24875
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24875
config log

Hi I got a build error
configure: error: cannot compute suffix of object files: cannot compile

here is what I did

1. I downloaded gmp 5.0.2
   applied patch from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49738
   ./configure
--prefix=/Users/dima/Development/GCC/builds/gmp-5.0.2/build/x86_64
   make make install
   make check

2. downloaded mpfr 3.0.1
./configure --prefix=/Users/dima/Development/GCC/builds/mpfr-3.0.1/build/x86_64
--with-gmp=/Users/dima/Development/GCC/builds/gmp-5.0.2/build/x86_64
make 
make install
make check

3. downloaded mpc 0.8.2
./configure --prefix=/Users/dima/Development/GCC/builds/mpc-0.8.2/build/x86_64
--with-gmp=/Users/dima/Development/GCC/builds/gmp-5.0.2/build/x86_64
--with-mpfr=/Users/dima/Development/GCC/builds/mpfr-3.0.1/build/x86_64
make 
make install
make check

4. downloaded gcc-4.6.1
./configure --prefix=/Users/dima/Development/GCC/builds/gcc-4.6.1/build/x86_64
--enable-languages=c,c++,fortran
--with-gmp=/Users/dima/Development/GCC/builds/gmp-5.0.2/build/x86_64
--with-mpfr=/Users/dima/Development/GCC/builds/mpfr-3.0.1/build/x86_64
--with-mpc=/Users/dima/Development/GCC/builds/mpc-0.8.2/build/x86_64
make

and after few minutes I got:
checking for x86_64-apple-darwin11.0.0-gcc...
/Users/dima/Development/GCC/gcc-4.6.1/host-x86_64-apple-darwin11.0.0/gcc/xgcc
-B/Users/dima/Development/GCC/gcc-4.6.1/host-x86_64-apple-darwin11.0.0/gcc/
-B/Users/dima/Development/GCC/builds/gcc-4.6.1/build/x86_64/x86_64-apple-darwin11.0.0/bin/
-B/Users/dima/Development/GCC/builds/gcc-4.6.1/build/x86_64/x86_64-apple-darwin11.0.0/lib/
-isystem
/Users/dima/Development/GCC/builds/gcc-4.6.1/build/x86_64/x86_64-apple-darwin11.0.0/include
-isystem
/Users/dima/Development/GCC/builds/gcc-4.6.1/build/x86_64/x86_64-apple-darwin11.0.0/sys-include 
checking for suffix of object files... configure: error: in
`/Users/dima/Development/GCC/gcc-4.6.1/x86_64-apple-darwin11.0.0/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2

thanks

Note: 
here are some outputs from uname gcc -v
uname -a
Darwin dimamacbookpro.local 11.0.0 Darwin Kernel Version 11.0.0: Sat Jun 18
12:56:35 PDT 2011; root:xnu-1699.22.73~1/RELEASE_X86_64 x86_64

gcc -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2335.15~108/src/configure
--disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2
--mandir=/share/man --enable-languages=c,objc,c++,obj-c++
--program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
--with-slibdir=/usr/lib --build=i686-apple-darwin11
--enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2335.15~108/dst-llvmCore/Developer/usr/local
--program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11
--target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug bootstrap/49919] problem with building gcc 4.6.1 on Mac OS X Lion
  2011-07-31  3:11 [Bug c++/49919] New: problem with building gcc 4.6.1 on Mac OS X Lion dmarkman at mac dot com
@ 2011-07-31  9:05 ` paolo.carlini at oracle dot com
  2011-07-31  9:50 ` redi at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-07-31  9:05 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49919

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.07.31 09:04:31
          Component|c++                         |bootstrap
     Ever Confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-07-31 09:04:31 UTC ---
I can confirm this, mainline too.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug bootstrap/49919] problem with building gcc 4.6.1 on Mac OS X Lion
  2011-07-31  3:11 [Bug c++/49919] New: problem with building gcc 4.6.1 on Mac OS X Lion dmarkman at mac dot com
  2011-07-31  9:05 ` [Bug bootstrap/49919] " paolo.carlini at oracle dot com
@ 2011-07-31  9:50 ` redi at gcc dot gnu.org
  2011-07-31 10:03 ` paolo.carlini at oracle dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2011-07-31  9:50 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49919

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-07-31 09:50:27 UTC ---
surely this is just http://gcc.gnu.org/wiki/FAQ#configure_suffix ?

you've installed the prerequisite libs outside the dynamic linker's search
paths, so you need to use the Mac OS equivalent of ldconfig, or set
DYLIB_LIBRARY_PATH (or whatever it is on Mac OS X)

the simple answer is do not install the prerequisite libs like that, build them
statically: http://advogato.org/person/redi/diary/240.html


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug bootstrap/49919] problem with building gcc 4.6.1 on Mac OS X Lion
  2011-07-31  3:11 [Bug c++/49919] New: problem with building gcc 4.6.1 on Mac OS X Lion dmarkman at mac dot com
  2011-07-31  9:05 ` [Bug bootstrap/49919] " paolo.carlini at oracle dot com
  2011-07-31  9:50 ` redi at gcc dot gnu.org
@ 2011-07-31 10:03 ` paolo.carlini at oracle dot com
  2011-07-31 10:34 ` paolo.carlini at oracle dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-07-31 10:03 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49919

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-07-31 10:02:30 UTC ---
Let me check in detail. For sure I'm using the same configure line which used
to work fine for a couple of years.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug bootstrap/49919] problem with building gcc 4.6.1 on Mac OS X Lion
  2011-07-31  3:11 [Bug c++/49919] New: problem with building gcc 4.6.1 on Mac OS X Lion dmarkman at mac dot com
                   ` (2 preceding siblings ...)
  2011-07-31 10:03 ` paolo.carlini at oracle dot com
@ 2011-07-31 10:34 ` paolo.carlini at oracle dot com
  2011-07-31 14:03 ` howarth at nitro dot med.uc.edu
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-07-31 10:34 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49919

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-07-31 10:33:45 UTC ---
To be safe, I tried reinstalling the three libs, and for me this is the problem
with libgcc:

  conftest.c:1:0: internal compiler error: Segmentation fault: 11


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug bootstrap/49919] problem with building gcc 4.6.1 on Mac OS X Lion
  2011-07-31  3:11 [Bug c++/49919] New: problem with building gcc 4.6.1 on Mac OS X Lion dmarkman at mac dot com
                   ` (3 preceding siblings ...)
  2011-07-31 10:34 ` paolo.carlini at oracle dot com
@ 2011-07-31 14:03 ` howarth at nitro dot med.uc.edu
  2011-07-31 14:59 ` paolo.carlini at oracle dot com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-07-31 14:03 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49919

Jack Howarth <howarth at nitro dot med.uc.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |howarth at nitro dot
                   |                            |med.uc.edu

--- Comment #5 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-07-31 14:03:09 UTC ---
This is due to http://llvm.org/bugs/show_bug.cgi?id=9571 which is fixed in
llvm.org's llvm-gcc 2.9 release but not in Apple's Xcode 4.1's llvm-gcc.
Perhaps we could use the reduced test case...

http://llvm.org/bugs/show_bug.cgi?id=9571#c11

to craft a configure test to reject the broken versions of llvm-gcc? For now,
all releases of FSF gcc have to be compiled with clang or Apple gcc-4.2 on
Lion.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug bootstrap/49919] problem with building gcc 4.6.1 on Mac OS X Lion
  2011-07-31  3:11 [Bug c++/49919] New: problem with building gcc 4.6.1 on Mac OS X Lion dmarkman at mac dot com
                   ` (4 preceding siblings ...)
  2011-07-31 14:03 ` howarth at nitro dot med.uc.edu
@ 2011-07-31 14:59 ` paolo.carlini at oracle dot com
  2011-07-31 15:40 ` howarth at nitro dot med.uc.edu
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-07-31 14:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49919

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-07-31 14:58:51 UTC ---
Thanks for the analysis: to be honest, I didn't realize that by default I was
using llvm-gcc on that machine. Then this PR should be closed, isn't about FSF
GCC.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug bootstrap/49919] problem with building gcc 4.6.1 on Mac OS X Lion
  2011-07-31  3:11 [Bug c++/49919] New: problem with building gcc 4.6.1 on Mac OS X Lion dmarkman at mac dot com
                   ` (5 preceding siblings ...)
  2011-07-31 14:59 ` paolo.carlini at oracle dot com
@ 2011-07-31 15:40 ` howarth at nitro dot med.uc.edu
  2011-07-31 16:25 ` dmarkman at mac dot com
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-07-31 15:40 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49919

--- Comment #7 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-07-31 15:39:38 UTC ---
The presence of...

gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)

from the output of 'gcc -v' indicates that is uses the llvm backend.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug bootstrap/49919] problem with building gcc 4.6.1 on Mac OS X Lion
  2011-07-31  3:11 [Bug c++/49919] New: problem with building gcc 4.6.1 on Mac OS X Lion dmarkman at mac dot com
                   ` (6 preceding siblings ...)
  2011-07-31 15:40 ` howarth at nitro dot med.uc.edu
@ 2011-07-31 16:25 ` dmarkman at mac dot com
  2011-07-31 17:38 ` howarth at nitro dot med.uc.edu
  2011-07-31 21:30 ` dmarkman at mac dot com
  9 siblings, 0 replies; 11+ messages in thread
From: dmarkman at mac dot com @ 2011-07-31 16:25 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49919

--- Comment #8 from Dmitry Markman <dmarkman at mac dot com> 2011-07-31 16:24:55 UTC ---
Hi
I followed instructions from 
http://advogato.org/person/redi/diary/240.html

so gmp, mpfr and mic were built,  when I issued make for gcc
here is what I did
mkdir <path_to_gcc>/objdir
cd <path_to_gcc>/objdir
<path_to_gcc>/gcc-4.6.1/configure
--prefix=/Users/dima/Development/GCC/builds/gcc-4.6.1/build/x86_64
--enable-languages=c,c++,fortran


however I got the same error
checking for x86_64-apple-darwin11.0.0-gcc...
/Users/dima/Development/GCC/objdir/./gcc/xgcc
-B/Users/dima/Development/GCC/objdir/./gcc/
-B/Users/dima/Development/GCC/builds/gcc-4.6.1/build/x86_64/x86_64-apple-darwin11.0.0/bin/
-B/Users/dima/Development/GCC/builds/gcc-4.6.1/build/x86_64/x86_64-apple-darwin11.0.0/lib/
-isystem
/Users/dima/Development/GCC/builds/gcc-4.6.1/build/x86_64/x86_64-apple-darwin11.0.0/include
-isystem
/Users/dima/Development/GCC/builds/gcc-4.6.1/build/x86_64/x86_64-apple-darwin11.0.0/sys-include 
checking for suffix of object files... configure: error: in
`/Users/dima/Development/GCC/objdir/x86_64-apple-darwin11.0.0/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2


thanks


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug bootstrap/49919] problem with building gcc 4.6.1 on Mac OS X Lion
  2011-07-31  3:11 [Bug c++/49919] New: problem with building gcc 4.6.1 on Mac OS X Lion dmarkman at mac dot com
                   ` (7 preceding siblings ...)
  2011-07-31 16:25 ` dmarkman at mac dot com
@ 2011-07-31 17:38 ` howarth at nitro dot med.uc.edu
  2011-07-31 21:30 ` dmarkman at mac dot com
  9 siblings, 0 replies; 11+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-07-31 17:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49919

--- Comment #9 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-07-31 17:38:00 UTC ---
(In reply to comment #8)

Those instructions predate Lion which now defaults gcc/cc to
llvm-gcc-4.2/llvm-g++-4.2 instead of gcc-4.2/g++-4.2. Again
http://llvm.org/bugs/show_bug.cgi?id=9571 is unfixed in Xcode 4.1 which is the
origin of the bootstrap failures. Use CC=gcc-4.2 CXX=g++-4.2 or CC=clang
CXX=clang++ when bootstrapping FSF gcc under Lion.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug bootstrap/49919] problem with building gcc 4.6.1 on Mac OS X Lion
  2011-07-31  3:11 [Bug c++/49919] New: problem with building gcc 4.6.1 on Mac OS X Lion dmarkman at mac dot com
                   ` (8 preceding siblings ...)
  2011-07-31 17:38 ` howarth at nitro dot med.uc.edu
@ 2011-07-31 21:30 ` dmarkman at mac dot com
  9 siblings, 0 replies; 11+ messages in thread
From: dmarkman at mac dot com @ 2011-07-31 21:30 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49919

--- Comment #10 from Dmitry Markman <dmarkman at mac dot com> 2011-07-31 21:29:46 UTC ---
Hi
I followed Jack Howarth's advice and set CC to gcc-4.2 and CXX to g++-4.2
and everything was fine

so thank you very much everybody

and BTW, I was using Xcode 4.2 (preview 4) so it looks like llvm bug is still
there

thanks again


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-07-31 21:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-31  3:11 [Bug c++/49919] New: problem with building gcc 4.6.1 on Mac OS X Lion dmarkman at mac dot com
2011-07-31  9:05 ` [Bug bootstrap/49919] " paolo.carlini at oracle dot com
2011-07-31  9:50 ` redi at gcc dot gnu.org
2011-07-31 10:03 ` paolo.carlini at oracle dot com
2011-07-31 10:34 ` paolo.carlini at oracle dot com
2011-07-31 14:03 ` howarth at nitro dot med.uc.edu
2011-07-31 14:59 ` paolo.carlini at oracle dot com
2011-07-31 15:40 ` howarth at nitro dot med.uc.edu
2011-07-31 16:25 ` dmarkman at mac dot com
2011-07-31 17:38 ` howarth at nitro dot med.uc.edu
2011-07-31 21:30 ` dmarkman at mac dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).