Compiler configure problems (cross compiling?)

When attempting to compile packages, I am receiving these errors:
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/tmp/yaourt-tmp-procyon/abs-htop/src/htop-1.0.3':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Makepkg was unable to build htop.
I have not changed any cflags or other build variables. Why these errors?

I should add, this occurred after I restored my system from a backup.

Similar Messages

  • Problems cross compiling for Foxboard (cris-gcc)

    I am trying to compile the Berkeley DB for applications on a Foxboard from ACME and I am running into some problems that I cannot solve. Perhaps someone can help me.
    First problem is the configure. I use the following to configure:
    cd build_unix
    export prefix=/home/foxboard/devboard-R2_10/target/cris-axis-linux-gnu
    export SYSTYPE=FOXBOARD
    export CCFLAGS="-isystem $prefix/include -isystem $prefix/usr/include"
    export CPPFLAGS="-isystem $prefix/include -isystem $prefix/usr/include"
    export RANLIB=ranlib
    export STRCASE="strcasecmp.o"
    export LDFLAGS="-Wl,-rpath-link,$prefix/lib,-rpath-link,$prefix/usr/lib"
    export SYSLIBS="-Wl,-rpath-link,$prefix/lib,-rpath-link,$prefix/usr/lib"
    export AUXLIBS=$AUXLIBS
    export AR=ar-cris
    export ARFL=$ARFL
    export RANLIB=$RANLIB
    export SYSLIBS="$AUXLIBS $SYSLIBS"
    export CC=gcc_cris $CCARGS
    export OPT=$OPT
    export DEBUG=$DEBUG
    export AWK=awk
    ../dist/configure          \
         --disable-largefile     \
         --disable-static     \
         --enable-smallbuild     \
         --host=i386-pc-linux-gnu \
         --target=cris-linux     \
         --enable-uimutexes     \
         --prefix $prefix/mnt/1
    This works, but it produces the following messages:
    configure: WARNING: sys/time.h: present but cannot be compiled
    configure: WARNING: sys/time.h: check for missing prerequisite headers?
    configure: WARNING: sys/time.h: see the Autoconf documentation
    configure: WARNING: sys/time.h: section "Present But Cannot Be Compiled"
    configure: WARNING: sys/time.h: proceeding with the preprocessor's result
    configure: WARNING: sys/time.h: in the future, the compiler will take precedence
    configure: WARNING: ## ---------------------------------------------------------- ##
    configure: WARNING: ## Report this to Oracle Technology Network Berkeley DB forum ##
    configure: WARNING: ## ---------------------------------------------------------- ##
    checking for sys/time.h... yes
    checking sys/fcntl.h usability... no
    checking sys/fcntl.h presence... yes
    configure: WARNING: sys/fcntl.h: present but cannot be compiled
    configure: WARNING: sys/fcntl.h: check for missing prerequisite headers?
    configure: WARNING: sys/fcntl.h: see the Autoconf documentation
    configure: WARNING: sys/fcntl.h: section "Present But Cannot Be Compiled"
    configure: WARNING: sys/fcntl.h: proceeding with the preprocessor's result
    configure: WARNING: sys/fcntl.h: in the future, the compiler will take precedence
    configure: WARNING: ## ---------------------------------------------------------- ##
    configure: WARNING: ## Report this to Oracle Technology Network Berkeley DB forum ##
    configure: WARNING: ## ---------------------------------------------------------- ##
    Because I assume this is the forum they are talking about, I decided to obey the suggestion and report it here.
    Do I need to be worried?
    Laurent-jan

    The problems are in the configure-step. So here is from config.log:
    <pre>
    configure:23212: checking sys/time.h usability
    configure:23229: gcc_cris -c -Os -isystem /home/foxboard/devboard-R2_10/target/cris-axis-linux-gnu/include -isystem /home/foxboard/devboa
    rd-R2_10/target/cris-axis-linux-gnu/usr/include -D_GNU_SOURCE -D_REENTRANT conftest.c >&5
    In file included from /home/foxboard/devboard-R2_10/target/cris-axis-linux-gnu/include/sys/time.h:4,
    from conftest.c:44:
    /home/foxboard/devboard-R2_10/target/cris-axis-linux-gnu/include/linux/types.h:59: conflicting types for `clock_t'
    /usr/local/cris/cris-axis-elf/include/time.h:36: previous declaration of `clock_t'
    configure:23235: $? = 1
    configure: failed program was:
    | /* confdefs.h. */
    | #define PACKAGE_NAME "Berkeley DB"
    | #define PACKAGE_TARNAME "db-4.5.20"
    | #define PACKAGE_VERSION "4.5.20"
    | #define PACKAGE_STRING "Berkeley DB 4.5.20"
    | #define PACKAGE_BUGREPORT "Oracle Technology Network Berkeley DB forum"
    | #define HAVE_SYS_STAT_H 1
    | #define HAVE_STDLIB_H 1
    | #define HAVE_UNISTD_H 1
    | /* end confdefs.h. */
    | #include <stdio.h>
    | #if HAVE_SYS_TYPES_H
    | # include <sys/types.h>
    | #endif
    | #if HAVE_SYS_STAT_H
    | # include <sys/stat.h>
    | #endif
    | #if STDC_HEADERS
    | # include <stdlib.h>
    | # include <stddef.h>
    | #else
    | # if HAVE_STDLIB_H
    | # include <stdlib.h>
    | # endif
    | #endif
    | #if HAVE_STRING_H
    | # if !STDC_HEADERS && HAVE_MEMORY_H
    | # include <memory.h>
    | # endif
    | # include <string.h>
    | #endif
    | #if HAVE_STRINGS_H
    | # include <strings.h>
    | #endif
    | #if HAVE_INTTYPES_H
    | # include <inttypes.h>
    | #endif
    | #if HAVE_STDINT_H
    | # include <stdint.h>
    | #endif
    | #if HAVE_UNISTD_H
    | # include <unistd.h>
    | #endif
    | #include <sys/time.h>
    configure:23266: result: no
    configure:23270: checking sys/time.h presence
    configure:23285: gcc_cris -E -isystem /home/foxboard/devboard-R2_10/target/cris-axis-linux-gnu/include -isystem /home/foxboard/devboard-R2_10/target/cris-axis-linux-gnu/usr/include -D_GNU_SOURCE -D_REENTRANT conftest.c
    configure:23291: $? = 0
    configure:23312: result: yes
    configure:23325: WARNING: sys/time.h: present but cannot be compiled
    configure:23327: WARNING: sys/time.h: check for missing prerequisite headers?
    configure:23329: WARNING: sys/time.h: see the Autoconf documentation
    configure:23331: WARNING: sys/time.h: section "Present But Cannot Be Compiled"
    configure:23333: WARNING: sys/time.h: proceeding with the preprocessor's result
    configure:23335: WARNING: sys/time.h: in the future, the compiler will take precedence
    configure:23345: checking for sys/time.h
    configure:23353: result: yes
    configure:23212: checking sys/fcntl.h usability
    configure:23229: gcc_cris -c -Os -isystem /home/foxboard/devboard-R2_10/target/cris-axis-linux-gnu/include -isystem /home/foxboard/devboard-R2_10/target/cris-axis-linux-gnu/usr/include -D_GNU_SOURCE -D_REENTRANT conftest.c >&5
    In file included from /home/foxboard/devboard-R2_10/target/cris-axis-linux-gnu/include/asm-generic/fcntl.h:4,
    from /home/foxboard/devboard-R2_10/target/cris-axis-linux-gnu/include/asm/fcntl.h:1,
    from /home/foxboard/devboard-R2_10/target/cris-axis-linux-gnu/include/sys/fcntl.h:4,
    from conftest.c:45:
    /home/foxboard/devboard-R2_10/target/cris-axis-linux-gnu/include/linux/types.h:59: conflicting types for `clock_t'
    /usr/local/cris/cris-axis-elf/include/time.h:36: previous declaration of `clock_t'
    configure:23235: $? = 1
    configure: failed program was:
    | /* confdefs.h. */
    | #define PACKAGE_NAME "Berkeley DB"
    | #define PACKAGE_TARNAME "db-4.5.20"
    | #define PACKAGE_VERSION "4.5.20"
    | #define PACKAGE_STRING "Berkeley DB 4.5.20"
    | #define PACKAGE_BUGREPORT "Oracle Technology Network Berkeley DB forum"
    | #define HAVE_SYS_STAT_H 1
    | #define HAVE_STDLIB_H 1
    | #define HAVE_UNISTD_H 1
    | #define HAVE_SYS_TIME_H 1
    | /* end confdefs.h. */
    | #include <stdio.h>
    | #if HAVE_SYS_TYPES_H
    | # include <sys/types.h>
    | #endif
    | #if HAVE_SYS_STAT_H
    | # include <sys/stat.h>
    | #endif
    | #if STDC_HEADERS
    | # include <stdlib.h>
    | # include <stddef.h>
    | #else
    | # if HAVE_STDLIB_H
    | # include <stdlib.h>
    | # endif
    | #endif
    | #if HAVE_STRING_H
    | # if !STDC_HEADERS && HAVE_MEMORY_H
    | # include <memory.h>
    | # endif
    | # include <string.h>
    | #endif
    | #if HAVE_STRINGS_H
    | # include <strings.h>
    | #endif
    | #if HAVE_INTTYPES_H
    | # include <inttypes.h>
    | #endif
    | #if HAVE_STDINT_H
    | # include <stdint.h>
    | #endif
    | #if HAVE_UNISTD_H
    | # include <unistd.h>
    | #endif
    | #include <sys/fcntl.h>
    configure:23266: result: no
    configure:23270: checking sys/fcntl.h presence
    configure:23285: gcc_cris -E -isystem /home/foxboard/devboard-R2_10/target/cris-axis-linux-gnu/include -isystem /home/foxboard/devboard-R2_10/target/cris-axis-linux-gnu/usr/include -D_GNU_SOURCE -D_REENTRANT conftest.c
    configure:23291: $? = 0
    configure:23312: result: yes
    configure:23325: WARNING: sys/fcntl.h: present but cannot be compiled
    configure:23327: WARNING: sys/fcntl.h: check for missing prerequisite headers?
    configure:23329: WARNING: sys/fcntl.h: see the Autoconf documentation
    configure:23331: WARNING: sys/fcntl.h: section "Present But Cannot Be Compiled"
    configure:23333: WARNING: sys/fcntl.h: proceeding with the preprocessor's result
    configure:23335: WARNING: sys/fcntl.h: in the future, the compiler will take precedence
    configure:23345: checking for sys/fcntl.h
    configure:23353: result: yes
    </pre>
    Running the configure again results in the same messages (which is logical) but now fails with:
    <pre>
    checking for unistd.h... (cached) yes
    checking for off_t... no
    configure: error: No off_t type.
    </pre>
    Crosscompiling is not as easy as it looks. Thanks for looking into this.
    Laurent-jan

  • Problems cross-compiling imagemagick with mingw32

    I am trying to cross-compile imagemagick dlls for Windows with mingw32.
    I installed the mingw32 package and ran
    ./configure --host=i486-mingw32 --with-perl=no --enable-static=no
    The output shows something like this:
    JPEG v1           --with-jpeg=yes        no (failed tests)
    JPEG-2000         --with-jp2=yes        no (failed tests)
    LCMS v1           --with-lcms=yes        no (failed tests)
    LCMS v2           --with-lcms2=yes        no
    LQR               --with-lqr=yes        no
    Magick++          --with-magick-plus-plus=yes    yes
    OpenEXR           --with-openexr=yes        no
    PERL              --with-perl=no        no
    PNG               --with-png=yes        no (failed tests)
    RSVG              --with-rsvg=yes        yes
    TIFF              --with-tiff=yes        no (failed tests)
    In config.log the test failures are shown as follows:
    configure:27841: checking for jpeg_read_header in -ljpeg
    configure:27866: i486-mingw32-gcc -std=gnu99 -std=gnu99 -o conftest.exe   -g -O2 -Wall -I/usr/include/freetype2    -D_DLL -D_MT  -I/usr/include   -L/usr/lib conftest.c -ljpeg     -lX11   -lm   >&5
    /usr/lib/gcc/i486-mingw32/4.5.0/../../../../i486-mingw32/bin/ld: cannot find -lX11
    collect2: ld returned 1 exit status
    The compiler/linker configuration looks correct to me:
    X11 Configuration:
          X_CFLAGS        = -I/usr/include
          X_PRE_LIBS      =
          X_LIBS          = -L/usr/lib
          X_EXTRA_LIBS    =
    Options used to compile and link:
      PREFIX          = /usr/local
      EXEC-PREFIX     = /usr/local
      VERSION         = 6.6.4
      CC              = i486-mingw32-gcc -std=gnu99 -std=gnu99
      CFLAGS          = -g -O2 -Wall
      CPPFLAGS        = -I/usr/local/include/ImageMagick -D_DLL -D_MT
      PCFLAGS         = -D_DLL -D_MT
      DEFS            = -DHAVE_CONFIG_H
      LDFLAGS         = -L/usr/lib
      MAGICK_LDFLAGS  = -L/usr/local/lib -L/usr/lib
      LIBS            = -lMagickCore -lfontconfig -lX11 -pthread -lrsvg-2 -lm -lgdk_pixbuf-2.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lgdi32 -lm
      CXX             = i486-mingw32-g++
      CXXFLAGS        = -g -O2
      FEATURES        =
    Why can't it find the X11 library?

    I am trying to cross-compile imagemagick dlls for Windows with mingw32.
    I installed the mingw32 package and ran
    ./configure --host=i486-mingw32 --with-perl=no --enable-static=no
    The output shows something like this:
    JPEG v1           --with-jpeg=yes        no (failed tests)
    JPEG-2000         --with-jp2=yes        no (failed tests)
    LCMS v1           --with-lcms=yes        no (failed tests)
    LCMS v2           --with-lcms2=yes        no
    LQR               --with-lqr=yes        no
    Magick++          --with-magick-plus-plus=yes    yes
    OpenEXR           --with-openexr=yes        no
    PERL              --with-perl=no        no
    PNG               --with-png=yes        no (failed tests)
    RSVG              --with-rsvg=yes        yes
    TIFF              --with-tiff=yes        no (failed tests)
    In config.log the test failures are shown as follows:
    configure:27841: checking for jpeg_read_header in -ljpeg
    configure:27866: i486-mingw32-gcc -std=gnu99 -std=gnu99 -o conftest.exe   -g -O2 -Wall -I/usr/include/freetype2    -D_DLL -D_MT  -I/usr/include   -L/usr/lib conftest.c -ljpeg     -lX11   -lm   >&5
    /usr/lib/gcc/i486-mingw32/4.5.0/../../../../i486-mingw32/bin/ld: cannot find -lX11
    collect2: ld returned 1 exit status
    The compiler/linker configuration looks correct to me:
    X11 Configuration:
          X_CFLAGS        = -I/usr/include
          X_PRE_LIBS      =
          X_LIBS          = -L/usr/lib
          X_EXTRA_LIBS    =
    Options used to compile and link:
      PREFIX          = /usr/local
      EXEC-PREFIX     = /usr/local
      VERSION         = 6.6.4
      CC              = i486-mingw32-gcc -std=gnu99 -std=gnu99
      CFLAGS          = -g -O2 -Wall
      CPPFLAGS        = -I/usr/local/include/ImageMagick -D_DLL -D_MT
      PCFLAGS         = -D_DLL -D_MT
      DEFS            = -DHAVE_CONFIG_H
      LDFLAGS         = -L/usr/lib
      MAGICK_LDFLAGS  = -L/usr/local/lib -L/usr/lib
      LIBS            = -lMagickCore -lfontconfig -lX11 -pthread -lrsvg-2 -lm -lgdk_pixbuf-2.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lgdi32 -lm
      CXX             = i486-mingw32-g++
      CXXFLAGS        = -g -O2
      FEATURES        =
    Why can't it find the X11 library?

  • Problem cross compiling from x86_64 to i386

    Please read from the fourth message.
    OLD MESSAGE:
    Today I needed to cross compile and ld could not get libc.co.6 because it looks it with the absolute path /usr/lib/libc.so.6 ignoring -L options,
    I tried fixing using --sysroot, but ld was not compiled with its support.
    So I was wondering, it should not be better to compile with --with-sysroot ?
    Last edited by ezzetabi (2010-01-08 10:11:51)

    I am trying to compile the doom3 SDK: so it is a cross compiling from x86_64 to i386.
    After downloading the SDK and unpacking it with --tar xf, since the package uses scons  I had to modify the file SConstruct  line BASELINKFLAGS: I put BASELINKFLAGS = [ "-m32", "-L/opt/lib32/lib", "-L/opt/lib32/usr/lib", ]
    but the linking fails with
    `/usr/bin/ld: skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6'
    On the other hand if I use
    BASELINKFLAGS = [ "-m32", "--sysroot=/opt/lib32", ]
    ld fails anyway with... :S
    /usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.2/../../../crti.o' is incompatible with i386 output
    /usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.2/crtbeginS.o' is incompatible with i386 output
    /usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.2/crtendS.o' is incompatible with i386 output
    /usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.2/../../../crtn.o' is incompatible with i386 output
    It is not really important, but I find annoying that I cannot compile it :S
    Last edited by ezzetabi (2010-01-08 09:48:59)

  • Problem in GCCFSS cross compiler

    I have followed the instructions of using gccfss as a cross compiler. But when I compile my HelloWorld.c I encountered the following error:
    ld fatal: file /usr/lib/libc.so: wrong ELF machine type: EM_386
    Can anyone help me?

    All
    I have gccfss installed along with target (sparc) machine's /usr/include and /usr/lib directory contents.
    I'm trying a simple "Hello" {color:#0000ff}cross-compile{color} exercise below and getting linking {color:#ff0000}error(s){color:#000000}.
    Any ideas/suggestions?
    Thank you in advance, Attila.
    NB: I tried setting/defining LD_LIBRARY_PATH environment variable to point to copy of target system's library directories but get "wrong ELF machine type" errors because gccfss is referencing /usr/lib directory instead.
    {color}{color}{color:#ff0000}{color:#0000ff}
    $ /opt/gccfss/gcc/bin/gcc -L/opt/sparc/usr/lib -L/opt/sparc/usr/lib/mdb/proc -L/opt/sparc/usr/lib/mdb/proc/sparcv9 hello.c{color}
    Undefined first referenced
    symbol in file
    exit /opt/gccfss/gcc/bin/../lib/gcc/sparc-sun-solaris2.10/4.2.0/crt1.o
    puts /tmp/ccobWhgs.o
    _exit                               /opt/gccfss/gcc/bin/../lib/gcc/sparc-sun-solaris2.10/4.2.0/crt1.o
    bzero /opt/sparc/usr/lib/mdb/proc/libc.so
    mdb_snprintf /opt/sparc/usr/lib/mdb/proc/libc.so
    mdb_printf /opt/sparc/usr/lib/mdb/proc/libc.so
    atexit /opt/gccfss/gcc/bin/../lib/gcc/sparc-sun-solaris2.10/4.2.0/crt1.o
    mdb_lookup_by_obj /opt/sparc/usr/lib/mdb/proc/libc.so
    strcat /opt/sparc/usr/lib/mdb/proc/libc.so
    strcpy /opt/sparc/usr/lib/mdb/proc/libc.so
    mdb_alloc /opt/sparc/usr/lib/mdb/proc/libc.so
    mdb_vread /opt/sparc/usr/lib/mdb/proc/libc.so
    sig2str /opt/sparc/usr/lib/mdb/proc/libc.so
    mdb_free /opt/sparc/usr/lib/mdb/proc/libc.so
    mdb_warn /opt/sparc/usr/lib/mdb/proc/libc.so
    strerror /opt/sparc/usr/lib/mdb/proc/libc.so
    mdb_get_xdata /opt/sparc/usr/lib/mdb/proc/libc.so
    _environ                            /opt/gccfss/gcc/bin/../lib/gcc/sparc-sun-solaris2.10/4.2.0/crt1.o
    ld: fatal: Symbol referencing errors. No output written to a.out
    collect2: ld returned 1 exit status{color}

  • Compile issues with cross-mipsel-linux-gnu-gcc

    I'm trying to set up some sort of cross-compilation environment in order to compile software for a MIPS device.
    I installed cross-mipsel-linux-gnu-gcc (4.7.2-1) along with cross-mipsel-linux-gnu-binutils (2.22-1). Then I tried to compile a simple Hello World, and the result was as follows:
    [mcmlxxxvi@deepspace1 hello-world]$ cat hello.c
    #include <stdio.h>
    int main()
    printf("Hello World!\n");
    return 0;
    [mcmlxxxvi@deepspace1 hello-world]$ mipsel-linux-gnu-gcc hello.c
    hello.c:1:19: fatal error: stdio.h: No such file or directory
    compilation terminated.
    [mcmlxxxvi@deepspace1 hello-world]$ mipsel-linux-gnu-gcc hello.c -I/usr/include
    /usr/lib/cross-mipsel-linux-gnu/lib/gcc/mipsel-linux-gnu/4.7.2/../../../../mipsel-linux-gnu/bin/ld: cannot find crt1.o: No such file or directory
    /usr/lib/cross-mipsel-linux-gnu/lib/gcc/mipsel-linux-gnu/4.7.2/../../../../mipsel-linux-gnu/bin/ld: cannot find crti.o: No such file or directory
    /usr/lib/cross-mipsel-linux-gnu/lib/gcc/mipsel-linux-gnu/4.7.2/../../../../mipsel-linux-gnu/bin/ld: cannot find crtbegin.o: No such file or directory
    /usr/lib/cross-mipsel-linux-gnu/lib/gcc/mipsel-linux-gnu/4.7.2/../../../../mipsel-linux-gnu/bin/ld: cannot find -lgcc
    /usr/lib/cross-mipsel-linux-gnu/lib/gcc/mipsel-linux-gnu/4.7.2/../../../../mipsel-linux-gnu/bin/ld: cannot find -lc
    /usr/lib/cross-mipsel-linux-gnu/lib/gcc/mipsel-linux-gnu/4.7.2/../../../../mipsel-linux-gnu/bin/ld: cannot find -lgcc
    /usr/lib/cross-mipsel-linux-gnu/lib/gcc/mipsel-linux-gnu/4.7.2/../../../../mipsel-linux-gnu/bin/ld: cannot find crtend.o: No such file or directory
    /usr/lib/cross-mipsel-linux-gnu/lib/gcc/mipsel-linux-gnu/4.7.2/../../../../mipsel-linux-gnu/bin/ld: cannot find crtn.o: No such file or directory
    collect2: error: ld returned 1 exit status
    I know I generally need a compatible glibc build, but a) there isn't a package pre-built for MIPS as the compiler, and b) there is no mention of glibc in either gcc or binutils' AUR pages. So I thought that these two packages were somehow supposed to be sufficient - and they aren't.
    I found a tutorial on setting up cross-compilation for MIPS and I tried to build libc, but as I used the gcc and bunutils AUR pacakges instead of going straight for the source, and, probably, as the tutorial is geared towards slightly older versions, I did not succeed. configure produced only a config.log and I wasn't able to make.
    So, how are cross-mipsel-linux-gnu-gcc and cross-mipsel-linux-gnu-binutils supposed to be used? How do I need to set up my environment in order to be able to invoke the MIPS gcc the same way as my regular gcc?
    Thanks in advance.

    The problem is gone after going to Kernel 39 in testing.

  • [SOLVED] mingw32 cross compile won't link with static libraries

    Hi all,
    I'm trying to cross compile an app I have written to i486-mingw32.  I'm running Arch 64-bit (under which it compiles fine natively), and I have installed the mingw32 binaries along with mingw32-boost-static from AUR.
    All seems well, but unfortunately when I cross compile my code libtool refuses to link to the static Boost libraries:
    *** Warning: Trying to link with static lib archive /usr/i486-mingw32/lib/libboost_filesystem-mt-s.a.
    *** I have the capability to make that library automatically link in when
    *** you link to this library. But I can only do this if you have a
    *** shared version of the library, which you do not appear to have
    *** because the file extensions .a of this argument makes me believe
    *** that it is just a static archive that I should not use here.
    This then leads to undefined references as the library is not linked in.  But as I *want* the static version of the library, does anyone know how to tell libtool to accept the .a file and link it?
    Last edited by Malvineous (2011-05-02 02:44:48)

    Just to follow up on this, I discovered the problem.  It turns out libtool was doing the correct thing, and refusing to link the static library in with the shared one (otherwise later this could result in something being defined multiple times.)  The undefined references were unrelated to the error above, and the code that was causing them (in a different Boost header file) could be easily #defined out.
    When the time came to link the actual executables, libtool did include all the necessary libraries and everything worked as it should!

  • Cross compiling apps on solaris 8 for solaris 10 x86 and x64

    Hi All,
    We have a few applications built on Solaris 8. and we want to build the same apps on Solaris 10 x86 and x64 but the problem is clearcase does not support Solaris 10 yet.
    Can we cross compile the apps on Solaris 8 for Solaris 10 x86 and x64 ? and how ?
    waiting for any info on this.
    TIA,
    warm regards,
    Girish

    FYI, I noticed the reply on Sun Studio General Forum:
    If you build an app on one version of Solaris, the app will run on later Solaris versions. So in particular, you can build an x86 application on Solaris 8 and run it on Solaris 9 and 10.
    Unfortunately, an x64 application must be built on a Solaris x64 system, which first became available with Solaris 10.

  • [SOLVED] cross compiling libopenfst makepkg error

    Hello there,
    I am trying to cross compile openfst on my 64 bit arch setup since it is taking too long on my raspberry pi (which also happily runs arch). I thought I would be ok with the following makepkg to get me a binary package which I could transfer to my pi and then install with pacman-U:
    # Maintainer: Christoph Drexler <chrdr at gmx dot at>
    pkgname=openfst
    pkgver=1.4.1
    pkgrel=1
    pkgdesc="Library for constructing, combining, optimizing, and searching weighted finite-state transducers (FSTs)"
    arch=('i686' 'x86_64' 'armv6h')
    url="http://www.openfst.org/"
    license=('APACHE')
    depends=('gcc-libs' 'glibc')
    options=(!libtool)
    source=("http://openfst.cs.nyu.edu/twiki/pub/FST/FstDownload/${pkgname}-${pkgver}.tar.gz")
    md5sums=('ca8f1730b9b9b281e515611fa9ae23c0')
    build() {
    cd ${srcdir}/${pkgname}-${pkgver}
    #export CXX=arm-linux-gnueabi-g++
    #export CC=arm-linux-gnueabi-gcc
    # Options according to http://openfst.cs.nyu.edu/twiki/bin/view/FST/ReadMe
    OPTIONS="--prefix=/usr --disable-dependency-tracking"
    OPTIONS+=" --enable-bin" # Enable fst::script and command-line binaries; Default: yes
    OPTIONS+=" --enable-compact-fsts" # Enable all CompactFst classes; Default: no
    OPTIONS+=" --enable-const-fsts" # Enable all ConstFst classes; Default: no
    OPTIONS+=" --enable-far" # Enable FAR (FST Archive) extension; Default: no
    OPTIONS+=" --enable-linear-fsts" # Enable Linear{Tagger,Classifier}Fst extensions; Default: no
    OPTIONS+=" --enable-lookahead-fsts" # Enable LookAheadFst classes; Default: no
    OPTIONS+=" --enable-pdt" # Experimental push-down transducer extensions; Default: no
    OPTIONS+=" --host=arm-linux-gnueabi" # Experimental push-down transducer extensions; Default: no
    OPTIONS+=" --build=x86_64" # Experimental push-down transducer extensions; Default: no
    LIBS="-ldl" ./configure $OPTIONS
    make
    package() {
    cd ${srcdir}/${pkgname}-${pkgver}
    make DESTDIR=${pkgdir} install
    (basically adding the host and build option)
    However, I get an error in the output:
    ==> Making package: openfst 1.4.1-1 (Sun Jan 11 16:13:22 CET 2015)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving sources...
    -> Found openfst-1.4.1.tar.gz
    ==> Validating source files with md5sums...
    openfst-1.4.1.tar.gz ... Passed
    ==> Extracting sources...
    -> Extracting openfst-1.4.1.tar.gz with bsdtar
    ==> Removing existing $pkgdir/ directory...
    ==> Starting build()...
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for arm-linux-gnueabi-strip... arm-linux-gnueabi-strip
    checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking for arm-linux-gnueabi-g++... arm-linux-gnueabi-g++
    checking whether the C++ compiler works... no
    configure: error: in `/home/tom/openfst-1.4.1/src/openfst-1.4.1':
    configure: error: C++ compiler cannot create executables
    See `config.log' for more details
    ==> ERROR: A failure occurred in build().
    Aborting...
    the error being that the C++ compiler cannot create excecutables makes sense since they are not meant to be excecuted on x86_64 but for armv6h (cross compilation). I have checked with arm-linux-gnueabi-g++ and its excecutables I can run on my pi so this should be ok. I am guessing that I am either missing an option to disable the compiler check, or I should change the configure script and remove this check, but I cannot figure out how to do either...
    //edit: I'm not sure this topic is in the right place btw, maybe it should be in scripting...
    Last edited by tomzooi (2015-01-11 18:23:35)

    that seems to do the trick, I'm not gonna test it since my pi just finished compiling it locally (which took 12+hours or so), but the compile seems to work since they are not excecutable on 64 bit, so pkgbuild for raspi cross compilation using makepkg -s:
    # Maintainer: Christoph Drexler <chrdr at gmx dot at>
    pkgname=openfst
    pkgver=1.4.1
    pkgrel=1
    pkgdesc="Library for constructing, combining, optimizing, and searching weighted finite-state transducers (FSTs)"
    arch=('i686' 'x86_64' 'armv6h')
    url="http://www.openfst.org/"
    license=('APACHE')
    depends=('gcc-libs' 'glibc')
    options=(!libtool !buildflags)
    source=("http://openfst.cs.nyu.edu/twiki/pub/FST/FstDownload/${pkgname}-${pkgver}.tar.gz")
    md5sums=('ca8f1730b9b9b281e515611fa9ae23c0')
    build() {
    cd ${srcdir}/${pkgname}-${pkgver}
    # Options according to http://openfst.cs.nyu.edu/twiki/bin/view/FST/ReadMe
    OPTIONS="--prefix=/usr --disable-dependency-tracking"
    OPTIONS+=" --enable-bin" # Enable fst::script and command-line binaries; Default: yes
    OPTIONS+=" --enable-compact-fsts" # Enable all CompactFst classes; Default: no
    OPTIONS+=" --enable-const-fsts" # Enable all ConstFst classes; Default: no
    OPTIONS+=" --enable-far" # Enable FAR (FST Archive) extension; Default: no
    OPTIONS+=" --enable-linear-fsts" # Enable Linear{Tagger,Classifier}Fst extensions; Default: no
    OPTIONS+=" --enable-lookahead-fsts" # Enable LookAheadFst classes; Default: no
    OPTIONS+=" --enable-pdt" # Experimental push-down transducer extensions; Default: no
    OPTIONS+=" --host=arm-linux-gnueabi" # Experimental push-down transducer extensions; Default: no
    OPTIONS+=" --build=x86_64" # Experimental push-down transducer extensions; Default: no
    LIBS="-ldl" ./configure $OPTIONS
    make
    package() {
    cd ${srcdir}/${pkgname}-${pkgver}
    make DESTDIR=${pkgdir} install
    to get some stuff which I think I can ignore:
    strip: Unable to recognise the format of the input file `./usr/bin/fstprint'
    strip: Unable to recognise the format of the input file `./usr/bin/farprintstrings'
    strip: Unable to recognise the format of the input file `./usr/bin/fstmap'
    strip: Unable to recognise the format of the input file `./usr/bin/fstsynchronize'
    strip: Unable to recognise the format of the input file `./usr/bin/fstdraw'
    strip: Unable to recognise the format of the input file `./usr/bin/fstepsnormalize'
    strip: Unable to recognise the format of the input file `./usr/bin/fstdisambiguate'
    strip: Unable to recognise the format of the input file `./usr/bin/fstunion'
    strip: Unable to recognise the format of the input file `./usr/bin/pdtexpand'
    strip: Unable to recognise the format of the input file `./usr/bin/fstminimize'
    strip: Unable to recognise the format of the input file `./usr/bin/fsttopsort'
    strip: Unable to recognise the format of the input file `./usr/bin/pdtreplace'
    strip: Unable to recognise the format of the input file `./usr/bin/fstreverse'
    strip: Unable to recognise the format of the input file `./usr/bin/fstsymbols'
    strip: Unable to recognise the format of the input file `./usr/bin/farequal'
    strip: Unable to recognise the format of the input file `./usr/bin/fstequal'
    strip: Unable to recognise the format of the input file `./usr/bin/fstcompile'
    strip: Unable to recognise the format of the input file `./usr/bin/fstshortestpath'
    strip: Unable to recognise the format of the input file `./usr/bin/farinfo'
    strip: Unable to recognise the format of the input file `./usr/bin/fstrandgen'
    strip: Unable to recognise the format of the input file `./usr/bin/fstshortestdistance'
    strip: Unable to recognise the format of the input file `./usr/bin/fstarcsort'
    strip: Unable to recognise the format of the input file `./usr/bin/fstrmepsilon'
    strip: Unable to recognise the format of the input file `./usr/bin/fstconvert'
    strip: Unable to recognise the format of the input file `./usr/bin/fstreplace'
    strip: Unable to recognise the format of the input file `./usr/bin/farcompilestrings'
    strip: Unable to recognise the format of the input file `./usr/bin/fstencode'
    strip: Unable to recognise the format of the input file `./usr/bin/fstpush'
    strip: Unable to recognise the format of the input file `./usr/bin/pdtshortestpath'
    strip: Unable to recognise the format of the input file `./usr/bin/fstinfo'
    strip: Unable to recognise the format of the input file `./usr/bin/fstrelabel'
    strip: Unable to recognise the format of the input file `./usr/bin/fstinvert'
    strip: Unable to recognise the format of the input file `./usr/bin/fstconcat'
    strip: Unable to recognise the format of the input file `./usr/bin/fstintersect'
    strip: Unable to recognise the format of the input file `./usr/bin/pdtreverse'
    strip: Unable to recognise the format of the input file `./usr/bin/fstclosure'
    strip: Unable to recognise the format of the input file `./usr/bin/fstdeterminize'
    strip: Unable to recognise the format of the input file `./usr/bin/fstcompose'
    strip: Unable to recognise the format of the input file `./usr/bin/fstlinear'
    strip: Unable to recognise the format of the input file `./usr/bin/pdtcompose'
    strip: Unable to recognise the format of the input file `./usr/bin/farcreate'
    strip: Unable to recognise the format of the input file `./usr/bin/fstdifference'
    strip: Unable to recognise the format of the input file `./usr/bin/fstloglinearapply'
    strip: Unable to recognise the format of the input file `./usr/bin/fstprune'
    strip: Unable to recognise the format of the input file `./usr/bin/pdtinfo'
    strip: Unable to recognise the format of the input file `./usr/bin/fstproject'
    strip: Unable to recognise the format of the input file `./usr/bin/farextract'
    strip: Unable to recognise the format of the input file `./usr/bin/fstequivalent'
    strip: Unable to recognise the format of the input file `./usr/bin/fstconnect'
    strip: Unable to recognise the format of the input file `./usr/bin/fstreweight'
    strip: Unable to recognise the format of the input file `./usr/lib/libfst.so.3.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/compact8_acceptor-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/compact8_string-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/libfstfar.so.1.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/const16-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/compact8_weighted_string-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/arc_lookahead-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/const64-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/libfstlinearscript.so.1.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/compact16_string-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/compact16_unweighted-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/libfstlookahead.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/linear_classifier-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/linear_tagger-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/compact16_acceptor-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/libfstcompact.so.1.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/olabel_lookahead-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/const8-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/compact16_weighted_string-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/compact16_unweighted_acceptor-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/compact64_string-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/libfstconst.so.1.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/ilabel_lookahead-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/compact64_unweighted-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/compact64_weighted_string-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/libfstfarscript.so.1.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/compact8_unweighted_acceptor-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/libfstpdtscript.so.1.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/compact8_unweighted-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/compact64_unweighted_acceptor-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/fst/compact64_acceptor-fst.so.0.0.0'
    strip: Unable to recognise the format of the input file `./usr/lib/libfstscript.so.1.0.0'
    I will check soon I hope , for now will mark it as solved.

  • Create a cross compiler for arm

    I am struggling with building a cross toolchain, essentially it boils down to building these packages (in thegiven order):
    binutils gcc-base newlib gcc
    When done I am trying to compile a dummy cpp algorithm (euler gcd/ggT search) with no includes.
    What the cross toolchain spits at me is the following:
    $ arm-unknown-eabi-gcc -march=armv5te ./euklidisch_ggt.c -o ./euklidisch_ggt.bin.armv5te
    /usr/bin/arm-unknown-eabi-ld: skipping incompatible /usr/lib/gcc/arm-unknown-eabi/4.5.2/../../../../arm-unknown-eabi/lib/libc.a when searching for -lc
    /usr/bin/arm-unknown-eabi-ld: skipping incompatible /usr/arm-unknown-eabi/lib/libc.a when searching for -lc
    /usr/bin/arm-unknown-eabi-ld: cannot find -lc
    collect2: ld returned 1 exit status
    I wrote a little script to build it (as I got pretty much fed up doing it all by hund, round #7 just failed again)
    Note: it is semi-automated, you will still be requested to give your passwd to agree with install and blah
    Note: use it with arg "cleanup" to get rid of old installed packages (run as root)
    Note: use it to compile as user
    #!/bin/bash
    BUILDERUSER=buildmonkey
    PREFIX="/usr"
    TARGET="arm-unknown-eabi"
    PKGBUILDDIR="/home/${BUILDERUSER}/PKGBUILD"
    PKGS="binutils gcc-base newlib gcc"
    export PREFIX
    export TARGET
    export BUILDERUSER
    export PKGS
    export PKGBUILDDIR
    function cleanup
    for j in ${PKGS}
    do
    export j
    echo "Removing package ${TARGET}-${j}"
    su -c'pacman -R ${TARGET}-${j}'
    done
    function compile_and_install
    cd ${PKGBUILDDIR}
    echo ""
    echo ""
    echo "Compileing ${TARGET}-${1} ... "
    echo ""
    echo ""
    cd ./${TARGET}-${1}
    rm ./${TARGET}-${1}*
    makepkg -f || return 1
    su -c 'pacman -U ./${TARGET}-${1}*'
    echo ""
    if [ "${1}" == "cleanup" ]; then
    echo "cleanup requested...."
    cleanup
    exit 0
    fi
    if [ "$(id -u)" == "0" ]; then
    echo "This script must not be run as root!!" 1>&2
    exit 1
    fi
    echo ""
    if [ -d "${PKGBUILDDIR}" ]; then
    echo "PKGBUILD directory is ${PKGBUILDDIR}"
    else
    echo "PKGBUILD directory ${PKGBUILDDIR} is missing!!"
    exit 1
    fi
    echo "PKGs are ${PKGS}"
    echo ""
    for i in ${PKGS}
    do
    compile_and_install ${i}
    done
    exit 0
    The packagebuilds are as following (hacked away versions of the ones existing in AUR, which give me linker errors)
    binutils
    pkgname=arm-unknown-eabi-binutils
    pkgver=2.21
    pkgrel=1
    pkgdesc="A set of programs to assemble and manipulate binary and object files"
    arch=(i686 x86_64)
    license=(GPL)
    options=(!libtool)
    url="http://sources.redhat.com/binutils"
    depends=('glibc' 'zlib')
    source=(ftp://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.bz2)
    md5sums=('c84c5acc9d266f1a7044b51c85a823f5')
    build() {
    cd $srcdir/binutils-${pkgver}
    [ $NOEXTRACT -eq 1 ] || ./configure\
    --prefix=${PREFIX} \
    --program-prefix=${TARGET}- \
    --enable-shared \
    --disable-multilib \
    --with-lib-path=${PREFIX}/lib/binutils/{TARGET} \
    --disable-nls \
    --target=${TARGET} \
    --build=${CHOST} \
    --host=${CHOST}
    # mkdir -p $pkgdir/${PREFIX}/lib/binutils
    sed -i 's|know (S_GET_VALUE (frag->tc_frag_data.last_map) < S_GET_VALUE (symbolP));|{know (S_GET_VALUE (frag->tc_frag_data.last_map) < S_GET_VALUE (symbolP));}|' gas/config/tc-arm.c || return 1
    make configure-host
    make tooldir=$pkgdir/${PREFIX}
    make prefix=$pkgdir/${PREFIX} tooldir=$pkgdir/${PREFIX} install
    mkdir -p $pkgdir/${PREFIX}/lib/binutils/${TARGET}
    cp -v include/libiberty.h $pkgdir/${PREFIX}/lib/binutils/${TARGET}
    rm -f $pkgdir/${PREFIX}/man/man1/{dlltool,nlmconv,windres}*
    rm -f $pkgdir/usr/bin/ar
    rm -f $pkgdir/usr/bin/as
    rm -f $pkgdir/usr/bin/ld
    rm -f $pkgdir/usr/bin/nm
    rm -f $pkgdir/usr/bin/objdump
    rm -f $pkgdir/usr/bin/ranlib
    rm -f $pkgdir/usr/bin/strip
    rm -f $pkgdir/usr/bin/objcopy
    rm -f $pkgdir/usr/lib/libiberty.a
    rm -rf $pkgdir/usr/share
    rm -rf $pkgdir/usr/lib/ldscripts
    gcc-base
    pkgname=arm-unknown-eabi-gcc-base
    pkgver=4.5.2
    pkgrel=1
    pkgdesc="The GNU Compiler Collection"
    arch=(i686 x86_64)
    license=('GPL' 'LGPL')
    url="http://gcc.gnu.org"
    depends=('arm-unknown-eabi-binutils' 'libmpc' 'libelf' 'cloog-ppl')
    options=(!libtool !emptydirs zipman docs !strip)
    source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-core-${pkgver}.tar.bz2)
    md5sums=('aa9e36bec080452372bfba793428ee82')
    build() {
    cd $srcdir/gcc-$pkgver
    export CFLAGS="-O2 -pipe"
    export CXXFLAGS="-O2 -pipe"
    [ $NOEXTRACT -eq 1 ] || rm -rf build
    mkdir build
    cd build
    [ $NOEXTRACT -eq 1 ] || ../configure --prefix=${PREFIX} \
    --target=${TARGET} \
    --host=$CHOST \
    --build=$CHOST \
    --enable-shared \
    --disable-nls \
    --enable-languages=c \
    --enable-multilib \
    --with-local-prefix=${PREFIX}/lib/${TARGET} \
    --with-as=${PREFIX}/bin/${TARGET}-as \
    --with-ld=${PREFIX}/bin/${TARGET}-ld \
    --enable-softfloat \
    --with-float=soft \
    --with-newlib
    make all-gcc all-target-libgcc
    make DESTDIR=$pkgdir install-gcc install-target-libgcc
    rm -f $pkgdir/usr/share/man/man7/fsf-funding.7*
    rm -f $pkgdir/usr/share/man/man7/gfdl.7*
    rm -f $pkgdir/usr/share/man/man7/gpl.7*
    rm -rf $pkgdir/usr/share/info
    cp -r $pkgdir/usr/libexec/* $pkgdir/usr/lib/
    rm -rf $pkgdir/usr/libexec
    # strip it manually
    strip $pkgdir/usr/bin/* 2>/dev/null || true
    find $pkgdir/usr/lib -type f -exec arm-none-eabi-strip {} \; 2>/dev/null || true
    newlib
    pkgname=arm-unknown-eabi-newlib
    pkgver=1.19.0
    pkgrel=1
    pkgdesc="Newlib is a C library intended for use on embedded systems."
    arch=('i686' 'x86_64')
    groups=('devel')
    url="http://sourceware.org/newlib/"
    license=('GPL')
    depends=('arm-unknown-eabi-binutils' 'arm-unknown-eabi-gcc-base')
    source=(ftp://sources.redhat.com/pub/newlib/newlib-${pkgver}.tar.gz)
    md5sums=('0966e19f03217db9e9076894b47e6601')
    build() {
    cd ${srcdir}
    rm -rf build
    mkdir build
    cd build
    export CFLAGS="-O2"
    ../newlib-${pkgver}/configure \
    --target=${TARGET} \
    --prefix=${PREFIX} \
    --enable-interwork \
    --enable-multilib \
    --with-gnu-as \
    --with-gnu-ld \
    --with-float=soft \
    --disable-nls || return 1
    make || return 1
    make -j1 DESTDIR=${pkgdir} install || return 1
    rm -rf ${pkgdir}/usr/share/info
    return 0
    gcc:
    pkgname=arm-unknown-eabi-gcc
    pkgver=4.5.2
    pkgrel=1
    pkgdesc="The GNU Compiler Collection - Cross compiler for ARM target"
    arch=(i686 x86_64)
    license=('GPL' 'LGPL')
    url="http://gcc.gnu.org"
    #an installed libc/newlib is needed for libstdc++ compile
    depends=('arm-unknown-eabi-binutils>=2.18' 'cloog-ppl>=0.15.3' 'arm-unknown-eabi-newlib>=1.18.0')
    # cross-arm-none-eabi-gcc is an superset of cross-arm-none-eabi-gcc-base
    conflicts=('arm-unknown-eabi-gcc-base')
    provides=("arm-unknown-eabi-gcc-base=${pkgver}")
    options=(!libtool !emptydirs !strip zipman docs)
    source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2)
    md5sums=('d6559145853fbaaa0fd7556ed93bce9a')
    build() {
    cd ${srcdir}/gcc-$pkgver
    export CFLAGS="-O2 -pipe"
    export CXXFLAGS="-O2 -pipe"
    rm -rf build
    mkdir build
    cd build
    ../configure \
    --prefix=${PREFIX} \
    --target=${TARGET} \
    --build=${CHOST} \
    --host=${CHOST} \
    --disable-nls \
    --enable-multilib \
    --enable-languages=c,c++ \
    --enable-__cxa_atexit \
    --enable-interwork \
    --with-local-prefix=${PREFIX}/lib/${TARGET} \
    --with-as=${PREFIX}/bin/${TARGET}-as \
    --with-ld=${PREFIX}/bin/${TARGET}-ld \
    --with-newlib \
    --with-float=soft
    make all-gcc all-target-libgcc all-target-libstdc++-v3 || return 1
    make DESTDIR=${pkgdir} install-gcc install-target-libgcc install-target-libstdc++-v3 || return 1
    rm -f $pkgdir/usr/share/man/man7/fsf-funding.7*
    rm -f $pkgdir/usr/share/man/man7/gfdl.7*
    rm -f $pkgdir/usr/share/man/man7/gpl.7*
    rm -rf $pkgdir/usr/share/info
    rm -rf $pkgdir/usr/share/gcc-4.5.2
    cp -r $pkgdir/usr/libexec/* $pkgdir/usr/lib/ && \
    rm -rf $pkgdir/usr/libexec
    I already read linux from scratch howto for building cross compilers, though partly it contradicts with AUR comments especially in regard to --with-sysroot and --with-build-sysroot
    If someone can please shed some light on this, the gcc doc is not very helpfull
    Note: I know that a bare metal arm elf cross compiler exisis in the archlinux repository but that is not sufficient as I need different targets with some special options (where can I get the PKGBUILD from packages within the ABS?)

    Current targets are armv7vfpv3 and armv5te softfloat, this compiler(s) (afaik softfloat and hardfloat can not be put into one compiler, correct me if I am wrong) will be used as basis for kernel compileing for these architectures plus the basic packages (afaik called bootstrapping).
    And I knew it was not really newby stuff, but .. well .. after searching like 5 mins for an appropriate subforum I gave up and posted it just here, sorry
    The point is this is the basis for a lot of core packages and I just want to do it right (and atm it ain't working at all )
    Last edited by drahnr (2011-04-05 22:36:11)

  • Build failed () configure: error: C compiler create executable[SOLVED]

    I am a newbie in the forums, i recently installed arch x86_64 and am having a hard time building packages, i did install base-devel , gcc gcc-fortran gcc-obc..........all that stuff i also installed all the base devel stuff...like fakeroot,flex....(all the base devel stuff) but not luck, when i try 'makepkg -s' it still brings this error ---> " configure: error: C compiler cannot create executables" or sometimes --> configure: error: C++ compiler cannot create executables , i googled a bit on possible solutions, i came acroos similar post but the newbie was not using x86_64, i tried reinstalling GCC but to no avail whats the problem?
    hereis my makepkg.conf details
    # /etc/makepkg.conf
    # SOURCE ACQUISITION
    #-- The download utilities that makepkg should use to acquire sources
    # Format: 'protocol::agent'
    DLAGENTS=('ftp::/usr/bin/wget -c --passive-ftp -t 3 --waitretry=3 -O %o %u'
    'http::/usr/bin/wget -c -t 3 --waitretry=3 -O %o %u'
    'https::/usr/bin/wget -c -t 3 --waitretry=3 --no-check-certificate -O %o %u'
    'rsync::/usr/bin/rsync -z %u %o'
    'scp::/usr/bin/scp -C %u %o')
    # Other common tools:
    # /usr/bin/snarf
    # /usr/bin/lftpget -c
    # /usr/bin/curl
    # ARCHITECTURE, COMPILE FLAGS
    CARCH="x86_64"
    CHOST="x86_64-unknown-linux-gnu"
    #-- Exclusive: will only run on x86_64
    # -march (or -mcpu) builds exclusively for an architecture
    # -mtune optimizes for an architecture, but builds for whole processor family
    CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe"
    CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe"
    LDFLAGS="-Wl,--hash-style=gnu -Wl,--as-needed"
    #-- Make Flags: change this for DistCC/SMP systems
    #MAKEFLAGS="-j2"
    # BUILD ENVIRONMENT
    # Defaults: BUILDENV=(fakeroot !distcc color !ccache)
    # A negated environment option will do the opposite of the comments below.
    #-- fakeroot: Allow building packages as a non-root user
    #-- distcc: Use the Distributed C/C++/ObjC compiler
    #-- color: Colorize output messages
    #-- ccache: Use ccache to cache compilation
    BUILDENV=(fakeroot !distcc color !ccache)
    #-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
    #-- specify a space-delimited list of hosts running in the DistCC cluster.
    #DISTCC_HOSTS=""
    # GLOBAL PACKAGE OPTIONS
    # These are default values for the options=() settings
    # Default: OPTIONS=(strip docs libtool emptydirs zipman purge)
    # A negated option will do the opposite of the comments below.
    #-- strip: Strip symbols from binaries/libraries in STRIP_DIRS
    #-- docs: Save doc directories specified by DOC_DIRS
    #-- libtool: Leave libtool (.la) files in packages
    #-- emptydirs: Leave empty directories in packages
    #-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip
    #-- purge: Remove files specified by PURGE_TARGETS
    OPTIONS=(strip docs libtool emptydirs zipman purge)
    #-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
    INTEGRITY_CHECK=(md5)
    #-- Options to be used when stripping binaries. See `man strip' for details.
    STRIP_BINARIES="--strip-all"
    #-- Options to be used when stripping shared libraries. See `man strip' for details.
    STRIP_SHARED="--strip-unneeded"
    #-- Options to be used when stripping static libraries. See `man strip' for details.
    STRIP_STATIC="--strip-debug"
    #-- Manual (man and info) directories to compress (if zipman is specified)
    MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
    #-- Doc directories to remove (if !docs is specified)
    DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
    #-- Directories to be searched for the strip option (if strip is specified)
    STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin})
    #-- Files to be removed from all packages (if purge is specified)
    PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
    # PACKAGE OUTPUT
    # Default: put built package and cached source in build directory
    #-- Destination: specify a fixed directory where all packages will be placed
    #PKGDEST=/home/packages
    #-- Source cache: specify a fixed directory where source files will be cached
    #SRCDEST=/home/sources
    #-- Source packages: specify a fixed directory where all src packages will be placed
    #SRCPKGDEST=/home/srcpackages
    #-- Packager: name/email of the person or organization building packages
    #PACKAGER="John Doe <[email protected]>"
    # EXTENSION DEFAULTS
    # WARNING: Do NOT modify these variables unless you know what you are
    # doing.
    PKGEXT='.pkg.tar.xz'
    SRCEXT='.src.tar.gz'
    # vim: set ft=sh ts=2 sw=2 et:
    EDIT by bash: use the 'code' tag!
    Last edited by bray085 (2011-01-16 16:29:13)

    yo man sorry about that...as i said am a newbie..but i will be up and running with no time...i have double checked the config, i cant figure anything...i need your arch skills...anywayz here is my config.log details
    $ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-xcb --disable-static
    ## Platform. ##
    hostname = Muruthi
    uname -m = x86_64
    uname -r = 2.6.33-ARCH
    uname -s = Linux
    uname -v = #1 SMP PREEMPT Thu May 13 11:32:37 CEST 2010
    /usr/bin/uname -p = unknown
    /bin/uname -X = unknown
    /bin/arch = x86_64
    /usr/bin/arch -k = unknown
    /usr/convex/getsysinfo = unknown
    /usr/bin/hostinfo = unknown
    /bin/machine = unknown
    /usr/bin/oslevel = unknown
    /bin/universe = unknown
    PATH: /usr/local/bin
    PATH: /usr/bin
    PATH: /bin
    PATH: /usr/local/sbin
    PATH: /usr/sbin
    PATH: /sbin
    PATH: /usr/bin/vendor_perl
    PATH: /usr/bin/core_perl
    ## Core tests. ##
    configure:3338: checking for gcc
    configure:3354: found /usr/bin/gcc
    configure:3365: result: gcc
    configure:3594: checking for C compiler version
    configure:3603: gcc --version >&5
    gcc (GCC) 4.5.2
    Copyright (C) 2010 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:3614: $? = 0
    configure:3603: gcc -v >&5
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/lto-wrapper
    Target: x86_64-unknown-linux-gnu
    Configured with: /build/src/gcc-4.5.2/configure --prefix=/usr --enable-languages=c,c++,fortran,objc,obj-c++,ada --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-gnu-unique-object --enable-lto --enable-plugin --enable-gold --with-plugin-ld=ld.gold --disable-multilib --disable-libstdcxx-pch --with-system-zlib --with-ppl --with-cloog --with-cloog-include=/usr/include/cloog-ppl --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
    Thread model: posix
    gcc version 4.5.2 (GCC)
    configure:3614: $? = 0
    configure:3603: gcc -V >&5
    gcc: '-V' option must have argument
    configure:3614: $? = 1
    configure:3603: gcc -qversion >&5
    gcc: unrecognized option '-qversion'
    gcc: no input files
    configure:3614: $? = 1
    configure:3634: checking whether the C compiler works
    configure:3656: gcc -march=x86-64 -mtune=generic -O2 -pipe -Wl,--hash-style=gnu -Wl,--as-needed conftest.c >&5
    /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory
    configure:3660: $? = 1
    configure:3698: result: no
    configure: failed program was:
    | /* confdefs.h */
    | #define PACKAGE_NAME "cairo"
    | #define PACKAGE_TARNAME "cairo"
    | #define PACKAGE_VERSION "1.10.2"
    | #define PACKAGE_STRING "cairo 1.10.2"
    | #define PACKAGE_BUGREPORT "http://bugs.freedesktop.org/enter_bug.cgi?product=cairo"
    | #define PACKAGE_URL ""
    | /* end confdefs.h. */
    |
    | int
    | main ()
    | {
    |
    | ;
    | return 0;
    | }
    configure:3703: error: in `/home/irong33k/Desktop/src/cairo-1.10.2':
    configure:3705: error: C compiler cannot create executables
    See `config.log' for more details
    ## Cache variables. ##
    ac_cv_env_CCC_set=
    ac_cv_env_CCC_value=
    ac_cv_env_CC_set=
    ac_cv_env_CC_value=
    ac_cv_env_CFLAGS_set=set
    ac_cv_env_CFLAGS_value='-march=x86-64 -mtune=generic -O2 -pipe'
    ac_cv_env_CPPFLAGS_set=
    ac_cv_env_CPPFLAGS_value=
    ac_cv_env_CPP_set=
    ac_cv_env_CPP_value=
    ac_cv_env_CXXCPP_set=
    ac_cv_env_CXXCPP_value=
    ac_cv_env_CXXFLAGS_set=set
    ac_cv_env_CXXFLAGS_value='-march=x86-64 -mtune=generic -O2 -pipe'
    ac_cv_env_CXX_set=
    ac_cv_env_CXX_value=
    ac_cv_env_FONTCONFIG_CFLAGS_set=
    ac_cv_env_FONTCONFIG_CFLAGS_value=
    ac_cv_env_FONTCONFIG_LIBS_set=
    ac_cv_env_FONTCONFIG_LIBS_value=
    ac_cv_env_FREETYPE_CFLAGS_set=
    ac_cv_env_FREETYPE_CFLAGS_value=
    ac_cv_env_FREETYPE_LIBS_set=
    ac_cv_env_FREETYPE_LIBS_value=
    ac_cv_env_GOBJECT_CFLAGS_set=
    ac_cv_env_GOBJECT_CFLAGS_value=
    ac_cv_env_GOBJECT_LIBS_set=
    ac_cv_env_GOBJECT_LIBS_value=
    ac_cv_env_LDFLAGS_set=set
    ac_cv_env_LDFLAGS_value='-Wl,--hash-style=gnu -Wl,--as-needed'
    ac_cv_env_LIBRSVG_CFLAGS_set=
    ac_cv_env_LIBRSVG_CFLAGS_value=
    ac_cv_env_LIBRSVG_LIBS_set=
    ac_cv_env_LIBRSVG_LIBS_value=
    ac_cv_env_LIBSPECTRE_CFLAGS_set=
    ac_cv_env_LIBSPECTRE_CFLAGS_value=
    ac_cv_env_LIBSPECTRE_LIBS_set=
    ac_cv_env_LIBSPECTRE_LIBS_value=
    ac_cv_env_LIBS_set=
    ac_cv_env_LIBS_value=
    ac_cv_env_PKG_CONFIG_set=
    ac_cv_env_PKG_CONFIG_value=
    ac_cv_env_POPPLER_CFLAGS_set=
    ac_cv_env_POPPLER_CFLAGS_value=
    ac_cv_env_POPPLER_LIBS_set=
    ac_cv_env_POPPLER_LIBS_value=
    ac_cv_env_VALGRIND_CFLAGS_set=
    ac_cv_env_VALGRIND_CFLAGS_value=
    ac_cv_env_VALGRIND_LIBS_set=
    ac_cv_env_VALGRIND_LIBS_value=
    ac_cv_env_XMKMF_set=
    ac_cv_env_XMKMF_value=
    ac_cv_env_build_alias_set=
    ac_cv_env_build_alias_value=
    ac_cv_env_directfb_CFLAGS_set=
    ac_cv_env_directfb_CFLAGS_value=
    ac_cv_env_directfb_LIBS_set=
    ac_cv_env_directfb_LIBS_value=
    ac_cv_env_drm_CFLAGS_set=
    ac_cv_env_drm_CFLAGS_value=
    ac_cv_env_drm_LIBS_set=
    ac_cv_env_drm_LIBS_value=
    ac_cv_env_drm_xr_CFLAGS_set=
    ac_cv_env_drm_xr_CFLAGS_value=
    ac_cv_env_drm_xr_LIBS_set=
    ac_cv_env_drm_xr_LIBS_value=
    ac_cv_env_egl_CFLAGS_set=
    ac_cv_env_egl_CFLAGS_value=
    ac_cv_env_egl_LIBS_set=
    ac_cv_env_egl_LIBS_value=
    ac_cv_env_gl_CFLAGS_set=
    ac_cv_env_gl_CFLAGS_value=
    ac_cv_env_gl_LIBS_set=
    ac_cv_env_gl_LIBS_value=
    ac_cv_env_glib_CFLAGS_set=
    ac_cv_env_glib_CFLAGS_value=
    ac_cv_env_glib_LIBS_set=
    ac_cv_env_glib_LIBS_value=
    ac_cv_env_gtk_CFLAGS_set=
    ac_cv_env_gtk_CFLAGS_value=
    ac_cv_env_gtk_LIBS_set=
    ac_cv_env_gtk_LIBS_value=
    ac_cv_env_host_alias_set=
    ac_cv_env_host_alias_value=
    ac_cv_env_pixman_CFLAGS_set=
    ac_cv_env_pixman_CFLAGS_value=
    ac_cv_env_pixman_LIBS_set=
    ac_cv_env_pixman_LIBS_value=
    ac_cv_env_png_CFLAGS_set=
    ac_cv_env_png_CFLAGS_value=
    ac_cv_env_png_LIBS_set=
    ac_cv_env_png_LIBS_value=
    ac_cv_env_png_REQUIRES_set=
    ac_cv_env_png_REQUIRES_value=
    ac_cv_env_qt_CFLAGS_set=
    ac_cv_env_qt_CFLAGS_value=
    ac_cv_env_qt_LIBS_set=
    ac_cv_env_qt_LIBS_value=
    ac_cv_env_target_alias_set=
    ac_cv_env_target_alias_value=
    ac_cv_env_xcb_CFLAGS_set=
    ac_cv_env_xcb_CFLAGS_value=
    ac_cv_env_xcb_LIBS_set=
    ac_cv_env_xcb_LIBS_value=
    ac_cv_env_xcb_drm_CFLAGS_set=
    ac_cv_env_xcb_drm_CFLAGS_value=
    ac_cv_env_xcb_drm_LIBS_set=
    ac_cv_env_xcb_drm_LIBS_value=
    ac_cv_env_xcb_shm_CFLAGS_set=
    ac_cv_env_xcb_shm_CFLAGS_value=
    ac_cv_env_xcb_shm_LIBS_set=
    ac_cv_env_xcb_shm_LIBS_value=
    ac_cv_env_xlib_CFLAGS_set=
    ac_cv_env_xlib_CFLAGS_value=
    ac_cv_env_xlib_LIBS_set=
    ac_cv_env_xlib_LIBS_value=
    ac_cv_env_xlib_xcb_CFLAGS_set=
    ac_cv_env_xlib_xcb_CFLAGS_value=
    ac_cv_env_xlib_xcb_LIBS_set=
    ac_cv_env_xlib_xcb_LIBS_value=
    ac_cv_env_xlib_xrender_CFLAGS_set=
    ac_cv_env_xlib_xrender_CFLAGS_value=
    ac_cv_env_xlib_xrender_LIBS_set=
    ac_cv_env_xlib_xrender_LIBS_value=
    ac_cv_prog_ac_ct_CC=gcc
    ## Output variables. ##
    ACLOCAL=''
    AMDEPBACKSLASH=''
    AMDEP_FALSE=''
    AMDEP_TRUE=''
    AMTAR=''
    AM_BACKSLASH=''
    AM_DEFAULT_VERBOSITY=''
    AR=''
    AS=''
    AUTOCONF=''
    AUTOHEADER=''
    AUTOMAKE=''
    AWK=''
    BFD_LIBS=''
    BUILD_ANY2PPM_FALSE=''
    BUILD_ANY2PPM_TRUE=''
    BUILD_CXX_FALSE=''
    BUILD_CXX_TRUE=''
    BUILD_DRM_XR_FALSE=''
    BUILD_DRM_XR_TRUE=''
    BUILD_PRIVATE_GLEW_FALSE=''
    BUILD_PRIVATE_GLEW_TRUE=''
    BUILD_SPHINX_FALSE=''
    BUILD_SPHINX_TRUE=''
    BUILD_XCB_SHM_FALSE=''
    BUILD_XCB_SHM_TRUE=''
    BUILD_XLIB_XCB_FALSE=''
    BUILD_XLIB_XCB_TRUE=''
    CAIROBOILERPLATE_LIBS=''
    CAIROPERF_LIBS=''
    CAIRO_CAN_TEST_PDF_SURFACE_FALSE=''
    CAIRO_CAN_TEST_PDF_SURFACE_TRUE=''
    CAIRO_CAN_TEST_PS_SURFACE_FALSE=''
    CAIRO_CAN_TEST_PS_SURFACE_TRUE=''
    CAIRO_CAN_TEST_SVG_SURFACE_FALSE=''
    CAIRO_CAN_TEST_SVG_SURFACE_TRUE=''
    CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE=''
    CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE=''
    CAIRO_CFLAGS=''
    CAIRO_HAS_BEOS_SURFACE_FALSE=''
    CAIRO_HAS_BEOS_SURFACE_TRUE=''
    CAIRO_HAS_DIRECTFB_SURFACE_FALSE=''
    CAIRO_HAS_DIRECTFB_SURFACE_TRUE=''
    CAIRO_HAS_DL_FALSE=''
    CAIRO_HAS_DL_TRUE=''
    CAIRO_HAS_DRM_SURFACE_FALSE=''
    CAIRO_HAS_DRM_SURFACE_TRUE=''
    CAIRO_HAS_DRM_XR_FUNCTIONS_FALSE=''
    CAIRO_HAS_DRM_XR_FUNCTIONS_TRUE=''
    CAIRO_HAS_EGL_FUNCTIONS_FALSE=''
    CAIRO_HAS_EGL_FUNCTIONS_TRUE=''
    CAIRO_HAS_FC_FONT_FALSE=''
    CAIRO_HAS_FC_FONT_TRUE=''
    CAIRO_HAS_FT_FONT_FALSE=''
    CAIRO_HAS_FT_FONT_TRUE=''
    CAIRO_HAS_GALLIUM_SURFACE_FALSE=''
    CAIRO_HAS_GALLIUM_SURFACE_TRUE=''
    CAIRO_HAS_GLX_FUNCTIONS_FALSE=''
    CAIRO_HAS_GLX_FUNCTIONS_TRUE=''
    CAIRO_HAS_GL_SURFACE_FALSE=''
    CAIRO_HAS_GL_SURFACE_TRUE=''
    CAIRO_HAS_GOBJECT_FUNCTIONS_FALSE=''
    CAIRO_HAS_GOBJECT_FUNCTIONS_TRUE=''
    CAIRO_HAS_INTERPRETER_FALSE=''
    CAIRO_HAS_INTERPRETER_TRUE=''
    CAIRO_HAS_LCOV_FALSE=''
    CAIRO_HAS_LCOV_TRUE=''
    CAIRO_HAS_MULTI_PAGE_SURFACES_FALSE=''
    CAIRO_HAS_MULTI_PAGE_SURFACES_TRUE=''
    CAIRO_HAS_OS2_SURFACE_FALSE=''
    CAIRO_HAS_OS2_SURFACE_TRUE=''
    CAIRO_HAS_PDF_SURFACE_FALSE=''
    CAIRO_HAS_PDF_SURFACE_TRUE=''
    CAIRO_HAS_PNG_FUNCTIONS_FALSE=''
    CAIRO_HAS_PNG_FUNCTIONS_TRUE=''
    CAIRO_HAS_PS_SURFACE_FALSE=''
    CAIRO_HAS_PS_SURFACE_TRUE=''
    CAIRO_HAS_PTHREAD_FALSE=''
    CAIRO_HAS_PTHREAD_TRUE=''
    CAIRO_HAS_QT_SURFACE_FALSE=''
    CAIRO_HAS_QT_SURFACE_TRUE=''
    CAIRO_HAS_QUARTZ_FONT_FALSE=''
    CAIRO_HAS_QUARTZ_FONT_TRUE=''
    CAIRO_HAS_QUARTZ_IMAGE_SURFACE_FALSE=''
    CAIRO_HAS_QUARTZ_IMAGE_SURFACE_TRUE=''
    CAIRO_HAS_QUARTZ_SURFACE_FALSE=''
    CAIRO_HAS_QUARTZ_SURFACE_TRUE=''
    CAIRO_HAS_SCRIPT_SURFACE_FALSE=''
    CAIRO_HAS_SCRIPT_SURFACE_TRUE=''
    CAIRO_HAS_SKIA_SURFACE_FALSE=''
    CAIRO_HAS_SKIA_SURFACE_TRUE=''
    CAIRO_HAS_SPECTRE_FALSE=''
    CAIRO_HAS_SPECTRE_TRUE=''
    CAIRO_HAS_SVG_SURFACE_FALSE=''
    CAIRO_HAS_SVG_SURFACE_TRUE=''
    CAIRO_HAS_SYMBOL_LOOKUP_FALSE=''
    CAIRO_HAS_SYMBOL_LOOKUP_TRUE=''
    CAIRO_HAS_TEE_SURFACE_FALSE=''
    CAIRO_HAS_TEE_SURFACE_TRUE=''
    CAIRO_HAS_TEST_SURFACES_FALSE=''
    CAIRO_HAS_TEST_SURFACES_TRUE=''
    CAIRO_HAS_TRACE_FALSE=''
    CAIRO_HAS_TRACE_TRUE=''
    CAIRO_HAS_VG_SURFACE_FALSE=''
    CAIRO_HAS_VG_SURFACE_TRUE=''
    CAIRO_HAS_WGL_FUNCTIONS_FALSE=''
    CAIRO_HAS_WGL_FUNCTIONS_TRUE=''
    CAIRO_HAS_WIN32_FONT_FALSE=''
    CAIRO_HAS_WIN32_FONT_TRUE=''
    CAIRO_HAS_WIN32_SURFACE_FALSE=''
    CAIRO_HAS_WIN32_SURFACE_TRUE=''
    CAIRO_HAS_XCB_DRM_FUNCTIONS_FALSE=''
    CAIRO_HAS_XCB_DRM_FUNCTIONS_TRUE=''
    CAIRO_HAS_XCB_SHM_FUNCTIONS_FALSE=''
    CAIRO_HAS_XCB_SHM_FUNCTIONS_TRUE=''
    CAIRO_HAS_XCB_SURFACE_FALSE=''
    CAIRO_HAS_XCB_SURFACE_TRUE=''
    CAIRO_HAS_XLIB_SURFACE_FALSE=''
    CAIRO_HAS_XLIB_SURFACE_TRUE=''
    CAIRO_HAS_XLIB_XCB_FUNCTIONS_FALSE=''
    CAIRO_HAS_XLIB_XCB_FUNCTIONS_TRUE=''
    CAIRO_HAS_XLIB_XRENDER_SURFACE_FALSE=''
    CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE=''
    CAIRO_HAS_XML_SURFACE_FALSE=''
    CAIRO_HAS_XML_SURFACE_TRUE=''
    CAIRO_LDFLAGS=''
    CAIRO_LIBS=''
    CAIRO_LIBTOOL_VERSION_INFO=''
    CAIRO_NONPKGCONFIG_CFLAGS=''
    CAIRO_NONPKGCONFIG_LIBS=''
    CAIRO_RELEASE_STATUS=''
    CAIRO_REQUIRES=''
    CAIRO_TEST_MODE=''
    CAIRO_TEST_UNDEFINED_LDFLAGS=''
    CAIRO_VERSION_MAJOR=''
    CAIRO_VERSION_MICRO=''
    CAIRO_VERSION_MINOR=''
    CAIRO_VERSION_SONUM=''
    CC='gcc'
    CCDEPMODE=''
    CFLAGS='-march=x86-64 -mtune=generic -O2 -pipe'
    CPP=''
    CPPFLAGS=''
    CROSS_COMPILING_FALSE=''
    CROSS_COMPILING_TRUE=''
    CXX=''
    CXXCPP=''
    CXXDEPMODE=''
    CXXFLAGS='-march=x86-64 -mtune=generic -O2 -pipe'
    CYGPATH_W=''
    DEFS=''
    DEPDIR=''
    DISABLE_SOME_FLOATING_POINT_FALSE=''
    DISABLE_SOME_FLOATING_POINT_TRUE=''
    DLLTOOL=''
    DSYMUTIL=''
    DUMPBIN=''
    ECHO_C=''
    ECHO_N='-n'
    ECHO_T=''
    EGREP=''
    ENABLE_GTK_DOC_FALSE=''
    ENABLE_GTK_DOC_TRUE=''
    EXEEXT=''
    FGREP=''
    FIND=''
    FONTCONFIG_CFLAGS=''
    FONTCONFIG_LIBS=''
    FREETYPE_CFLAGS=''
    FREETYPE_CONFIG=''
    FREETYPE_LIBS=''
    GOBJECT_CFLAGS=''
    GOBJECT_LIBS=''
    GREP=''
    GS=''
    GTKDOC_CHECK=''
    GTK_DOC_USE_LIBTOOL_FALSE=''
    GTK_DOC_USE_LIBTOOL_TRUE=''
    HAVE_GTK_FALSE=''
    HAVE_GTK_TRUE=''
    HAVE_PTHREAD_FALSE=''
    HAVE_PTHREAD_TRUE=''
    HAVE_REAL_PTHREAD_FALSE=''
    HAVE_REAL_PTHREAD_TRUE=''
    HAVE_SHM_FALSE=''
    HAVE_SHM_TRUE=''
    HTML_DIR=''
    INSTALL_DATA=''
    INSTALL_PROGRAM=''
    INSTALL_SCRIPT=''
    INSTALL_STRIP_PROGRAM=''
    LD=''
    LDFLAGS='-Wl,--hash-style=gnu -Wl,--as-needed'
    LIBM=''
    LIBOBJS=''
    LIBRSVG_CFLAGS=''
    LIBRSVG_LIBS=''
    LIBS=''
    LIBSPECTRE_CFLAGS=''
    LIBSPECTRE_LIBS=''
    LIBTOOL=''
    LIPO=''
    LN_S=''
    LTLIBOBJS=''
    LTP=''
    LTP_GENHTML=''
    MAKEINFO=''
    MKDIR_P=''
    NM=''
    NMEDIT=''
    OBJDUMP=''
    OBJEXT=''
    OS_WIN32_FALSE=''
    OS_WIN32_TRUE=''
    OTOOL64=''
    OTOOL=''
    PACKAGE=''
    PACKAGE_BUGREPORT='http://bugs.freedesktop.org/enter_bug.cgi?product=cairo'
    PACKAGE_NAME='cairo'
    PACKAGE_STRING='cairo 1.10.2'
    PACKAGE_TARNAME='cairo'
    PACKAGE_URL=''
    PACKAGE_VERSION='1.10.2'
    PATH_SEPARATOR=':'
    PKGCONFIG_REQUIRES=''
    PKG_CONFIG=''
    POPPLER_CFLAGS=''
    POPPLER_LIBS=''
    RANLIB=''
    SED=''
    SET_MAKE=''
    SHELL='/bin/sh'
    SHLIB_EXT=''
    SHM_LIBS=''
    SHTOOL=''
    STRIP=''
    VALGRIND_CFLAGS=''
    VALGRIND_LIBS=''
    VERSION=''
    XARGS=''
    XMKMF=''
    X_CFLAGS=''
    X_EXTRA_LIBS=''
    X_LIBS=''
    X_PRE_LIBS=''
    ac_ct_CC='gcc'
    ac_ct_CXX=''
    ac_ct_DUMPBIN=''
    am__EXEEXT_FALSE=''
    am__EXEEXT_TRUE=''
    am__fastdepCC_FALSE=''
    am__fastdepCC_TRUE=''
    am__fastdepCXX_FALSE=''
    am__fastdepCXX_TRUE=''
    am__include=''
    am__isrc=''
    am__leading_dot=''
    am__quote=''
    am__tar=''
    am__untar=''
    bindir='${exec_prefix}/bin'
    build=''
    build_alias=''
    build_cpu=''
    build_os=''
    build_vendor=''
    datadir='${datarootdir}'
    datarootdir='${prefix}/share'
    directfb_CFLAGS=''
    directfb_LIBS=''
    docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
    drm_CFLAGS=''
    drm_LIBS=''
    drm_xr_CFLAGS=''
    drm_xr_LIBS=''
    dvidir='${docdir}'
    egl_CFLAGS=''
    egl_LIBS=''
    exec_prefix='NONE'
    gallium_DIR=''
    gl_CFLAGS=''
    gl_LIBS=''
    glib_CFLAGS=''
    glib_LIBS=''
    gtk_CFLAGS=''
    gtk_LIBS=''
    host=''
    host_alias=''
    host_cpu=''
    host_os=''
    host_vendor=''
    htmldir='${docdir}'
    includedir='${prefix}/include'
    infodir='${datarootdir}/info'
    install_sh=''
    libdir='${exec_prefix}/lib'
    libexecdir='${exec_prefix}/libexec'
    localedir='${datarootdir}/locale'
    localstatedir='/var'
    lt_ECHO='echo'
    mandir='${datarootdir}/man'
    mesa_DIR=''
    mkdir_p=''
    oldincludedir='/usr/include'
    pdfdir='${docdir}'
    pixman_CFLAGS=''
    pixman_LIBS=''
    png_CFLAGS=''
    png_LIBS=''
    png_REQUIRES=''
    prefix='/usr'
    program_transform_name='s,x,x,'
    psdir='${docdir}'
    pthread_CFLAGS=''
    pthread_LIBS=''
    qt_CFLAGS=''
    qt_LIBS=''
    real_pthread_CFLAGS=''
    real_pthread_LIBS=''
    sbindir='${exec_prefix}/sbin'
    sharedstatedir='${prefix}/com'
    shm_LIBS=''
    skia_DIR=''
    sysconfdir='/etc'
    target_alias=''
    xcb_CFLAGS=''
    xcb_LIBS=''
    xcb_drm_CFLAGS=''
    xcb_drm_LIBS=''
    xcb_shm_CFLAGS=''
    xcb_shm_LIBS=''
    xlib_CFLAGS=''
    xlib_LIBS=''
    xlib_xcb_CFLAGS=''
    xlib_xcb_LIBS=''
    xlib_xrender_CFLAGS=''
    xlib_xrender_LIBS=''
    ## confdefs.h. ##
    /* confdefs.h */
    #define PACKAGE_NAME "cairo"
    #define PACKAGE_TARNAME "cairo"
    #define PACKAGE_VERSION "1.10.2"
    #define PACKAGE_STRING "cairo 1.10.2"
    #define PACKAGE_BUGREPORT "http://bugs.freedesktop.org/enter_bug.cgi?product=cairo"
    #define PACKAGE_URL ""
    configure: exit 77

  • Good instructions for making a GCC cross compiler?

    Hi
    I think this might be the best place to ask this since people probably have been making cross compilers. I am interested in trying to make a cross compiler of GCC targetting Plan9/i386. There is an old 3.0 version of GCC (http://cm.bell-labs.com/sources/extra/gcc/) ported to Plan9.
    The thing that confuses me a bit about cross compilers is the use of binutils for the target architecture. How does that actually work? The host OS/architecture would not be able to execute those binaries. It feels a bit like a chicken-and-egg issure and I am not really sure how to get started. I have been trying to read up a bit on the PKGBUILDs for cross-arm but the whole theoretical issue of how to actually get the thing working in the first place is still a bit unclear to me.
    Some good instructions/links/help would be appreciated
    I could post my temporary PKGBUILD here if people want to help out with the actual build...

    A small update to my attempts:
    This is my binutils package, it has failed at multiple levels during my attempts. The binutils ported to Plan9 are relatively old so some stuff needs to be patched up to build. Now it fails on not being able to recognize arlex.o . This seems a bit odd I think.
    # Adapted from cross-arm-elf, cross-i686-pc-gnu and cross-i686-pc-mingw32
    pkgname=cross-i386-plan9-binutils
    pkgver=2.11.2
    pkgrel=1
    pkgdesc="The GNU Compiler Collection - Cross compiler for Plan9 i386 target"
    arch=('i686' 'x86_64')
    license=('GPL')
    url="http://plan9.bell-labs.com/wiki/plan9/porting_alien_software_to_plan_9/index.html"
    depends=('glibc' 'zlib')
    options=('!libtool' '!distcc' '!ccache')
    source=('http://plan9.bell-labs.com/sources/extra/gcc/gnusrc.tgz' \
    'bucommh.patch')
    md5sums=('39d23b7223b68de4cf333205257112ce' \
    '2945c4e40dbcd966217ed1349195e312')
    _target=i386-lucent-plan9
    _sysroot=/usr/lib/cross-${_target}
    build() {
    rm -rf ${srcdir}/build
    mkdir ${srcdir}/build #starting fresh
    msg "building and packaging binutils"
    cp -ar ${srcdir}/binutils-2.11.2/* ${srcdir}/build/
    cd ${srcdir}/build
    msg "cheating broken references to Plan9-ported GNU binutils"
    ln -s /usr/bin/ar "${_target}-ar"
    ln -s /usr/bin/as "${_target}-as"
    ln -s /usr/bin/ld "${_target}-ld"
    ln -s /usr/bin/ranlib "${_target}-ranlib"
    PATH=${srcdir}/build:$PATH
    CFLAGS='-O2 -static'
    msg "patching up stuff"
    cd ${srcdir}/build/binutils
    patch bucomm.h -i $srcdir/bucommh.patch
    msg "going back to build directory and start configure"
    cd ${srcdir}/build
    ./configure --prefix=${_sysroot} --bindir=/usr/bin \
    --with-sysroot=${_sysroot} \
    --build=$CHOST --host=$CHOST --target=${_target} \
    --with-gcc --with-gnu-as --with-gnu-ld \
    --enable-shared --without-included-gettext \
    --disable-nls --disable-debug
    msg "fixing some corrupt libraries"
    cp /usr/lib/libiberty.a ${srcdir}/build/libiberty/
    msg "finally making the actual binutils"
    cd ${srcdir}/build
    make
    make DESTDIR=$pkgdir/ install
    # clean-up cross compiler root
    rm -r ${pkgdir}/${_sysroot}/share/{info,man}
    # needed for gcc build
    install -dm755 ${pkgdir}/${_sysroot}/include
    this is the bucommh.patch:
    81c81
    < extern char *sbrk ();
    > extern void *sbrk ();
    Last edited by W.F.Cody (2011-09-13 18:57:17)

  • Cross Compiling with distcc

    I have a 64-bit server and a 32-bit desktop.  I would like to run a distcc server on the 64-bit machine to cross-compile 32-bit software so my 32-bit machine can step up its guns.  I noticed that there are cross32-binutils and cross32-gcc packages in the AUR, so I assume that I can use them with distcc, but can I and how?  I want to avoid running a 32-bit chroot as much as possible (I think it's silly).

    Okay, I got it up and running ... I have two problems though, one I posted here (not trying to double-post).
    I am having the same issue.  I want to start distccd, but when I run schroot /etc/rc.d/distccd start, it says [DONE] as usual, but the daemon doesn't come up in ps -A.  if I manually chroot into /opt/arch32, I can issue the same command and it'll stay running.  I'm assuming that schroot sandboxes the environment, and when the command releases the terminal, it kills all the processes associated to it.
    How can I keep daemons running when they are started by schroot?
    My other issue is that dictccd only uses one core.  I have a hyperthreaded dual-core system on my server that constitutes as four cores, and when I'm in the 32-bit chroot, htop does in fact see four cores and appears to be using them.  The client machine is set to -j7 also, so it should be utilizing the 2+4(+1) cpus, but it isn't and I'm not sure why.

  • Cross compiling : CARCH flag

    Hi all ! I just have a question about cross compiling. No real problem in fact
    So, on the "Safe Cflags" wiki page (and on other Web pages, too), one can see lots of optimizations for various processors. But for each one, only CHOST and CFLAGS change. I don't understand what CARCH is used for, then...
    "Specifies your computer architecture; possible values include "i686" or "x86_64". This should be automatically set on installation."
    I think that if it never changes, this CARCH value only concern the computer which is compiling.
    So, if I compile something, say, for an Athlon 64 from an Intel chip, my flags would be :
    CARCH="i686"
    CHOST="x86_64-pc-linux-gnu"
    CFLAGS="-march=k8 -O2 -pipe"
    CXXFLAGS="${CFLAGS}"
    And if I compile frequently for other architectures, I would have a couple of CHOST/CFLAGS for each foreign architecture, and only one CARCH, corresponding to my computer.
    Am I right ?

    You should check out the Android NDK documentation.  The NDK comes with a cross compiler specifically for android, with the correct versions of libraries, etc.  It comes with some examples showing how to build stuff for it.
    EDIT: There is also an AUR package for it.
    Last edited by tom5760 (2011-04-04 15:56:25)

  • Fortran code for iOS using GCC cross-compiler

    Hello everyone!
    I have some Fortran application, and i want to compile it for iOS. I'm new in iOS development and  as i understand correctly i need to configure GCC (from gcc.gnu.org) with --target=arm-apple-darwin and --enable-languages=c,c++, fortran.
    With --target=arm-elf, --target=arm-apple-darwin i got error, that it's not supported.
    With --target=arm-none-eabi i got cannot compute suffix of object files: cannot compile Maybe is that because i'm setting wrong configure parameters.
    My question is : what is correct ./confgiure parameters to create gcc cross compiler for iOS platform, which supports FORTRAN.
    Is this the only (right?) way to build cross-compiler for iOS platform, or i could use existing LLVM-GCC? Thanks!

    jasonwryan, thanks for the reply,
    I've read the ARM Dev Guide as suggested but I don't believe this will do what I'm aiming to achieve. It seems the ARM Dev Guide will install the arm-linux-gnueabi, which allows cross-compiling applications to run on LINUX built for ARM. I need something like arm-none-eabi (or arm-none-gnueabi - the whole naming scheme is a mess at the moment) which is an ARM compiler for "bare metal" ARM devices. I am aiming to program a simple ARM Cortex M4 microcontroller as opposed to an ARM microprocessor running Linux. Hence arm-linux-gnueabi is quite overkill from my understanding and it might even not work.
    So, if someone could either confirm that what the ARM Dev Guide suggests is indeed what I need to program a bare metal ARM microcontroller, or recommend an alternative path, it would be very appreciated.
    Thanks,
    -Igor

Maybe you are looking for