Linux PPC build?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark

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

Re: Linux PPC build?

Post by richmond62 » Fri Mar 07, 2014 1:59 pm

I installed Ubuntu 12.04 PPC on the MacMini.

As I have only 256 MB on the Mini the desktop manager was unusable
so I installed LXDE on top.

Apart from the fact that the machine is slow (which has got nothing to do with Ubuntu PPC),
everything works fine.

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

Re: Linux PPC build?

Post by richmond62 » Fri Mar 07, 2014 2:01 pm

I was actually wondering about the feasibility of compiling for PowerPC on my Intel box.

I installed gcc-4.8-powerpc-linux-gnu-base using Synaptic.

Now my "problem" is how to get the Terminal to choose the PowerPC compiler rather than the standard one
when I try to build Livecode.

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

Re: Linux PPC build?

Post by richmond62 » Fri Mar 07, 2014 2:04 pm


LCfraser
Livecode Staff Member
Livecode Staff Member
Posts: 71
Joined: Thu Nov 28, 2013 11:18 am
Contact:

Re: Linux PPC build?

Post by LCfraser » Fri Mar 07, 2014 2:26 pm

As I learned when doing the RaspberryPi stuff, cross-compiling on Linux can be a major pain - even with the version of GCC targeting PowerPC, it still lacks the correct headers and libraries (because it needs the PPC variants of the libraries to link against). I tried it on Debian so maybe Ubuntu does things differently enough that you might have a bit more luck.

In general, to override which compiler to use, you set the CC environment variable to point to the compiler e.g.

Code: Select all

CC=/usr/bin/gcc-4.8-powerpc MODE=release ARCH=ppc make development
Though that path and executable name is probably wrong but should hopefully provide a hint as where to look.

The other problem is that until 6.6-DP-1, the LiveCode makefiles didn't use $CC and had hardcoded "gcc" instead so you'll need to use git to checkout either my feature-rpi branch (which obeys $CC and is 6.5.2) or the develop branch (which is currently at 6.6-RC-1).

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

Re: Linux PPC build?

Post by richmond62 » Fri Mar 07, 2014 7:02 pm

"Ubuntu does things differently"

Well, how shall I put things politely?

As, Fraser, you are still living in the 'UK' (not for long, I hope), you know ALL about both political correctness and the desire of the 'British' government to create a risk free state; both of which are illusions.

