On Wed, 17 Apr 2013,
peter....@gmail.com wrote:
> I am trying to build the platform specific variants of Avian on a Windows 7
> Pro / x64 / Cygwin system.
> The first steps work fine:
> $ git clone
https://github.com/ReadyTalk/avian.git
> $ cd avian/
> $ git checkout v0.6
> $ git clone git://
oss.readytalk.com/win32.git ../win32
> $ make
> ... or ...
> $ make platform=windows arch=i386
> The Linux / PowerPC command doesn't work for me;
> $ make platform=linux arch=powerpc
> /bin/sh: powerpc-linux-gnu-gcc: command not found
> /bin/sh: powerpc-linux-gnu-gcc: command not found
> expr: syntax error
> compiling build/linux-powerpc/type-generator-build.o
> g++: unrecognized option '-pthread'
> cc1plus: warnings being treated as errors
> src/type-generator.cpp:1:0: error: -fPIC ignored for target (all code is
> position independent)
> makefile:1019: recipe for target
> `build/linux-powerpc/type-generator-build.o' failed
> make: *** [build/linux-powerpc/type-generator-build.o] Error 1
> I am not very versed in the art of makefiles, is it failing becuase it can't
> find the pthreads library?
> I have a pthreads library for the console in question
> I find that the commands ...
> make platform=windows arch=x86_64
> make platform=linux arch=x86_64
> ... fail as well, but the linux errors look simmilar to eachtoher
> $ make platform=linux arch=x86_64
> compiling build/linux-x86_64/type-generator-build.o
> g++: unrecognized option '-pthread'
> cc1plus: warnings being treated as errors
> src/type-generator.cpp:1:0: error: -fPIC ignored for target (all code is
> position independent)
> makefile:1019: recipe for target `build/linux-x86_64/type-generator-build.o'
> failed
> make: *** [build/linux-x86_64/type-generator-build.o] Error 1
I haven't tried cross-compiling for Linux on Windows, so I wouldn't be
surprised if it's broken. The key to cross compiling from one platform to
another is that you must have the appropriate cross versions of GCC and
binutils installed, as well as the system headers and libraries (AKA a
sysroot) for the target platform. For Linux, it will probably be easier
just to install e.g. Ubuntu in a VirtualBox guest and compile natively. I
believe Ubuntu also has cross compiler packages for other architectures
such as PowerPC and ARM.
If you still want to cross compile for Linux on Windows, you'll need to
build and install the appopriate cross compilers and sysroots (one for
each architecture) and ensure that they work (e.g. can compile a "hello,
world" example in C). Once you have that in place, if Avian still won't
build, let me know and I'll try to fix the makefile.