Hi, this is my first time posting here so any suggestions on improvement is greatly appreciated.
Now to my problem:
I have received a c++ program from a third-party company.
To compile it, they have included a Makefile with a couple of basic commands. Now my local computer that I'm working on is using "
Mac OS X 10.6.5" and my server is running "
SunOS 5.11 snv_111b i86pc i386 i86pc (from uname -a)".
I can run the make install command on my mac and move the files to the server computer but there I am unable to run the program. The error I'm getting is either "
cannot execute binary file" or "
cannot execute [Exec format error]" depending on which user ofc.
I've found a lot of people saying to
test use the "ldd" command, I've tried that as well with "
unsupported or unknown file type" as response.
Also tried the file command, in mac it returns: "
Mach-O 64-bit executable x86_64" and on my SunOS server just "
data".
I am unable to run the make install command on the server due to "make: Fatal error: Don't know how to make target".
I'm guessing that when I'm running the Makefile on my mac it compiles the program for mac somehow, but can't understand why I can't run the Makefile on the server.
I need to somehow either be able to compile it on the server or compile it for another os on my local computer?
An erorr I'm getting when trying to run the Makefile with a different command is: "
sh: line 1: /usr/bin/g++: not found
*** Error code 127".
I currently do not have the root password for the server.
I haven't been working with unix-based system very long.
*Edit*
To clearify what I'm wondering is,
Is it so that a Mach-O file is not supposed to be able to run on SunOS? Is it something I can easily change or does it have to be compiled on SunOS to be run on SunOS?
Do I need g++ to run a file compiled by it?
I can't find the g++ in the /bin/ on the server, does SunOS use that as standard or does it use something else?
Can I assume that if I'd told the server administrator to install g++ I'd be able to run the makefile compile the program and then I'd be able to run it? Or am I missing something completely here?
Also I'd like to get a greater understanding for how these things actually work.