Drobo

Cross-compiling for DroboFS: GNU Screen

#1

Introduction: Why Screen?

GNU Screen allows the user to detach and reattach to terminal sessions. This allows the user to have multiple process instances in a single SSH connection. It also allows the user to return to sessions they have disconnected from.

Overall compiling complexity: Medium Easy.

Step 1: Background info

To be able to make use of this post, you need a VM configured as indicated in this post.

Step 2: Enter the cross-compiling environment

See step 2 of this post to see instructions on how to enter the chroot environment.

Step 3: Dependencies

from ubuntu packages:
*ncurses [how to cross-compile]

Step 4: Get the source code

Screen’s website: http://ftp.gnu.org/gnu/screen/
Version: 4.0.3
Direct link: http://ftp.gnu.org/gnu/screen/screen-4.0.3.tar.gz

Make sure that you are in the folder /root/code, then type:

wget http://ftp.gnu.org/gnu/screen/screen-4.0.3.tar.gz tar zxf screen-4.0.3.tar.gz cd screen-4.0.3

Step 5: Configuration
Here is a diff of changes needed to be made to configure.
Everywhere it exits for cross compiling is removed.
Copy this into a ‘configure.patch’ file.

*** configure	Fri Dec  5 13:46:53 2003
--- configure.new	Thu Jan 20 09:57:21 2011
***************
*** 2704,2710 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 2704,2710 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 2753,2759 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 2753,2759 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 2800,2806 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 2800,2806 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 4149,4155 ****
  
  { { echo "$as_me:$LINENO: error: !!! no select - no screen" >&5
  echo "$as_me: error: !!! no select - no screen" >&2;}
!    { (exit 1); exit 1; }; }
  fi
  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  
--- 4149,4155 ----
  
  { { echo "$as_me:$LINENO: error: !!! no select - no screen" >&5
  echo "$as_me: error: !!! no select - no screen" >&2;}
!    }
  fi
  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  
***************
*** 4163,4169 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 4163,4169 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 4272,4278 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 4272,4278 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 4365,4371 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 4365,4371 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 4460,4466 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 4460,4466 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 4562,4568 ****
  else
    { { echo "$as_me:$LINENO: error: you have neither usable sockets nor usable pipes -> no screen" >&5
  echo "$as_me: error: you have neither usable sockets nor usable pipes -> no screen" >&2;}
!    { (exit 1); exit 1; }; }
  fi
  
  
--- 4562,4568 ----
  else
    { { echo "$as_me:$LINENO: error: you have neither usable sockets nor usable pipes -> no screen" >&5
  echo "$as_me: error: you have neither usable sockets nor usable pipes -> no screen" >&2;}
!    }
  fi
  
  
***************
*** 4573,4579 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 4573,4579 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 4898,4904 ****
  
  { { echo "$as_me:$LINENO: error: !!! no tgetent - no screen" >&5
  echo "$as_me: error: !!! no tgetent - no screen" >&2;}
!    { (exit 1); exit 1; }; }
  fi
  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  fi
--- 4898,4904 ----
  
  { { echo "$as_me:$LINENO: error: !!! no tgetent - no screen" >&5
  echo "$as_me: error: !!! no tgetent - no screen" >&2;}
!    }
  fi
  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  fi
***************
*** 4915,4921 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 4915,4921 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 5359,5365 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 5359,5365 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 6206,6212 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 6206,6212 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 6482,6488 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 6482,6488 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 7004,7010 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 7004,7010 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 7056,7062 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 7056,7062 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 7110,7116 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 7110,7116 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 7951,7957 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 7951,7957 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"

Then run this to patch:

patch -p1 -i configure.patch configure

And now to actually configure.

./configure --host=arm-none-linux-gnueabi --prefix=/usr/arm

Step 6: Compiling

As simple as typing:

make

Step 6: Installing

make install

And then follow step 8 of this post to get screen to your DroboFS.

And there you have it.

#2

Actually, GNU does not imply easy. I have compiled screen for the DroboFS, and it has been quite painful, not because of Screen itself, but because of ncurses.

I don’t remember the details, but if you want I can have a look at my VM.

#3

Yes please, any help appreciated.
And I see a guide for ncurses already. http://www.drobospace.com/forums/showthread.php?tid=1679

#4

I got it compiled too. I don’t remember what id changed to get it working.

#5

I had a look at my VM and indeed, compiling Screen is pretty straightforward once you get ncurses compiled. The configure line is the traditional:

./configure --host=arm-none-linux-gnueabi --prefix=/usr/arm

and everything else is pretty much the same as all the other apps.

#6

