question about cross compiling 3.9p1 for uClibc

From: Chris Verges (squirrel_at_headnut.org)
Date: 09/16/04

  • Next message: konsar: "Re: scp to pipe"
    Date: Thu, 16 Sep 2004 10:54:11 -0700
    To: secureshell@securityfocus.com
    
    

    I'm trying to compile OpenSSH 3.9p1 using an i386-linux-uclibc cross
    compiler. Whenever I try to run the autoconf script, though, I get this
    error message:

        $ cd /home/squirrel/projects/set_top_pbx/workspace/build/openssh-3.9p1
        $ CC=~/cross_cc/i386-linux-uclibc/bin/i386-linux-uclibc-gcc \
          ./configure \
              --host=i386-linux \
              --prefix=/usr \
              --sysconfdir=/etc/ssh \
              --disable-largefile
        configure: WARNING: If you wanted to set the --build type, don't use
        --host.
            If a cross compiler is detected then cross compile mode will be
        used.
        checking for i386-linux-gcc...
           ~/cross_cc/i386-linux-uclibc/bin/i386-linux-uclibc-gcc
        checking for C compiler default output file name... a.out
        checking whether the C compiler works... yes
        checking whether we are cross compiling... yes
        ... <truncated> ...
        checking compiler and flags for sanity... configure: error: cannot
        run test program while cross compiling
        See `config.log' for more details.

    Needless to say, the config.log didn't really shed much light on the
    issue. After examining the autoconf script, I believe the following
    section is the culprit:

        echo "$as_me:$LINENO: checking compiler and flags for sanity" >&5
        echo $ECHO_N "checking compiler and flags for sanity... $ECHO_C" >&6
        if test "$cross_compiling" = yes; then
          { { echo "$as_me:$LINENO: error: cannot run test program while
        cross compiling
        See \`config.log' for more details." >&5
        echo "$as_me: error: cannot run test program while cross compiling
        See \`config.log' for more details." >&2;}
           { (exit 1); exit 1; }; }
        else
          ... <truncated> ...
        fi

    The way I read this, we should get this error for any and all cross
    compiling of OpenSSH. Yet, obviously, some people *do* cross compile
    it. What am I missing?

    Thanks for the help!

    chris


  • Next message: konsar: "Re: scp to pipe"

    Relevant Pages

    • Re: cannot run test program while cross compiling.
      ... Your best shot is to look in configure.ac and see if ... complain to the package maintainers that their ... package doesn't support cross compiling. ...
      (comp.arch.embedded)
    • Re: Configure error - openSSL. Mac OS X
      ... The first thing is that configure has decided that we are cross ... compiling which is because the simple executable did not run. ... gcc can't find contest.c, and neither can I! ... BordoDNS:bind-9.9.5 me$ gcc -o conftest conftest.c ...
      (comp.protocols.dns.bind)
    • Re: Porting Minix to the ARM architecture
      ... The Minix3 library can be compiled with both ACK and gcc. ... Part of the issue is the assembler parts of MINIX, ... ACK is quite good a cross compiling. ...
      (comp.os.minix)
    • Re: How to cross compile TCL8.4 and TK8.4 for arm-linux
      ... Now I have cross cross TCL8.4 successful.But Cross Compile TK8.4 ... When compiling TCL8.4, Success ... make install ...
      (comp.lang.tcl)
    • Re: Get Error
      ... It is unfortunate that the error message is not very ... Modell that the Option "Evaluate parameter to reduce ... COMPILING Simulink_Test.c ...
      (comp.soft-sys.matlab)