Subject: Re: Building on MacOS X
To: Jason Thorpe <thorpej@wasabisystems.com>
From: =?ISO-8859-1?Q?R=E9mi_Zara?= <remi_zara@mac.com>
List: tech-toolchain
Date: 03/21/2003 13:15:58
Le mercredi, 19 mars 2003, =E0 00:11 Europe/Paris, Jason Thorpe a =E9crit =
:

> What version of Mac OS X are you using?  I have had no trouble with =20=

> cross-building i386 and evbarm releases from 10.2.4[*].

What version of the developer tools do you use ?
I use (I think) the December Dev Tools.
I read in the release notes for gcc 3 that this bug has been fixed:

Radar 3087829, Header file searching is too slow
The compiler now uses a new algorithm for header file search.  In =20
projects that do not use PFE, this change decreases build time by up to =20=

a factor of 2.

Maybe that's part of my problem.

Here is a more detailed build log for my installboot, which shows that =20=

gcc is indeed using MacOS X header files when it should use those found =20=

thanks to the -I options first (as per the gcc 3.1.1 manual)

dependall =3D=3D=3D> installboot
cc -O -I. -I/Volumes/SourcesNetBSD/src/tools/installboot =20
-I/Volumes/SourcesNetBSD/src/tools/installboot/../mips-elf2ecoff -v -H =20=

-no-cpp-precomp -I/Volumes/SourcesNetBSD/src/tools/compat/obj =20
-I/Volumes/SourcesNetBSD/src/tools/compat/obj/include  =20
-I/Volumes/SourcesNetBSD/src/tools/installboot/../compat =20
-DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=3D64  =20
-I/Volumes/SourcesNetBSD/src/tools/installboot/../../usr.sbin/=20
installboot -I. -c -o ffs_bswap.lo.o =20
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c
Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs
Thread model: posix
Apple Computer, Inc. GCC version 1175, based on gcc version 3.1 =20
20020420 (prerelease)
  /usr/libexec/gcc/darwin/ppc/3.1/cc1 -lang-c -v -I. =20
-I/Volumes/SourcesNetBSD/src/tools/installboot =20
-I/Volumes/SourcesNetBSD/src/tools/installboot/../mips-elf2ecoff =20
-I/Volumes/SourcesNetBSD/src/tools/compat/obj =20
-I/Volumes/SourcesNetBSD/src/tools/compat/obj/include =20
-I/Volumes/SourcesNetBSD/src/tools/installboot/../compat =20
-I/Volumes/SourcesNetBSD/src/tools/installboot/../../usr.sbin/=20
installboot -I. -D__GNUC__=3D3 -D__GNUC_MINOR__=3D1 =
-D__GNUC_PATCHLEVEL__=3D0 =20
-D__APPLE_CC__=3D1175 -D__ppc__ -D__POWERPC__ -D__NATURAL_ALIGNMENT__ =20=

-D__MACH__ -D__BIG_ENDIAN__ -D__APPLE__ -D__ppc__ -D__POWERPC__ =20
-D__NATURAL_ALIGNMENT__ -D__MACH__ -D__BIG_ENDIAN__ -D__APPLE__ =20
-D__OPTIMIZE__ -D__STDC_HOSTED__=3D1 -H -D__DYNAMIC__ -DHAVE_CONFIG_H =20=

-D_FILE_OFFSET_BITS=3D64 =20
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c -fPIC -quiet =20
-dumpbase ffs_bswap.c -O -version -o /var/tmp//ccCLbBAR.s
GNU CPP version 3.1 20020420 (prerelease) (cpplib) (Darwin/PowerPC)
GNU C version 3.1 20020420 (prerelease) (ppc-darwin)
	compiled by GNU C version 3.1 20020420 (prerelease).
ignoring nonexistent directory =20
"/usr/lib/gcc-lib/ppc-darwin/3.1/../../../../ppc-darwin/include"
ignoring nonexistent directory "/Local/Library/Frameworks"
ignoring duplicate directory "."
#include "..." search starts here:
#include <...> search starts here:
  .
  /Volumes/SourcesNetBSD/src/tools/installboot
  /Volumes/SourcesNetBSD/src/tools/mips-elf2ecoff
  /Volumes/SourcesNetBSD/src/tools/compat/obj
  /Volumes/SourcesNetBSD/src/tools/compat/obj/include
  /Volumes/SourcesNetBSD/src/tools/compat
  /Volumes/SourcesNetBSD/src/usr.sbin/installboot
  /usr/local/include
  /usr/include/gcc/darwin/3.1
  /usr/include
End of search list.
Framework search starts here:
  /System/Library/Frameworks
  /Library/Frameworks
