Open GoogleCodeExporter opened 8 years ago
Also forgot to add im using 3.1.2 with 3.1.2 iPhone 3G firmware and GCC is:
will@will-desktop-ubuntu:~/ipod/3.1.2$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.4-5ubuntu1'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--enable-multiarch --enable-linker-build-id --with-system-zlib
--libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr
--enable-targets=all --with-tune=generic --enable-checking=release
--build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.3.4 (Ubuntu 4.3.4-5ubuntu1)
Original comment by willh1...@gmail.com
on 3 Dec 2009 at 8:26
/home/will/ipod/3.1.2/toolchain/src/cctools/ld64/src/MachOWriterExecutable.hpp:2
222:
error: ‘sprintf’ was not declared in this scope
you need to add the stdio header file to MachOWriterExecutable.hpp. I
succesfully
compiled the toolchain on ubuntu karmic and found a lot of errors like those
mostly
"stderr was not declared","sprintf was not declared",etc. I solved all of them
by
including header files needed.
Original comment by diegoal...@gmail.com
on 3 Dec 2009 at 9:41
I just don't feel like trudging through lots of files and inserting headers.
I've
downgraded to 9.04 and it compiled perfectly so this is obviously a bug to do
with
9.10 packages.
Original comment by willh1...@gmail.com
on 3 Dec 2009 at 10:29
Ubuntu Karmic uses gcc 4.4 by default - and that won't work. In toolchain.sh,
you can
change
CFLAGS="-m32" LDFLAGS="-m32" "${CCTOOLS_DIR}"/configure \
--target="${TARGET}" \
--prefix="$PREFIX" \
--enable-ld64
to
CFLAGS="-m32" LDFLAGS="-m32" CC="gcc-4.3" CXX="g++-4.3" "${CCTOOLS_DIR}"/configure \
--target="${TARGET}" \
--prefix="$PREFIX" \
--enable-ld64
That worked for me.
Original comment by zla...@gmail.com
on 19 Feb 2010 at 1:04
My solution on Ubuntu 10.04 was to add these 2 lines
#include <stdio.h>
#include <stdlib.h>
to these 4 files:
/home/user/Projects/iphone/toolchain/toolchain/src/cctools/ld64/src/MachOReaderD
ylib.hpp
/home/user/Projects/iphone/toolchain/toolchain/src/cctools/ld64/src/MachOWriterE
xecutable.hpp
/home/user/Projects/iphone/toolchain/toolchain/src/cctools/ld64/src/MachOReaderR
elocatable.hpp
/home/user/Projects/iphone/toolchain/toolchain/src/cctools/ld64/src/Options.cpp
Afterwards, the toolchain compiled without complaints.
Original comment by michael....@googlemail.com
on 24 May 2010 at 9:50
Original issue reported on code.google.com by
willh1...@gmail.com
on 3 Dec 2009 at 8:25