Error compiling freetype2 library for arm7 with OSX gcc: `limits.h: No such file or directory

StackOverflow https://stackoverflow.com/questions/23683331

Domanda

I am trying to compile the freetype2 library for arm7, using Xcode's command line tools in OSX. I am using the following parameterisation of the project's configure script:

Compiling FreeType for iPhone?

These errors were produced when running the script:

configure:3426: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -E conftest.c In file included from conftest.c:10: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin10/4.2.1/include/limits.h:15:25: error: limits.h: No such file or directory

configure:3426: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -E -traditional-cpp conftest.c conftest.c:12: error: assert.h: No such file or directory

configure:3426: /lib/cpp conftest.c /Volumes/DATA/filestore/development/libs/c/freetype2/extract/2.5.3/builds/unix/configure: line 1600: /lib/cpp: No such file or directory

configure:3465: result: /lib/cpp configure:3485: /lib/cpp conftest.c /Volumes/DATA/filestore/development/libs/c/freetype2/extract/2.5.3/builds/unix/configure: line 1600: /lib/cpp: No such file or directory

I can see that the missing files actually do exist in the directories output in the error messages.

CFLAGS and LDFLAGS contain the following parameter, which should allow for the inclusion of system header files:

-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/

The other odd thing that I noticed with these error messages, is that the architecture identifier in the directory structures is i686-apple-darwin10. The -arch armv7 compiler flag is being used, so why are i686-apple-darwin10 directories being inspected at all?

* UPDATED *

I also tried parameterising the configure script as per another example:

https://stackoverflow.com/a/12594507/1704014

The following error terminated its execution:

checking for suffix of native executables... ld: library not found for -lcrt1.10.6.o collect2: ld returned 1 exit status configure: error: native C compiler is not working

This also indicates that a different target architecture (OSX 10.6) is being built against, not arm7.

Any help much appreciated.

È stato utile?

Soluzione

The problem in my OSX build environment was the Xcode command line tools installation. I reinstalled the latest distribution of the tools, and was able to compile successfully from then on.

To build the freetype2 library for arm7 and arm7s architectures, I found the following suggested commands useful:

https://stackoverflow.com/a/12594507/1704014

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top