I feel that Ubuntu is a bit like the namby-pamby (c.f. John Gay's critique of Ambrose Phillips in his "Shepherd's Week") version of Debian; you know; garters, gaiters, braces, belt, jockstrap and all; when we
Scots, when we wear a philabeg feel no need for any of these (q.v. when I turned up in RunRev's offices soaked to the skin in my kilt and everybody (except, God bless him, the wonderful American who died,and Andre Garzia)
tried to pretend I wasn't there: a laugh a minute from my point of view (but, hey, I have always been a sarcastical type of loon).

So; frankly (no, surely not?), Ubuntu does, indeed, tedn to do things "differently", if by "differently" one means, at best, a subset of what Debian can do, and at worst, just about the same as putting a stirk til a cow
in season.

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

Re: Linux PPC build?

Post by richmond62 » Fri Mar 07, 2014 7:08 pm

Anyhow; tomorrow when I am:

1. More sober than I am right now (got sloshed and drank about half a litre of strong ginger tea as have a 'flu coming on me, and have a 2 hour grammar session to to teach to 6 spotty (and
by that I mean "mentally spotty").

2. Better (awful 'flu aches that gru me til gar).

I shall try a build on the PPC machine again with the mods I mentioned about 5 postings back.

Hey: you never know your luck.

Even if nothing else (!!!!) this exercise has shown me that I am both a "mental cripple" (a bit of political correctness there, NOT) and a loser not knowing anything of C++.

This is something I intend to spend some time remedying.

Mind you, of course, this does slightly beg the question about Livecode, doesn't it? [And that, grammar groupies, was a tag question.]

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 » Fri Mar 07, 2014 8:37 pm

Given what I read in the pdf, it seems that it's certainly *possible* to create a system that will produce ppc binaries on an Intel-native system. But you'd need separate libraries with a duplicate hierarchy in order to get things to compile properly. And if all that were working correctly, there are things you'd have to fiddle with in (at least) the makefiles and thirdparty library sources (the bigendian thing) in order to get the LC engine to compile. And, of course, any changes you make in the files would have to be protected against future pulls of updated files from the runrev repository. You'll no doubt have to learn how to deal with merging in git. If you were expecting this to be a weekend project, I leave you to your delusional state. You've embarked on a long learning process involving C coding, git, make files, the "where'd my files go" aspect of linux library directories, etc. And this is a Good Thing in its own right. But I expect there'll be much head-banging along the way. Since I no longer have a ppc system, all I can do is produce gedanken-experiments, nothing more useful.

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

Re: Linux PPC build?

Post by richmond62 » Sat Mar 08, 2014 9:50 am

Well, it is quite possible I'm slightly delusional; but by "weekend project" I do not mean "a project that lasts one weekend", I intend to spread my
delusion over several weekends.

Also, as this delusion is quite a long way down my list of delusions [a serious case of Maya Tattva], others which include:

1. I'm running an EFL school in Bulgaria.

2. I have a l-o-n-g translation from Bulgarian into English a publisher has just sent to me for redaction (style-editing) with
a Monday deadline.

3. I'm on the third SDC of my Devawriter Pro program.

4. I'm halfway through the first SDC of my PISMO program.

5. I'm just starting something for a load of Old and Middle English experts so they can type their thorns, wynns, eths and tironian what-have-yers
without wasting a hell of a lot of time with the "insert symbol" thang in most commonly tolerated office suites.

I'm going to have to do a lot of work with smoke and mirrors.

I am under no illusions that this will take a long time: after all, when I tried a simple build on the INTEL box at the start that wouldn't build either.

However, what I do know is that God likes a trier, and the most common representation of Shiva shows him squashing delusions underfoot [c.f. Mara],
and that it is not the getting there that is always the most important thing, it is the journey.

I have just finished my Saturday morning class, and am going home for some R & R and a spot of lunch, before I settle down to
try mucking around with the lcms.h file and then trying a "run". All you "fans", or possibly the types of people who gather after car accidents ( . . . LOL)
will be informed, either way.

This will take even longer than it should as, right now, delusion number 1 and a half is that 3 of the computers in my EFL school have to be loaded into
the car, taken home, and backed up followed by installation of new systems, and restoration of backed-up files.

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

Re: Linux PPC build?

Post by richmond62 » Sat Mar 08, 2014 5:28 pm

I had forgotten how elegant and simple Ubuntu alternate install disks were:
01.jpg
this is the simple and groovy partitioner.

Taking Mark Wieder's advice I am re-do-ing my school PCs (one a week = 10 weeks!)
with separate root partitions and home partitions.

Anyway; nearly finished my first one; then I can get started on the MacMini.

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

Re: Linux PPC build?

Post by richmond62 » Sun Mar 09, 2014 11:39 am

Well, "Hot patootie!" (whatever that means; c.f. The Rocky Horror Picture Show), here we are in downtown Denton (c.f. follow up to Rocky Horror):
BHM.png
well not quite: but I got badly distracted last night what with friends spontaneously popping in and then staying until after midnight.

Anyway; I've just chucked out my previous 'livecode' directory in my 'home' directory on the happy Linux PPC MacMini, and waiting white the "Gitty-bit" does its funky stuff
and downloads code from the mothership again.
Last edited by richmond62 on Sun Mar 09, 2014 12:25 pm, edited 2 times 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 » Sun Mar 09, 2014 11:53 am

OK: done the git clone.

Copied in the bits-n-bobs from the (abortive) INTEL build as per Fraser's instructions.

Edited the line in the lcms.h document.

Will try a ARCH=ppc MODE=release make development build.

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

Re: Linux PPC build?

Post by richmond62 » Sun Mar 09, 2014 11:56 am

readyToRock2.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 » Sun Mar 09, 2014 11:59 am

Familiar territory.png
So: I have to find where, Oh where, a LITTLE ENDIAN build is defined and comment that out.

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

Re: Linux PPC build?

Post by richmond62 » Sun Mar 09, 2014 12:11 pm

where_is_that1.png
notFunny.png
There does seem to be an odd mismatch between what the Terminal is telling me and what happens when I
start digging around with the File Browser [which, by-the-by, isn't much cop in LXDE as what is set as 'alphabetical' is
nothing of the sort].

Anyway, will crack open those 2 documents that Catfish found.

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

Re: Linux PPC build?

Post by richmond62 » Sun Mar 09, 2014 12:21 pm

joy1.png
Thanks Rodney Brown :P
where_its_at1.png
Possibly?

I'm attaching that document here in case some merciful mage knows how to shuffle things around.

Locked