Linux PPC build?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark

Locked
mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Linux PPC build?

Post by mwieder » Tue Mar 11, 2014 7:52 pm

Useful for me to follow along as well, since I no longer have a working ppc machine and so can only witness vicariously.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10082
Joined: Fri Feb 19, 2010 10:17 am

Re: Linux PPC build?

Post by richmond62 » Tue Mar 11, 2014 7:56 pm

Now, at the risk of looking a right banana, as I am 100% building a big-endian, I'm going to try this really radical thing
as my first "semi-serious" attempt:

1. All conditional IF statements that give the machine a choice between BIG and LITTLE are going to be turned
into dogmatic "build big-endian regardless" statements.

With any luck this will get rid og that Terminal message about the code being set to build both types of code.
Last edited by richmond62 on Tue Mar 11, 2014 8:05 pm, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10082
Joined: Fri Feb 19, 2010 10:17 am

Re: Linux PPC build?

Post by richmond62 » Tue Mar 11, 2014 8:00 pm

However, before that I am going to do 4 things, not necessarily in the order listed below:

1. Go through to the next room and kiss my wife.
2. Cuddle both my cats.
3. Go and get a large cup of strong. black coffee.

and . . .

4. Wait for Mark to tell me that that is a "really bloody stupid, taking a shovel to eat one's muesli" approach,
and suggest a better one.

And I know, Mark, that you are watching, even if only "vicariously" :)

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10082
Joined: Fri Feb 19, 2010 10:17 am

Re: Linux PPC build?

Post by richmond62 » Tue Mar 11, 2014 8:08 pm

This is the sort of thing I intend to do:
changeCode.png

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Linux PPC build?

Post by mwieder » Tue Mar 11, 2014 8:54 pm

Ha! I will tell you no such thing.
What I *will* suggest, is that you

1. place a comment before any code you change, something like

Code: Select all

// JRM 2014-03-10 [[ linux_ppc ]]
to make it easy to search for and make it stand out; and

2. where it's appropriate (your call) try to make the changes

Code: Select all

#if 0
... the code you want to get rid of
#else
...put your new code here
#endif
to make it easy on yourself when you want to go back and start undoing things later on.

Welcome to the trial-and-error world of poking away at the engine to see what happens.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10082
Joined: Fri Feb 19, 2010 10:17 am

Re: Linux PPC build?

Post by richmond62 » Tue Mar 11, 2014 9:01 pm

Thanks very much for those suggestions. They both strike me as extremely sensible.
BTSH.png
I'll go and get on with things.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10082
Joined: Fri Feb 19, 2010 10:17 am

Re: Linux PPC build?

Post by richmond62 » Tue Mar 11, 2014 10:02 pm

I did a hell of a lot of editing, and then did a build, and still ended up with this:

/usr/include/powerpc-linux-gnu/bits/endian.h:27:4: error: #error Both BIG_ENDIAN and LITTLE_ENDIAN defined!

My problem is that I cannot work out where that /usr directory is, as there is no sign of one within the /livecode
directory.

Why do I have a naive hope that this may be the "Key" to the whole conumdrum?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10082
Joined: Fri Feb 19, 2010 10:17 am

Re: Linux PPC build?

Post by richmond62 » Tue Mar 11, 2014 10:24 pm

Just possibly, I needn't have changed any code at all, as that files was in the file structure of the operating system rather than
the Livecode directory. Its contents are a shade obscure:
yuck.png
This:

/* PowerPC can be little or big endian. Hopefully gcc will know... */

made me laugh; but not out of a sense of fun; more the mirthless cackle of a hyaena.

What comes after that is, presumably the bit that defines both a BIG_ENDIAN and a LITTLE_ENDIAN build.

Is this a problem caused by Ubuntu? one inherited from Debian perhaps?

This has to be there because PPC machines such as the Power7 processors can run Little Endian code; while PPC machines put out by Apple are locked into Big Endian code.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10082
Joined: Fri Feb 19, 2010 10:17 am

Re: Linux PPC build?

Post by richmond62 » Tue Mar 11, 2014 10:28 pm

Well; in for a penny if in for a pound:
suicidalTendencies.png

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10082
Joined: Fri Feb 19, 2010 10:17 am

Re: Linux PPC build?

Post by richmond62 » Tue Mar 11, 2014 10:34 pm

Let's try a build with this:
suicidalEdit.png

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10082
Joined: Fri Feb 19, 2010 10:17 am

Re: Linux PPC build?

Post by richmond62 » Tue Mar 11, 2014 11:10 pm

Well this is certainly different:
different.png
Though still not much cop.

The really odd thing is that in the /livecode/_build/linux/ directory there is NO /ppc directory (and there was one earlier)
and ONLY an INTEL one:
worrying.png

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10082
Joined: Fri Feb 19, 2010 10:17 am

Re: Linux PPC build?

Post by richmond62 » Tue Mar 11, 2014 11:16 pm

Well, that's enough foolishness for one night.

As tomorrow, apart from a tedious trip to my company accountant, I will be FREE-ish, I'll have another go tomorrow.
With any luck a good night's sleep may turn up some new ideas.
bedtime-final-300x260.jpg

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Linux PPC build?

Post by mwieder » Wed Mar 12, 2014 1:10 am

Don't worry about the lack of a pcc directory - you won't find one. The binary you're building will end up in the i386 directory because that's the way the makefiles are set up. At some point it should be possible to set up a different path for them, the same way that it's set up for the 64-bit builds, but it shouldn't be of concern right now.

On the other issue... you've now run into the prebuilt directory, which are binary libraries that have been built for you by runrev and "all you have to do" is link them in to compile them. Thus you have prebuilt binary versions of the engine for different platforms so you don't have to do things like cross-compile a Windows engine in order to create a Windows application on OSX, etc... all you have to do is link the already-built engine.

At any rate, the gist of this is that you won't be able to link with the prebuilt libraries ("Revolution.lnx") because they're Intel libraries - you'll need to build ppc versions of the binaries in the prebuilt directory before you can get past this bottleneck. And not having done that before, I'm not really sure how you'd go about that.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10082
Joined: Fri Feb 19, 2010 10:17 am

Re: Linux PPC build?

Post by richmond62 » Wed Mar 12, 2014 9:03 am

/livecode/prebuilt/bin/
uglyBetty.png
A show-stopper methinks.

Fraser?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10082
Joined: Fri Feb 19, 2010 10:17 am

Re: Linux PPC build?

Post by richmond62 » Wed Mar 12, 2014 9:09 am

I wonder ????? if the /lib directory were set up with a 'linux-ppc' directory an
engine could not be compiled? Mind you how one would go about that I haven't a clue.
noPPCfolder.png

Locked