Cygwin setup

From RISC OS

(Difference between revisions)
Jump to: navigation, search
(Setting up Cygwin: Some notes on building GCC4)
m (Fix ML link.)
 
(6 intermediate revisions not shown)
Line 4: Line 4:
Setting up Cygwin is fairly straight forward. Download and run the [http://www.cygwin.com/setup.exe installer] from the [http://www.cygwin.com/ Cygwin homepage]. Following the default setup will probably be OK, although it's advisable not to install it in a directory tree that uses a space (such as C:\Program Files\).  Choose a suitable mirror and make sure that the following (binary) packages are installed. (Most are found under the "devel" tree. Alternatively, choose "Full" view for an alphabetical list of all packages.)
Setting up Cygwin is fairly straight forward. Download and run the [http://www.cygwin.com/setup.exe installer] from the [http://www.cygwin.com/ Cygwin homepage]. Following the default setup will probably be OK, although it's advisable not to install it in a directory tree that uses a space (such as C:\Program Files\).  Choose a suitable mirror and make sure that the following (binary) packages are installed. (Most are found under the "devel" tree. Alternatively, choose "Full" view for an alphabetical list of all packages.)
 +
 +
If you prefer the command line, you may find it easier to install packages there instead of the fiddly Cygwin GUI.  To do this people have written scripts called apt-cyg or cyg-apt, with syntax like:
 +
apt-cyg install bison
 +
(or the same for cyg-apt).  You can install both with:
 +
cd /usr/local/bin
 +
wget http://stephenjungels.com/jungels.net/projects/apt-cyg/apt-cyg
 +
wget http://lilypond.org/~janneke/software/cyg-apt
 +
chmod +x apt-cyg cyg-apt
 +
Type the command name on its own for full details of how it operates. Cygwin needs packages wget, tar, gawk and bzip2 for apt-cyg, and also Python for cyg-apt so if you have trouble use the GUI to check those are installed.
 +
 +
Cygwin uses the DOS command window by default, which isn't so good for things like scrollback or cut and paste.  If this annoys you you may find installing rxvt helps - try these guides [http://lee.org/blog/2005/01/17/cygwin-rxvt/] [http://blasphemousbits.wordpress.com/2007/02/12/rxvt-solves-many-cygwin-woes/] [http://eightpence.com/getting-a-linux-shell-on-windows-cygwin-rxvt/].
 +
 +
= Required packages for GCCSDK =
'''For GCC 3.4.6:'''
'''For GCC 3.4.6:'''
Line 19: Line 32:
'''For GCC4:'''
'''For GCC4:'''
-
* autogen (This is currently (January 2008) not available via the cygwin installer)
+
* autoconf - must be version 2.5 (Watch out as the cygwin installer will try and automatically install a more recent version every time it is run.)
 +
* autogen (This is currently (January 2008) not available via the cygwin installer - see below)
* automake - must be version 1.9 (Be careful as the cygwin installer will try to install 1.10 every time you run it, as it is a dependency of libtool.)
* automake - must be version 1.9 (Be careful as the cygwin installer will try to install 1.10 every time you run it, as it is a dependency of libtool.)
* diffutils
* diffutils
Line 31: Line 45:
'''For the autobuilder:'''
'''For the autobuilder:'''
* cvs
* cvs
 +
* gettext-devel
* glib
* glib
* libpopt0
* libpopt0
* patch
* patch
* pkg-config
* pkg-config
 +
* unzip
 +
* xorg-x11-bin
If any of these are missing or you need to make changes, you can re-run the Cygwin setup program at any time.
If any of these are missing or you need to make changes, you can re-run the Cygwin setup program at any time.
Line 45: Line 62:
* [http://www.esru.strath.ac.uk/Programs/ESP-r_tut/training_ovr_unix.htm A very brief introduction to the main commands]
* [http://www.esru.strath.ac.uk/Programs/ESP-r_tut/training_ovr_unix.htm A very brief introduction to the main commands]
-
== Links ==
+
== Autogen for GCC 4 ==
 +
GCC 4 requires autogen.  This isn't available as a Cygwin package, because autogen depends on guile.  The version of Guile (1.8.x) shipped with Cygwin is built with the wrong GCC which causes autogen to segfault, and the maintainer doesn't seem to acknowledge this is a bug in Guile.
 +
 
 +
Some references to the problem [http://sourceforge.net/project/shownotes.php?release_id=540763] [http://www.mail-archive.com/autogen-users@lists.sourceforge.net/msg00173.html] [http://sourceforge.net/mailarchive/message.php?msg_name=1ca1c1410702231756j7af3ecc5t25986b31a86dae1f%40mail.gmail.com].  See also [http://www.riscos.info/pipermail/gcc/2008-January/thread.html the thread 'Building GCC4 in Cygwin'] on the GCCSDK mailing list.
 +
 
 +
[http://tcpreplay.synfin.net/trac/browser/trunk/docs/Win32Readme.txt These instructions] may be the answer, but they haven't been tested.  Note that to build Guile you'll also have to install Cygwin packages gmp and libgmp-devel (which should also pull in libgmp3).
 +
 
 +
If you have any problems, please ask for help on the [http://www.riscos.info/cgi-bin/mailman/listinfo/gcc riscos.info GCC mailing list].
 +
 
 +
= Links =
* Back to [[Using GCCSDK]]
* Back to [[Using GCCSDK]]
{{GCC and GCCSDK pages}}
{{GCC and GCCSDK pages}}

Latest revision as of 23:11, 20 January 2011

Cygwin is a Linux-like environment for Windows. It can be used to cross-compile Linux applications for RISC OS.

Contents

Setting up Cygwin

Setting up Cygwin is fairly straight forward. Download and run the installer from the Cygwin homepage. Following the default setup will probably be OK, although it's advisable not to install it in a directory tree that uses a space (such as C:\Program Files\). Choose a suitable mirror and make sure that the following (binary) packages are installed. (Most are found under the "devel" tree. Alternatively, choose "Full" view for an alphabetical list of all packages.)

If you prefer the command line, you may find it easier to install packages there instead of the fiddly Cygwin GUI. To do this people have written scripts called apt-cyg or cyg-apt, with syntax like:

apt-cyg install bison

(or the same for cyg-apt). You can install both with:

cd /usr/local/bin
wget http://stephenjungels.com/jungels.net/projects/apt-cyg/apt-cyg
wget http://lilypond.org/~janneke/software/cyg-apt
chmod +x apt-cyg cyg-apt

Type the command name on its own for full details of how it operates. Cygwin needs packages wget, tar, gawk and bzip2 for apt-cyg, and also Python for cyg-apt so if you have trouble use the GUI to check those are installed.

Cygwin uses the DOS command window by default, which isn't so good for things like scrollback or cut and paste. If this annoys you you may find installing rxvt helps - try these guides [1] [2] [3].

Required packages for GCCSDK

For GCC 3.4.6:

  • autoconf (version >=2.5)
  • automake (version >=2.5)
  • binutils,
  • bison
  • flex
  • gcc
  • gcc-core
  • gcc-g++
  • gperf
  • make
  • subversion

For GCC4:

  • autoconf - must be version 2.5 (Watch out as the cygwin installer will try and automatically install a more recent version every time it is run.)
  • autogen (This is currently (January 2008) not available via the cygwin installer - see below)
  • automake - must be version 1.9 (Be careful as the cygwin installer will try to install 1.10 every time you run it, as it is a dependency of libtool.)
  • diffutils
  • gcc
  • libtool
  • make
  • makeinfo
  • patch
  • subversion

For the autobuilder:

  • cvs
  • gettext-devel
  • glib
  • libpopt0
  • patch
  • pkg-config
  • unzip
  • xorg-x11-bin

If any of these are missing or you need to make changes, you can re-run the Cygwin setup program at any time. Once this is done, running Cygwin from the Start menu or Desktop icon will present the "bash" console.

It's also worth noting that virus checkers can slow down build processes considerably, since the build emits lots of temporary files and the virus checker insists on checking each one.

If you're not familiar with unix commands it might be worth doing a bit of research with Google. To get you started, you could try:

Autogen for GCC 4

GCC 4 requires autogen. This isn't available as a Cygwin package, because autogen depends on guile. The version of Guile (1.8.x) shipped with Cygwin is built with the wrong GCC which causes autogen to segfault, and the maintainer doesn't seem to acknowledge this is a bug in Guile.

Some references to the problem [4] [5] [6]. See also the thread 'Building GCC4 in Cygwin' on the GCCSDK mailing list.

These instructions may be the answer, but they haven't been tested. Note that to build Guile you'll also have to install Cygwin packages gmp and libgmp-devel (which should also pull in libgmp3).

If you have any problems, please ask for help on the riscos.info GCC mailing list.

Links

GCC and GCCSDK pages
GCC under RISC OS

GCC for RISC OS, GCC tutorial, GCC common switches, GCC for beginners, UnixLib, ELFLoader
GCCSDK and Unix porting
GCCSDK, GCCSDK Releases, GCCSDK Development, Using GCCSDK, Autobuilder Development and Packaging Cygwin setup, Accelerating autobuilder with apt-proxy, ChoX11, Developer help wanted

Personal tools