screen-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[screen-devel] [PATCH] cross-compiling screen 4.2.1 fails


From: Eric Koldeweij
Subject: [screen-devel] [PATCH] cross-compiling screen 4.2.1 fails
Date: Fri, 12 Sep 2014 18:09:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

Hello All,

I have run into severe cross-compilation issues with screen 4.2.1 as well. It's simply not possible out of the box since the configure script will always try to execute some (cross-)compiled test programs which will fail if host and target systems are not compatible. Because I really wanted to use screen on my arm board (yes, it's a Raspberry Pi ) I have patched the configuration to make cross-compiling possible. Your mileage may vary and I'm sure there are nicer ways to do it, but I managed to get a fully functional cross-compiled screen application running on my Pi. I have decided to post my efforts here so that others can use it as well.

The patch is attached to this mail. In case it's not working the patch file can also be retrieved from:
http://www.no-sense.net/~eric/screen.patch

The patch modifies both configure and configure.in but the changes were made in configure.in only, the configure script was created by running the included ./autogen.sh script. The user will need to manually supply the information which was previously retrieved by running test programs. If the information is not provided configure will still attempt to build and execute a test program and it will still fail. Thus native builds are not affected at all by this patch, the behaviour will be exactly as before.

Here are the commands I used to cross-compile screen for my Raspberry Pi:

patch -Np0 < screen.patch

ac_cv_fifo=yes \
ac_cv_fifobr=no \
ac_cv_sock=yes \
ac_cv_socknofs=no \
ac_cv_select_broken=no \
ac_cv_terminfo=yes \
ac_cv_memmove_handles_overlap=yes \
../configure --host=arm-linux-gnueabihf --with-pty-mode=0620 --with-pty-group=14 <some other options>

Explanation of the new variables:
ac_cv_fifo - whether your target system supports fifo's. Usually yes for GNU/Linux. ac_cv_fifobr - whether the fifo implementation is broken or not. Usually no for GNU/Linux. ac_cv_sock - whether your target system supports (domain) sockets. Usually yes for GNU/Linux. ac_cv_socknofs - whether domain sockets create an entry in the file system. Yes for GNU/Linux. ac_cv_select_broken - whether select returns the right value (i.e. number of fd's). Usually yes. ac_cv_terminfo - whether to use terminfo or termcap. Check this. if ncurses installed, say yes. ac_cv_memmove_handles_overlap - whether memmove can handle overlapping source and destination. Check this. Yes for recent GNU/Linux. ac_cv_bcopy_handles_overlap - same as above for bcopy. Only used if ac_cv_memmove_handles_overlap is set to no. ac_cv_memcpy_handles_overlap - same as above for memcpy. Only used if the previous two are set to no.

the --with-pty-mode and -group settings are needed to avoid another test program to be run. Mode is advised to be set to 0620 and the pty group is group 14 (tty) on my target system. Please change accordingly

Just in case a screen developer finds this good to include in the screen repository, I hereby donate the attached patch to the screen developer team.

Regards,
Eric.

Attachment: screen.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]