[code]root@ubuntuDroboFS:~/code# ls
lua-5.1.4 ncurses-5.7 screen-4.0.3
lua-5.1.4.tar.gz ncurses-5.7.tar.gz screen-4.0.3.tar.gz
root@ubuntuDroboFS:~/code# cd screen-4.0.3
root@ubuntuDroboFS:~/code/screen-4.0.3# ./configure --host=arm-none-linux-gnueabi --prefix=/usr/arm
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.
this is screen version 4.0.3
checking for arm-none-linux-gnueabi-gcc… arm-none-linux-gnueabi-gcc
checking for C compiler default output… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… yes
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether arm-none-linux-gnueabi-gcc accepts -g… yes
checking for arm-none-linux-gnueabi-gcc option to accept ANSI C… none needed
checking how to run the C preprocessor… arm-none-linux-gnueabi-gcc -E
checking for egrep… grep -E
checking whether arm-none-linux-gnueabi-gcc needs -traditional… no
checking for library containing strerror… none required
configure: error: cannot run test program while cross compiling
See `config.log’ for more details.
root@ubuntuDroboFS:~/code/screen-4.0.3# tail config.log

confdefs.h.

-----------

#define PACKAGE_BUGREPORT “”
#define PACKAGE_NAME “”
#define PACKAGE_STRING “”
#define PACKAGE_TARNAME “”
#define PACKAGE_VERSION “”

configure: exit 1
root@ubuntuDroboFS:~/code/screen-4.0.3# root@ubuntuDroboFS:~/code# [/code]

#7

Ooops, my bad.

Now I remember why Screen was such a pain.

You have to edit the ‘configure’ file, and pretty much delete everywhere where an exit instruction follows a cross-compile check. Below is the output of a ‘diff -cB configure configure.new’:

*** configure	Fri Dec  5 13:46:53 2003
--- configure.new	Thu Jan 20 09:57:21 2011
***************
*** 2704,2710 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 2704,2710 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 2753,2759 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 2753,2759 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 2800,2806 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 2800,2806 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 4149,4155 ****
  
  { { echo "$as_me:$LINENO: error: !!! no select - no screen" >&5
  echo "$as_me: error: !!! no select - no screen" >&2;}
!    { (exit 1); exit 1; }; }
  fi
  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  
--- 4149,4155 ----
  
  { { echo "$as_me:$LINENO: error: !!! no select - no screen" >&5
  echo "$as_me: error: !!! no select - no screen" >&2;}
!    }
  fi
  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  
***************
*** 4163,4169 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 4163,4169 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 4272,4278 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 4272,4278 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 4365,4371 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 4365,4371 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 4460,4466 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 4460,4466 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 4562,4568 ****
  else
    { { echo "$as_me:$LINENO: error: you have neither usable sockets nor usable pipes -> no screen" >&5
  echo "$as_me: error: you have neither usable sockets nor usable pipes -> no screen" >&2;}
!    { (exit 1); exit 1; }; }
  fi
  
  
--- 4562,4568 ----
  else
    { { echo "$as_me:$LINENO: error: you have neither usable sockets nor usable pipes -> no screen" >&5
  echo "$as_me: error: you have neither usable sockets nor usable pipes -> no screen" >&2;}
!    }
  fi
  
  
***************
*** 4573,4579 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 4573,4579 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 4898,4904 ****
  
  { { echo "$as_me:$LINENO: error: !!! no tgetent - no screen" >&5
  echo "$as_me: error: !!! no tgetent - no screen" >&2;}
!    { (exit 1); exit 1; }; }
  fi
  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  fi
--- 4898,4904 ----
  
  { { echo "$as_me:$LINENO: error: !!! no tgetent - no screen" >&5
  echo "$as_me: error: !!! no tgetent - no screen" >&2;}
!    }
  fi
  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  fi
***************
*** 4915,4921 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 4915,4921 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 5359,5365 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 5359,5365 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 6206,6212 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 6206,6212 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 6482,6488 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 6482,6488 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 7004,7010 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 7004,7010 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 7056,7062 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 7056,7062 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 7110,7116 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 7110,7116 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
***************
*** 7951,7957 ****
  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
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"
--- 7951,7957 ----
  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;}
!    }
  else
    cat >conftest.$ac_ext <<_ACEOF
  #line $LINENO "configure"

To use this, get the source code for screen 4.0.3, untar it, go into the screen-4.0.3 folder and copy the text above into a ‘configure.patch’ file.

Then run this:

patch -p1 -i configure.patch configure

(Don’t worry about the “missing header for context diff at line 3 of patch” error message)

The original configure file is 251351 long and has an MD5 checksum of 8bc7e441ff66b22f4e08ad8d50901930.
The patched configure file is 250914 long and has an MD5 checksum of 148ca87ff5a63036c2332c7dd8af3c82.

This is the output I get when running the patched ‘configure’:

[code]# ./configure --host=arm-none-linux-gnueabi --prefix=/usr/arm
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.
this is screen version 4.0.3
checking for arm-none-linux-gnueabi-gcc… arm-none-linux-gnueabi-gcc
checking for C compiler default output… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… yes
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether arm-none-linux-gnueabi-gcc accepts -g… yes
checking for arm-none-linux-gnueabi-gcc option to accept ANSI C… none needed
checking how to run the C preprocessor… arm-none-linux-gnueabi-gcc -E
checking for egrep… grep -E
checking whether arm-none-linux-gnueabi-gcc needs -traditional… no
checking for library containing strerror… none required
configure: error: cannot run test program while cross compiling
See config.log' for more details. configure: error: cannot run test program while cross compiling Seeconfig.log’ for more details.
configure: error: cannot run test program while cross compiling
See `config.log’ for more details.
checking for gawk… no
checking for mawk… mawk
checking for a BSD-compatible install… /usr/bin/install -c
configure: checking for buggy tools…

  • sed is ‘GNU sed version 4.1.5’.
    checking if a system-wide socket dir should be used… yes
    checking for the socket dir… (eff_uid ? “/tmp/uscreens” : “/tmp/screens”)
    configure: checking for MIPS…
    configure: checking for Ultrix…
    configure: checking for butterfly…
    configure: checking for POSIX.1…
  • you have a POSIX system
    configure: checking for System V…
    configure: checking for sequent/ptx…
    configure: checking SVR4…
    checking for ANSI C header files… yes
    checking for sys/types.h… yes
    checking for sys/stat.h… yes
    checking for stdlib.h… yes
    checking for string.h… yes
    checking for memory.h… yes
    checking for strings.h… yes
    checking for inttypes.h… yes
    checking for stdint.h… yes
    checking for unistd.h… yes
    configure: checking for Solaris 2.x…
    configure: checking BSD job jontrol…
  • you have jobcontrol
    configure: checking setreuid…
    configure: checking seteuid…
    configure: checking select…
    configure: checking fifos…
    configure: error: cannot run test program while cross compiling
    See config.log' for more details. configure: checking sockets... configure: error: cannot run test program while cross compiling Seeconfig.log’ for more details.
    configure: error: you have neither usable sockets nor usable pipes -> no screen
    configure: checking select return value…
    configure: error: cannot run test program while cross compiling
    See config.log' for more details. configure: checking for tgetent... configure: checking libcurses... configure: checking libtermcap... configure: checking libtermlib... configure: checking libncurses... configure: error: cannot run test program while cross compiling Seeconfig.log’ for more details.
    configure: checking ospeed…
    configure: checking for /dev/ptc…
    configure: checking for SVR4 ptys…
    checking for getpt… yes
    configure: checking for ptyranges…
    configure: checking default tty permissions/group…
    configure: error: cannot run test program while cross compiling
    See config.log' for more details. configure: checking getutent... configure: checking ut_host... checking utempter.h usability... no checking utempter.h presence... no checking for utempter.h... no configure: checking for libutil(s)... configure: checking getloadavg... assuming posix signal definition configure: checking for crypt and sec libraries... configure: checking crypt... configure: checking IRIX sun library... configure: checking syslog... configure: checking wait union... configure: checking for termio or termios... configure: checking getspnam... configure: checking getttyent... configure: checking fdwalk... configure: checking whether memcpy/memmove/bcopy handles overlapping arguments... configure: error: cannot run test program while cross compiling Seeconfig.log’ for more details.
    configure: error: cannot run test program while cross compiling
    See config.log' for more details. configure: error: cannot run test program while cross compiling Seeconfig.log’ for more details.
    checking long file names… yes
    checking for vsprintf… yes
    checking for dirent.h that defines DIR… yes
    checking for library containing opendir… none required
    checking for setenv… yes
    checking for nl_langinfo(CODESET)… yes
    checking for library containing gethostname… none required
    checking for rename… yes
    checking for fchmod… yes
    checking for fchown… yes
    checking for strerror… yes
    checking for lstat… yes
    checking for _exit… yes
    checking for utimes… yes
    checking for vsnprintf… yes
    checking for getcwd… yes
    checking for setlocale… yes
    checking for strftime… yes
    configure: error: cannot run test program while cross compiling
    See `config.log’ for more details.
    checking for the global screenrc file… “/usr/arm/etc/screenrc”
    checking for the utf8-encodings location… “/usr/arm/share/screen/utf8encodings”
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating doc/Makefile
    config.status: creating config.h
    config.status: config.h is unchanged
    config.status: executing default commands

Now please check the pathnames in the Makefile and in the user
configuration section in config.h.
Then type ‘make’ to make screen. Good luck.
[/code]

Notice how we gleefully jump over all the cross-compile test errors? :smiley:

Let me know how it goes.

#8

Yep, that did the trick. I updated the guide accordingly and removed the [incomplete] tag.

Thanks! Now for Lua and my Drobo is complete! =P

#9

I consolidated all the info in this thread here: http://www.droboports.com/app-repository/screen-4-0-3

At that location there is also a ready-to-install DroboApp package for Screen.