Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.

Compiling Instructions #8

Closed
jpillora opened this issue Nov 12, 2013 · 9 comments
Closed

Compiling Instructions #8

jpillora opened this issue Nov 12, 2013 · 9 comments
Labels

Comments

@jpillora
Copy link

Hi Andrew,
I'm currently compiling v8ppc on an old debian PPC. For this node fork, do I just follow the instructions on the README? I have a feeling I need to incorporate the v8ppc build somehow?
Thanks
Jaime

@andrewlow
Copy link
Collaborator

The V8 code is from the https://github.com/andrewlow/v8ppc project. However, if you look closely at this repository https://github.com/andrewlow/node you'll see that there are two copies of V8 in the deps directory. [I did the work for you]

I did this so you could use the single repository to build both Intel and PPC versions of Node -- AND have 100% certainty that the Intel version is 100% identical to the version that comes from Joyent. (the v8ppc repo is almost identical, but not quite). Also having it integrated makes it really easy to build for folks like yourself.

The best place to figure out how to build things - it to look at the Jenkins server I have running in the open: http://v8ppc.osuosl.org:8080/ -- Hint - "make -j4 -e DESTCPU=ppc binary" is probably exactly what you want.

I will note, there are still issues with the Apple G4 chip ibmruntimes/v8ppc#97

@jpillora
Copy link
Author

I'm currently compiling your v8ppc project in an QEMU debian box (very slowwwww).

I think I'll cancel it and I'll give your node project a try, I currently don't have the hardware yet, it will be a MPC8541 chip I think, however I just wanted to see if your node project would run our app :) And also, would you happen to know of a nice way to test your the ppc build on an Intel Macbook?

I had a look at your Jenkins server, where abouts are the setup commands?

Thanks for doing this by the way!

@andrewlow
Copy link
Collaborator

You might be able to simply download a binary from the jenkins server and run it on your emulator.

Your goal to see if our node will run your app is sort of proven by the jenkins server. If your apps runs on any 0.10.21 node.js build then it'll probably work.

The following directions work on an Intel Linux machine to build the 'simulated' version of the PPC build.

$ git clone https://github.com/andrewlow/node.git
$ cd node
$ ./configure --dest-cpu=ppc
$ make -j 16

It unfortunately fails in my Intel Mac (it wasn't ever tested). This falls a bit outside the normal usage, but it'd be nice if it worked.

I need to do some work on the jenkins server to make it easier to access for 'read only' folk. You need to crawl through the console output of a job to figure out the commands (which can be done read-only) but you've got to figure out the sequence of commands used from that.

I haven't dug into the details, but you might run into similar issues with the MPC8541 that were reported here: ibmruntimes/v8ppc#93 -- of course, I'd like this to work everywhere if possible and will help as I can - but my primary focus is more recent Power architectures.

@jpillora
Copy link
Author

Hi Andrew, thanks for the tips, will give them a try tomorrow, 2am here in
Sydney :)

On Wednesday, November 13, 2013, Andrew Low wrote:

You might be able to simply download a binary from the jenkins server and
run it on your emulator.

Your goal to see if our node will run your app is sort of proven by the
jenkins server. If your apps runs on any 0.10.21 node.js build then it'll
probably work.

The following directions work on an Intel Linux machine to build the
'simulated' version of the PPC build.

$ git clone https://github.com/andrewlow/node.git
$ cd node
$ ./configure --dest-cpu=ppc
$ make -j 16

It unfortunately fails in my Intel Mac (it wasn't ever tested). This falls
a bit outside the normal usage, but it'd be nice if it worked.

I need to do some work on the jenkins server to make it easier to access
for 'read only' folk. You need to crawl through the console output of a job
to figure out the commands (which can be done read-only) but you've got to
figure out the sequence of commands used from that.

I haven't dug into the details, but you might run into similar issues with
the MPC8541 that were reported here: ibmruntimes/v8ppc#93ibmruntimes/v8ppc#93 of course, I'd like this to work everywhere if possible and will help as
I can - but my primary focus is more recent Power architectures.


Reply to this email directly or view it on GitHubhttps://github.com//issues/8#issuecomment-28298762
.

@jpillora
Copy link
Author

Hi Andrew,
I'm just testing this on a G5 Mac Pro (Debian) today, however it sounds it will work fine, though others might not. Based off a CPU datasheet, is there something I can look for that might give me a hint as to whether it will be compatible? We're currently looking into MPC8548/MPC841/P2020.

Cheers
Jaime

@andrewlow
Copy link
Collaborator

Well, we tested a G5 here in the lab and it should work.

In general terms the code is built to assume POWER5 architecture. If you can figure out which level architecture you're on we might be able to make a good guess http://en.wikipedia.org/wiki/Power_Architecture

So far the areas where we run into issues are: instruction cache size / flushing; and floating point instructions.

@jpillora
Copy link
Author

Ah I see, so it looks like all three are: http://en.wikipedia.org/wiki/PowerPC_e500 which looks newer than the POWER5, so would that mean that e500 would support the older instructions? Edit: I found the reference manual. Edit2: POWER5 is ISA 2.01 and e500 is ISA 2.03.

@andrewlow
Copy link
Collaborator

After I posted my last comment I did notice that the chips you're looking at are e500 based - and thus have the POWER5 instructions.

I'm going to guess that we might hit some instruction cache flushing issues, but hopefully that's just a matter of tweaking a few values.

Given that the G5 is somewhat behind the e500, you're in a reasonably good spot.

@jpillora
Copy link
Author

Ah excellent, that's hopeful to hear 😄 will close this and report back once we've received the hardware, thanks again!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants