public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Error building on OS X
@ 2009-04-16  1:07 Timur Tabi
  2009-04-16  6:42 ` Kai Ruottu
  0 siblings, 1 reply; 4+ messages in thread
From: Timur Tabi @ 2009-04-16  1:07 UTC (permalink / raw)
  To: gcc-help

I'm trying to build a PowerPC-targeted gcc (4.3.3) on a PowerPC OS X
10.5 system.  I have the latest Xcode installed, which comes with gcc
4.0 and 4.2.  The reason I'm doing this is because I want to build a
4.3-based toolchain that can generate Linux binaries for PowerPC
embedded systems.

Unfortunately, I'm not getting very far at all.  When I run this command:

../gcc-4.3.3/configure --target=powerpc-linux --program-prefix=powerpc-

I get this error:

checking for C compiler default output file name... configure: error:
C compiler cannot create executables

and config.log says this:

configure:3194: checking for C compiler default output file name
configure:3197: gcc    conftest.c  >&5
/usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/ld: warning unknown
-macosx_version_min parameter value: 10.5.6 ignored (using 10.1)
/usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/ld:
/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/../../../libgcc_s.10.5.dylib
load command 7 unknown cmd field
/usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/ld:
/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/../../../libSystem.dylib
unknown flags (type) of section 9 (__TEXT,__dof_plockstat) in load
command 0
collect2: ld returned 1 exit status
configure:3200: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3239: error: C compiler cannot create executables
See `config.log' for more details.



-- 
Timur Tabi
Linux kernel developer at Freescale

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

* Re: Error building on OS X
  2009-04-16  1:07 Error building on OS X Timur Tabi
@ 2009-04-16  6:42 ` Kai Ruottu
  2009-04-16 14:50   ` dan hitt
  0 siblings, 1 reply; 4+ messages in thread
From: Kai Ruottu @ 2009-04-16  6:42 UTC (permalink / raw)
  To: Timur Tabi; +Cc: gcc-help

Timur Tabi wrote:

> I'm trying to build a PowerPC-targeted gcc (4.3.3) on a PowerPC OS X
> 10.5 system.  I have the latest Xcode installed, which comes with gcc
> 4.0 and 4.2.  The reason I'm doing this is because I want to build a
> 4.3-based toolchain that can generate Linux binaries for PowerPC
> embedded systems.
> 
> Unfortunately, I'm not getting very far at all.  When I run this command:
> 
> ./gcc-4.3.3/configure --target=powerpc-linux --program-prefix=powerpc-
> 
> I get this error:
> 
> checking for C compiler default output file name... configure: error:
> C compiler cannot create executables

Producing GCC binaries requires a working C toolchain (C compiler, C
library, assembler, linker,...) for the "host" system, in your case
for OS X 10.5!  The GCC "sources" are mostly in 'C' language, so a
working C compiler for the host is required to compile them. In order
to make the executables for the "OS X to Linux/PPC" crosscompiler,
producing executables for OS X 10.5 MUST work !

The error tells that now you cannot produce any executables for OS X
10.5 with the installed "Xcode" (what on earth is that?) !

> and config.log says this:
> 
> configure:3194: checking for C compiler default output file name
> configure:3197: gcc    conftest.c  >&5
> /usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/ld: warning unknown
> -macosx_version_min parameter value: 10.5.6 ignored (using 10.1)

This says "powerpc-apple-darwin9"... Is that really the same thing
as "a PowerPC OS X 10.5 system" ?  Ie do you really have GCC etc
made for OS X 10.5 ? Not one made for OS X 9.x ?


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

* Re: Error building on OS X
  2009-04-16  6:42 ` Kai Ruottu
@ 2009-04-16 14:50   ` dan hitt
  2009-04-17  2:16     ` Timur Tabi
  0 siblings, 1 reply; 4+ messages in thread
From: dan hitt @ 2009-04-16 14:50 UTC (permalink / raw)
  To: Kai Ruottu; +Cc: Timur Tabi, gcc-help

>> ./gcc-4.3.3/configure --target=powerpc-linux --program-prefix=powerpc-
>>
>> I get this error:
>>
>> checking for C compiler default output file name... configure: error:
>> C compiler cannot create executables
>
> Producing GCC binaries requires a working C toolchain (C compiler, C
> library, assembler, linker,...) for the "host" system, in your case
> for OS X 10.5!  The GCC "sources" are mostly in 'C' language, so a
> working C compiler for the host is required to compile them. In order
> to make the executables for the "OS X to Linux/PPC" crosscompiler,
> producing executables for OS X 10.5 MUST work !
>
> The error tells that now you cannot produce any executables for OS X
> 10.5 with the installed "Xcode" (what on earth is that?) !

Hi Kai,

Xcode is the mac IDE, but if Xcode is there, then gcc also should be
(and on my 10.5.6 intel system it is, and works, to produce binaries).

Timur --- do you have multiple copies of Xcode?  I think sometimes
an earlier version lying around (from an earlier version of the os)
can confuse things (although this may be a red herring).  That
has happened to me, but not on a build of gcc [which i haven't
attempted on a mac in a long time].

I think Kai's keen observation about maybe straying into OS 9
land may be right on point, though [but i don't know how the
darwin numbers correspond to the OS X numbers, so maybe
darwin9 is what you expect, but it sounds funny].

dan

>
>> and config.log says this:
>>
>> configure:3194: checking for C compiler default output file name
>> configure:3197: gcc    conftest.c  >&5
>> /usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/ld: warning unknown
>> -macosx_version_min parameter value: 10.5.6 ignored (using 10.1)
>
> This says "powerpc-apple-darwin9"... Is that really the same thing
> as "a PowerPC OS X 10.5 system" ?  Ie do you really have GCC etc
> made for OS X 10.5 ? Not one made for OS X 9.x ?
>
>
>

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

* Re: Error building on OS X
  2009-04-16 14:50   ` dan hitt
@ 2009-04-17  2:16     ` Timur Tabi
  0 siblings, 0 replies; 4+ messages in thread
From: Timur Tabi @ 2009-04-17  2:16 UTC (permalink / raw)
  To: dan hitt; +Cc: Kai Ruottu, gcc-help

On Thu, Apr 16, 2009 at 9:50 AM, dan hitt <dan.hitt@gmail.com> wrote:

> Timur --- do you have multiple copies of Xcode?

That was my problem.  I thought I deleted the older version of Xcode,
but apparently not.  After carefully following the uninstall
instructions, and reinstalling, OS X's gcc works now.

I then had to download gmp and mfpr, and now I'm building gcc and
binutils.  Thanks, everyone!

-- 
Timur Tabi
Linux kernel developer at Freescale

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

end of thread, other threads:[~2009-04-17  2:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-16  1:07 Error building on OS X Timur Tabi
2009-04-16  6:42 ` Kai Ruottu
2009-04-16 14:50   ` dan hitt
2009-04-17  2:16     ` Timur Tabi

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).