Re: PPC/Linux fails?

210 views
Skip to first unread message

Joel Dice

unread,
Apr 17, 2013, 11:44:32 AM4/17/13
to av...@googlegroups.com
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.

Joel Dice

unread,
Apr 24, 2013, 6:51:01 PM4/24/13
to av...@googlegroups.com
On Wed, 24 Apr 2013, peter....@gmail.com wrote:

> � � I have a version of GCC (4.1.1 ... and g++, ar, ranlib, and strip) with
> the console's SDK
>
> � � I made a hello world, but was unable to run it since it wasn't signed. I
> was able to link a shared library and run that perfectly fine
> � � (I had to build it on my home PC and walk it into the lab)
> 1. I stuck a chunk of stuff into the powerpc section for "hallam" to point
> to these tools
> 2. I removed "-pthread" and "-fPIC" and "-fvisibility=hidden" which got me
> into some "fun" with ucontext.h
> 3. I do not have a copy of ucontext.h for the console
> 4. I'm guessing that this is a dead end?

When you say "console", so you mean something like a Sony Playstation 3?
Avian will work just fine on a "normal" PowerPC Linux distribution such as
Debian, which has pthreads, ucontext.h, etc..

Perhaps the Linux distribution and SDK that you're using doesn't have
those things, in which case it probably is a dead end unless you're
willing to port Avian to that platform. If it doesn't have pthreads, it
may not have multithreading at all, which would definitely make porting
Avian (and a lot of other modern software) difficult.
Reply all
Reply to author
Forward
0 new messages