End of framework search list.
. /usr/include/sys/cdefs.h
. /Volumes/SourcesNetBSD/src/tools/compat/obj/config.h
.. /Volumes/SourcesNetBSD/src/tools/compat/compat_defs.h
... /usr/include/sys/types.h
.... /usr/include/sys/appleapiopts.h
.... /usr/include/machine/types.h
..... /usr/include/ppc/types.h
.... /usr/include/machine/ansi.h
..... /usr/include/ppc/ansi.h
.... /usr/include/machine/endian.h
..... /usr/include/ppc/endian.h
... /usr/include/sys/mman.h
.... /usr/include/mach/shared_memory_server.h
..... /usr/include/mach/vm_prot.h
..... /usr/include/mach/mach_types.h
...... /usr/include/gcc/darwin/3.1/stdint.h
...... /usr/include/mach/host_info.h
....... /usr/include/mach/vm_statistics.h
........ /usr/include/mach/machine/vm_types.h
......... /usr/include/mach/ppc/vm_types.h
....... /usr/include/mach/machine.h
........ /usr/include/mach/boolean.h
......... /usr/include/mach/machine/boolean.h
.......... /usr/include/mach/ppc/boolean.h
....... /usr/include/mach/time_value.h
...... /usr/include/mach/memory_object_types.h
....... /usr/include/mach/port.h
....... /usr/include/mach/vm_types.h
...... /usr/include/mach/exception_types.h
....... /usr/include/mach/machine/exception.h
........ /usr/include/mach/ppc/exception.h
....... /usr/include/mach/thread_status.h
........ /usr/include/mach/machine/thread_status.h
......... /usr/include/mach/ppc/thread_status.h
........ /usr/include/mach/machine/thread_state.h
......... /usr/include/mach/ppc/thread_state.h
...... /usr/include/mach/processor_info.h
....... /usr/include/mach/machine/processor_info.h
........ /usr/include/mach/ppc/processor_info.h
...... /usr/include/mach/task_info.h
....... /usr/include/mach/policy.h
...... /usr/include/mach/task_policy.h
....... /usr/include/mach/mach_types.h
...... /usr/include/mach/task_special_ports.h
...... /usr/include/mach/thread_info.h
...... /usr/include/mach/thread_policy.h
...... /usr/include/mach/thread_special_ports.h
...... /usr/include/mach/clock_types.h
...... /usr/include/mach/vm_attributes.h
...... /usr/include/mach/vm_inherit.h
...... /usr/include/mach/vm_behavior.h
...... /usr/include/mach/vm_sync.h
...... /usr/include/mach/vm_region.h
...... /usr/include/mach/kmod.h
....... /usr/include/mach/kern_return.h
........ /usr/include/mach/machine/kern_return.h
......... /usr/include/mach/ppc/kern_return.h
...... /usr/include/mach/std_types.h
... /usr/include/sys/param.h
.... /usr/include/sys/syslimits.h
.... /usr/include/machine/param.h
..... /usr/include/ppc/param.h
.... /usr/include/gcc/darwin/3.1/machine/limits.h
..... /usr/include/ppc/limits.h
.... /usr/include/sys/signal.h
..... /usr/include/machine/signal.h
...... /usr/include/ppc/signal.h
... /usr/include/sys/stat.h
.... /usr/include/sys/time.h
..... /usr/include/time.h
... /usr/include/errno.h
.... /usr/include/sys/errno.h
... /usr/include/fcntl.h
.... /usr/include/sys/fcntl.h
... /usr/include/grp.h
... /usr/include/limits.h
... /usr/include/paths.h
.... /usr/include/sys/paths.h
... /usr/include/gcc/darwin/3.1/stdarg.h
... /usr/include/stdio.h
... /usr/include/stdlib.h
... /usr/include/string.h
... /usr/include/gcc/darwin/3.1/inttypes.h
... /usr/include/stddef.h
... /usr/include/dirent.h
.... /usr/include/sys/dirent.h
. /usr/include/ufs/ufs/dinode.h
. ufs/ufs/ufs_bswap.h
.. /Volumes/SourcesNetBSD/src/tools/compat/obj/include/machine/bswap.h
. /usr/include/ufs/ffs/fs.h
. /usr/include/ufs/ffs/ffs_extern.h
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c: In function =20
`ffs_sb_swap':
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c:102: structure has =20=

no member named `fs_avgfilesize'
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c:102: structure has =20=

no member named `fs_avgfilesize'
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c:102: structure has =20=

no member named `fs_avgfilesize'
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c:102: structure has =20=

no member named `fs_avgfilesize'
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c:102: structure has =20=

no member named `fs_avgfilesize'
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c:103: structure has =20=

no member named `fs_avgfpdir'
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c:103: structure has =20=

no member named `fs_avgfpdir'
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c:103: structure has =20=

no member named `fs_avgfpdir'
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c:103: structure has =20=

no member named `fs_avgfpdir'
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c:103: structure has =20=

no member named `fs_avgfpdir'
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c:105: structure has =20=

no member named `fs_pendingblocks'
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c:105: structure has =20=

no member named `fs_pendingblocks'
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c:105: structure has =20=

no member named `fs_pendingblocks'
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c:105: structure has =20=

no member named `fs_pendingblocks'
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c:105: structure has =20=

no member named `fs_pendingblocks'
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c:106: structure has =20=

no member named `fs_pendinginodes'
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c:106: structure has =20=

no member named `fs_pendinginodes'
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c:106: structure has =20=

no member named `fs_pendinginodes'
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c:106: structure has =20=

no member named `fs_pendinginodes'
/Volumes/SourcesNetBSD/src/sys/ufs/ffs/ffs_bswap.c:106: structure has =20=

no member named `fs_pendinginodes'
Multiple include guards may be useful for:
/usr/include/errno.h
/usr/include/fcntl.h
/usr/include/gcc/darwin/3.1/stdarg.h
*** Error code 1

Stop.
nbmake: stopped in /Volumes/SourcesNetBSD/src/tools/installboot
*** Error code 1

Stop.
nbmake: stopped in /Volumes/SourcesNetBSD/src/tools/installboot
*** Error code 1

Stop.
nbmake: stopped in /Volumes/SourcesNetBSD/src/tools

ERROR: failed to make tools
*** BUILD ABORTED ***

--
R=E9mi Zara
web: http://www.remi-zara.net/