Anyone have any experience with [porting?] build environments? (Linux -> OSX)

scootermaster

Platinum Member
Nov 29, 2005
2,411
0
0
So, I work a lot with the Open64 compiler. Normally my workflow involves remotely connecting to my lab computer, but I'd love (read: LOVE LOVE LOVE) to be able to use it natively in OSX. Before you say "good luck", I don't actually need to use the compiler. Sort of.

My work messes around with .B (WHIRL, if you're curious) files. These are an intermediate representation that the front end of Open64 produces. So I certainly don't need the compiler to actually "work" under OSX (i.e. I need no backend, code generation or "a.out").

The only thing I need are some external codes that deal with these .B files that are, as best as I can tell, compiled with g++. The problem is, they're linked against all sorts of Open64 libraries, and I can't figure out how the heck to get it work under OSX. I'm not super familiar with complex build environments (i.e. multiple levels of makefiles, etc). I don't understand why the OSX g++ wouldn't happily compile these files as long as the appropriate files were included/linked against. Ideally, I'd also like to compile the front end of the compiler, in order to produce .B files, but I'm hoping I can just copy them from a Linux install to my OSX install and they'll work.

Anyway, anyone have any experience doing this sort of thing, have any tips they can offer, or think they might want to help? This is valuable enough to me I'd consider paying someone to help me if they think they can do it.
 
Last edited:

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Have you tried getting Open64 compiled and setup on OS X? It sounds like you might have a simpler time doing that then trying to wedge only specific parts of it into your system.
 

scootermaster

Platinum Member
Nov 29, 2005
2,411
0
0
Have you tried getting Open64 compiled and setup on OS X? It sounds like you might have a simpler time doing that then trying to wedge only specific parts of it into your system.

I have, but only by typing "install / make".

Perhaps I wasn't clear (shocker!!). What I need isn't really part of Open64 at all. They're separate tools (even in the Open64 source tree, they're in ir_tools directories). They're not at all platform dependent, and as I said, they're compiled by g++, not Open64 itself. In fact, I've never actually gotten the entirety of Open64 to compile, even on Linux. Now that they use pre-packaged [linux] binaries, I use those to generate .B files, and then use the IR tools that I've written to manipulate them. Before that, a colleague (who's good at this sort of thing) got the front end to compile (which is actually based on/is gcc's front end), so I could generate .B files that way.

So even back then, when I didn't have the whole compiler up and running (or, errr, compiled) I'd managed to get these external tools working. In short, they're not part of the compiler chain (Front end -> optimizations -> back end -> code generation, etc).

They're separate binaries that really do nothing more than handle the binary manipulation of opening a .B file, and then are linked against a ton of Whirl manipulation functions.

So I really feel like this is just an environment thing. If I could get the makefiles and includes and all of that to work (which I have done on Linux) it shouldn't be a problem. I'm sure someone with knowledge like this could spend some time and get Open64 to run on Mac OS (they're porting it to Solaris, for example, with good results). It's just a matter of making sure the binaries produced are of the right form (dealing with things like Spin, and other stuff I don't understand).

But I don't even need that.

For the record, when I do compile it, the only errors I get are things like it not being able to find "elf.h" and whatnot (which is another gcc/linux thing dealing with...well, I'm not exactly sure.)

Make any more sense? Like I said, this is very valuable to me, and assuming i could get working .B files (either directly from my linux install of Open64, or getting the FE to compile under OSX) in addition to my IR tools, I'd be willing to pay for some help.