[ft] Building FT2 for embedded architectures
Hi, I'd like to build FT2 for the ARM Cortex-M3 architecture to use it for text output on a display. My naive attempt to make it use the available cross-compiler by passing the --host option to ./configure did (of course) not yield a working result; we'll can't blame for for trying ;) I'd like to build FT2 specific to my needs, that are: - static library - no builtin zlib, lzw and bzip2 (some compression library will be linked into the firmware image eventually) - selecting the supported font formats Most of the configuration will probably hand tailored to the target system anyway. So what I look for is some pointers in how to manually configure the FT2 build without the assistance of some autoconf/automake build system. Regards Wolfgang ___ Freetype mailing list Freetype@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype
Re: [ft] Building FT2 for embedded architectures
Hi, Could you post config.log generated by passing the --host option to ./configure? Regards, mpsuzuki Wolfgang Draxinger wrote: Hi, I'd like to build FT2 for the ARM Cortex-M3 architecture to use it for text output on a display. My naive attempt to make it use the available cross-compiler by passing the --host option to ./configure did (of course) not yield a working result; we'll can't blame for for trying ;) I'd like to build FT2 specific to my needs, that are: - static library - no builtin zlib, lzw and bzip2 (some compression library will be linked into the firmware image eventually) - selecting the supported font formats Most of the configuration will probably hand tailored to the target system anyway. So what I look for is some pointers in how to manually configure the FT2 build without the assistance of some autoconf/automake build system. Regards Wolfgang ___ Freetype mailing list Freetype@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype ___ Freetype mailing list Freetype@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype
Re: [ft] Building FT2 for embedded architectures
On 04/19/13 17:13, suzuki toshiya wrote: Hi, Could you post config.log generated by passing the --host option to ./configure? Here you go: This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by FreeType configure 2.4.11, which was generated by GNU Autoconf 2.69. Invocation command line was $ ./configure --host=arm-none-eabi --without-zlib --without-bzip2 --without-fsspec --without-fsref --without-ats --disable-shared --enable-static ## - ## ## Platform. ## ## - ## hostname = hilbert uname -m = x86_64 uname -r = 3.2.0-3-rt-amd64 uname -s = Linux uname -v = #1 SMP PREEMPT RT Mon Jul 23 03:37:45 UTC 2012 /usr/bin/uname -p = unknown /bin/uname -X = unknown /bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: /home/dw/.local/bin PATH: /usr/local/bin PATH: /usr/bin PATH: /bin PATH: /usr/local/games PATH: /usr/games PATH: /opt/bin PATH: /usr/local/cuda/bin PATH: /opt/ARM/arm-eabi/bin ## --- ## ## Core tests. ## ## --- ## configure:2480: checking build system type configure:2494: result: x86_64-unknown-linux-gnu configure:2514: checking host system type configure:2527: result: arm-none-eabi configure:2559: checking for arm-none-eabi-gcc configure:2575: found /opt/ARM/arm-eabi/bin/arm-none-eabi-gcc configure:2586: result: arm-none-eabi-gcc configure:2855: checking for C compiler version configure:2864: arm-none-eabi-gcc --version 5 arm-none-eabi-gcc (Linaro GCC 4.6-2011.10) 4.6.2 20111004 (prerelease) Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. configure:2875: $? = 0 configure:2864: arm-none-eabi-gcc -v 5 Using built-in specs. COLLECT_GCC=arm-none-eabi-gcc COLLECT_LTO_WRAPPER=/opt/ARM/arm-linaro-eabi-4.6/libexec/gcc/arm-none-eabi/4.6.2/lto-wrapper Target: arm-none-eabi Configured with: ../gcc-linaro-4.6-2011.10/configure --target=arm-none-eabi --prefix=/opt/ARM/arm-linaro-eabi-4.6/ --enable-multilib --enable-languages=c,c++ --with-newlib --with-gnu-as --with-gnu-ld --disable-nls --disable-shared --disable-threads --with-headers=newlib/libc/include --disable-libssp --disable-libstdcxx-pch --disable-libmudflap --disable-libgomp --disable-werror --with-system-zlib --disable-newlib-supplied-syscalls Thread model: single gcc version 4.6.2 20111004 (prerelease) (Linaro GCC 4.6-2011.10) configure:2875: $? = 0 configure:2864: arm-none-eabi-gcc -V 5 arm-none-eabi-gcc: error: unrecognized option '-V' arm-none-eabi-gcc: fatal error: no input files compilation terminated. configure:2875: $? = 1 configure:2864: arm-none-eabi-gcc -qversion 5 arm-none-eabi-gcc: error: unrecognized option '-qversion' arm-none-eabi-gcc: fatal error: no input files compilation terminated. configure:2875: $? = 1 configure:2895: checking whether the C compiler works configure:2917: arm-none-eabi-gccconftest.c 5 /opt/ARM/arm-linaro-eabi-4.6/lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): In function `exit': /home/ww/arm-toolchain/summon-arm-toolchain/build/arm-none-eabi/newlib/libc/stdlib/../../../../../gcc-linaro-4.6-2011.10/newlib/libc/stdlib/exit.c:65: undefined reference to `_exit' collect2: ld returned 1 exit status configure:2921: $? = 1 configure:2959: result: no configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME FreeType | #define PACKAGE_TARNAME freetype | #define PACKAGE_VERSION 2.4.11 | #define PACKAGE_STRING FreeType 2.4.11 | #define PACKAGE_BUGREPORT freetype@nongnu.org | #define PACKAGE_URL | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:2964: error: in `/home/dw/downloads/freetype-2.4.11/builds/unix': configure:2966: error: C compiler cannot create executables See `config.log' for more details ## ## ## Cache variables. ## ## ## ac_cv_build=x86_64-unknown-linux-gnu ac_cv_env_CC_set= ac_cv_env_CC_value= ac_cv_env_CFLAGS_set= ac_cv_env_CFLAGS_value= ac_cv_env_CPPFLAGS_set= ac_cv_env_CPPFLAGS_value= ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_LDFLAGS_set= ac_cv_env_LDFLAGS_value= ac_cv_env_LIBS_set= ac_cv_env_LIBS_value= ac_cv_env_build_alias_set= ac_cv_env_build_alias_value= ac_cv_env_host_alias_set=set ac_cv_env_host_alias_value=arm-none-eabi ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= ac_cv_host=arm-none-eabi ac_cv_prog_CC=arm-none-eabi-gcc ## - ## ## Output variables. ## ## - ## AR='' AS='' AWK='' CC='arm-none-eabi-gcc' CC_BUILD='' CFLAGS='' CPP='' CPPFLAGS='' DEFS='' DLLTOOL='' DSYMUTIL='' DUMPBIN='' ECHO_C='' ECHO_N='-n' ECHO_T='' EGREP='' EXEEXT='' EXEEXT_BUILD='' FGREP=''
Re: [ft] Building FT2 for embedded architectures
Ahh, according to the log file, configure:2917: arm-none-eabi-gccconftest.c5 /opt/ARM/arm-linaro-eabi-4.6/lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): In function `exit': /home/ww/arm-toolchain/summon-arm-toolchain/build/arm-none-eabi/newlib/libc/stdlib/../../../../../gcc-linaro-4.6-2011.10/newlib/libc/stdlib/exit.c:65: undefined reference to `_exit' collect2: ld returned 1 exit status your arm-non-eabi-gcc seems to have a difficulty to make a binary executable. If you want to make a hello-world binary executable for the target system, how do you compile it? Regards, mpsuzuki On 2013年04月20日 00:46, Wolfgang Draxinger wrote: On 04/19/13 17:13, suzuki toshiya wrote: Hi, Could you post config.log generated by passing the --host option to ./configure? Here you go: This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by FreeType configure 2.4.11, which was generated by GNU Autoconf 2.69. Invocation command line was $ ./configure --host=arm-none-eabi --without-zlib --without-bzip2 --without-fsspec --without-fsref --without-ats --disable-shared --enable-static ## - ## ## Platform. ## ## - ## hostname = hilbert uname -m = x86_64 uname -r = 3.2.0-3-rt-amd64 uname -s = Linux uname -v = #1 SMP PREEMPT RT Mon Jul 23 03:37:45 UTC 2012 /usr/bin/uname -p = unknown /bin/uname -X = unknown /bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: /home/dw/.local/bin PATH: /usr/local/bin PATH: /usr/bin PATH: /bin PATH: /usr/local/games PATH: /usr/games PATH: /opt/bin PATH: /usr/local/cuda/bin PATH: /opt/ARM/arm-eabi/bin ## --- ## ## Core tests. ## ## --- ## configure:2480: checking build system type configure:2494: result: x86_64-unknown-linux-gnu configure:2514: checking host system type configure:2527: result: arm-none-eabi configure:2559: checking for arm-none-eabi-gcc configure:2575: found /opt/ARM/arm-eabi/bin/arm-none-eabi-gcc configure:2586: result: arm-none-eabi-gcc configure:2855: checking for C compiler version configure:2864: arm-none-eabi-gcc --version5 arm-none-eabi-gcc (Linaro GCC 4.6-2011.10) 4.6.2 20111004 (prerelease) Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. configure:2875: $? = 0 configure:2864: arm-none-eabi-gcc -v5 Using built-in specs. COLLECT_GCC=arm-none-eabi-gcc COLLECT_LTO_WRAPPER=/opt/ARM/arm-linaro-eabi-4.6/libexec/gcc/arm-none-eabi/4.6.2/lto-wrapper Target: arm-none-eabi Configured with: ../gcc-linaro-4.6-2011.10/configure --target=arm-none-eabi --prefix=/opt/ARM/arm-linaro-eabi-4.6/ --enable-multilib --enable-languages=c,c++ --with-newlib --with-gnu-as --with-gnu-ld --disable-nls --disable-shared --disable-threads --with-headers=newlib/libc/include --disable-libssp --disable-libstdcxx-pch --disable-libmudflap --disable-libgomp --disable-werror --with-system-zlib --disable-newlib-supplied-syscalls Thread model: single gcc version 4.6.2 20111004 (prerelease) (Linaro GCC 4.6-2011.10) configure:2875: $? = 0 configure:2864: arm-none-eabi-gcc -V5 arm-none-eabi-gcc: error: unrecognized option '-V' arm-none-eabi-gcc: fatal error: no input files compilation terminated. configure:2875: $? = 1 configure:2864: arm-none-eabi-gcc -qversion5 arm-none-eabi-gcc: error: unrecognized option '-qversion' arm-none-eabi-gcc: fatal error: no input files compilation terminated. configure:2875: $? = 1 configure:2895: checking whether the C compiler works configure:2917: arm-none-eabi-gccconftest.c5 /opt/ARM/arm-linaro-eabi-4.6/lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): In function `exit': /home/ww/arm-toolchain/summon-arm-toolchain/build/arm-none-eabi/newlib/libc/stdlib/../../../../../gcc-linaro-4.6-2011.10/newlib/libc/stdlib/exit.c:65: undefined reference to `_exit' collect2: ld returned 1 exit status configure:2921: $? = 1 configure:2959: result: no configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME FreeType | #define PACKAGE_TARNAME freetype | #define PACKAGE_VERSION 2.4.11 | #define PACKAGE_STRING FreeType 2.4.11 | #define PACKAGE_BUGREPORT freetype@nongnu.org | #define PACKAGE_URL | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:2964: error: in `/home/dw/downloads/freetype-2.4.11/builds/unix': configure:2966: error: C compiler cannot create executables See `config.log' for more details ## ## ## Cache variables. ## ## ##
Re: [ft] Building FT2 for embedded architectures
On 04/19/13 18:36, suzuki toshiya wrote: your arm-non-eabi-gcc seems to have a difficulty to make a binary executable. Definitely not. I'm successfully compiling and linking programs using this very compiler. I put the blame on the brain dead automake/autoconf system that tries to execute the generated binary on the compiler system which of course will not work. Preferrably there would be no configure script running at all. I'd really prefer to configure the build myself, specific to my needs. Any automagic is a No-Go in this project anyways. If you want to make a hello-world binary executable for the target system, how do you compile it? Here's the Makefile of the small test program I started with. ### Makefile ### all: arm-none-eabi-gcc -I. -c -fno-common -O0 -g -mcpu=cortex-m3 -mthumb main.c arm-none-eabi-ld -Tstm32.ld -nostartfiles -o main.elf main.o arm-none-eabi-objcopy -Obinary main.elf main.bin flash: main.bin stm32_flash.pl main.bin clean: rm main.o main.elf main.bin ### Makefile (END) ### stm32_flash.pl is a small Perl script talking to OpenOCD, to flash the image via JTAG. Anyway, the linker produces a valid ELF. dw@hilbert: ~/…/stm32f_test file main.elf main.elf: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped Already the project is quite progressed. I have the uC talking to the display, a SD-Card from which it loads images and blits it onto the display, it has a working IP stack talking to an Ethernet PHY and a HTTP server running, that serves static content from the SD-Card as well as dynamically generated pages. So I can assure you, that the toolchain does work, and very well it does. However there is no POSIX API around, but the build configure apparently tries to configure for Unix, which is of course completely pointless in that situation. Regards Wolfgang ___ Freetype mailing list Freetype@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype
Re: [ft] Building FT2 for embedded architectures
On Apr 19, 2013, at 11:06 AM, Wolfgang Draxinger wolfgang.draxin...@physik.uni-muenchen.de wrote: Hi, I'd like to build FT2 for the ARM Cortex-M3 architecture to use it for text output on a display. My naive attempt to make it use the available cross-compiler by passing the --host option to ./configure did (of course) not yield a working result; we'll can't blame for for trying ;) You might like to try the amalgamated version; it's awesome. https://github.com/vinniefalco/FreeTypeAmalgam Best wishes, Tom 文林 Wenlin Institute, Inc.Software for Learning Chinese E-mail: wen...@wenlin.com Web: http://www.wenlin.com Telephone: 1-877-4-WENLIN (1-877-493-6546) ☯ ___ Freetype mailing list Freetype@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype