Using mingw32 on XP(SP3), I found several reasons causing the
compilation to fail, but finally the build runs through.
http://www.nongnu.org/avr-libc/user-manual/install_tools.html gives some
useful information about a manual building process and lists required
programs.
a) mingw basic setup
Download the current release of mingw using the installer
http://downloads.sourceforge.net/project/mingw/Installer/mingw-get-setup.exe
(installation path should not contain blanks; I've used F:\mingw)
Basic Setup - checked
mingw-developer-toolkit
mingw32-base
mingw32-gcc-g++
mingw32-gcc-ada
msys-base
All Packages - checked additionally
msys-gzip
All Packages - uncheck (in need of another version)
mingw32-autoconf2.5
b) mingw modifications
Create \mingw\msys\1.0\etc\fstab to reflect the actual installation
path. See http://www.mingw.org/wiki/Getting_Started
Replace F:\mingw\var\lib\mingw-get\data\mingw32-autoconf.xml with the
version attached or change it manually to point to autoconf2.5-2.64-1.
Using a newer version is the primary error source while creating
avr-binutils. Changing some path variables (like for other problems)
would probably fix it too, but the script insists on using 2.63/2.64.
Check in mingw32-autoconf2.5 using mingw-get.exe again.
Create a shortcut to F:\mingw\msys\1.0\msys.bat
c) Install prerequisite programs
pdflatex epstopdf
I've used
http://mirrors.ctan.org/systems/win32/miktex/setup/basic-miktex-2.9.5105.exe
Using the installer automaticly expands the windows path variable.
tex\latex\listings\listings.sty
tex\latex\xcolor\xcolor.sty
tex\latex\colortbl\colortbl.sty
tex\latex\url\url.sty
tex\latex\fancyhdr\fancyhdr.sty
tex\latex\sectsty\sectsty.sty
tex\latex\tocloft\tocloft.sty
tex\context\base\supp-pdf.mkii
fonts\tfm\adobe\symbol\psyr.tfm
will be downloaded on first use.
pngtopnm and various other conversion tools
Tired of fumbling around with installations, I simply extracted the
w32-binaries from
http://sourceforge.net/projects/gnuwin32/files/netpbm/10.27/
netpbm-10.27-bin.zip and netpbm-10.27-dep.zip respectively.
and put them together in newly-created /usr/local/bin
(F:\mingw\msys\1.0\local\bin)
fig2dev
xttp://www.winfig.com/WinFIG-Dateien/WinFIG304.zip
Extracted gdiplus.dll and fig2dev.exe to /usr/local/bin
doxygen
ftp://ftp.stack.nl/pub/users/dimitri/doxygen-1.7.1.windows.bin.zip
Extracted doxygen.exe and doxytag.exe to /usr/local/bin
ghostscript
I'd already installed version 9.02, seems working
(no problem with dir containing blanks)
d) Setup the sources
xttp://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/3.4.
3/SOURCES.README
I've used F:\mingw\msys\1.0\home\username\avr as base directory. Below
there are
./build, ./install, ./source, ./source/headers, ./source/gmp,
./source/mpfr and ./source/mpc containing the tarballs.
xttp://ftp.gnu.org/gnu/gmp/gmp-5.0.2.tar.gz
xttp://ftp.gnu.org/gnu/mpfr/mpfr-3.0.0.tar.gz
xttp://www.multiprecision.org/mpc/download/mpc-0.9.tar.gz
e) Modify the installation script.
All further problems (*) are caused by using absolute paths, which are
not supported in all cases.
Simply changing all variables ($srcdir, $builddir, $LIB_DIR...) to
either "/home/username", "F:/mingw/msys/1.0/home/username" or
"/f/mingw/msys/1.0/home/username" leads to unexpected behavior in
otherwise working parts.
Also, using strictly relative paths would require too much changes.
Thus introducing a new variable srcdirw=$(cd ${srcdir}; pwd -W) used by
previously failing configure calls works well.
There are discussion about this topic in general, some of them
discourage the use of pwd -W, but who cares. I'm not convinced that this
longstanding problem would be ever solved by the root, because there are
a lot of compatibility issues in executables, scripts and the m4 macro
processor.
So use the attached version copied to ~/avr, cd to this dir and start
the build process.
$ sh build-avr8-gnu-toolchain-git-msys.sh -b ./build -p ./install -s
./source
Depending on your hardware, this could take serveral hours.
(*)
gcc_build_full(), gcc_build_bootstrap() -> fails during build
build/gengtype.exe \
-S /home/username/avr/source/gcc/gcc -I
gtyp-input.list -w tmp-gtype.state
/home/username/avr/source/gcc/gcc/../libcpp/include/line-map.h: No such
file or directory
even if the file is available.
gmp_build() -> fails at configure
checking size of mp_limb_t... 0
configure: error: Oops, mp_limb_t doesn't seem to work