Trilokavijaya
asked on
Compiling LINUX apps for OS X w/ SCONS
Here's an easy one from a somewhat mac n00b: Compiling w/ SCONS (python based comp. tool).
I have a few linux apps that are a nessisity for my NetSec degree, and would like to re-compile them for os x. How would I do this w/ SCONS? One of the most needed is nmap: http://sourceforge.net/projects/nmap-scanner/
I have no programming experience w/ very little scripting exp, and therefore don't know how to create the python script needed (the "SConstruct" file for SCONS to compile).
Could an expert please post a walkthrough on this...
In particular how does one creat the SConstruct file with multiple source files in the app's dir?
I have a few linux apps that are a nessisity for my NetSec degree, and would like to re-compile them for os x. How would I do this w/ SCONS? One of the most needed is nmap: http://sourceforge.net/projects/nmap-scanner/
I have no programming experience w/ very little scripting exp, and therefore don't know how to create the python script needed (the "SConstruct" file for SCONS to compile).
Could an expert please post a walkthrough on this...
In particular how does one creat the SConstruct file with multiple source files in the app's dir?
There is a project called fink (http://www.finkproject.org) that has ported many popular linux apps and utilities to OS X. nmap is included as should most of the apps you would need - http://pdb.finkproject.org/pdb/browse.php?summary=nmap
ASKER
I appreciate the valued link. Fink has come accross my desk before, and as I'm not doubting that there's compilied packages, I would still like to learn compiling with SCONS.
Hi Trilokavijaya. Firstly, I have to say that I am very new to scons. I have learned from you that it exists -- thanks ;)
From the scons documentation (http://www.scons.org/doc/0.97/HTML/scons-user/c251.html) the SConstruct is a normal text file. Just use your favourite text editor to create it and type the command inside. There is a minimal example in the doc:
Program('hello.c')
This is for a C program of that name. Then you have to run the scons utility in the directory where the SConstruct file is located. It will find the SConstruct file and it will use the content.
I suggest to subscribe to the scons mailing list through the http://www.scons.org/lists.php page (or directly through the mailto:users-subscribe@sco ns.tigris. org).
Anyway, I would try the first example from the above doc (the hello.c) just to ensure that you have installed scons correctly and that it works for you. After (un)successfull compilation of the hello.c example you will have more questions.
From the scons documentation (http://www.scons.org/doc/0.97/HTML/scons-user/c251.html) the SConstruct is a normal text file. Just use your favourite text editor to create it and type the command inside. There is a minimal example in the doc:
Program('hello.c')
This is for a C program of that name. Then you have to run the scons utility in the directory where the SConstruct file is located. It will find the SConstruct file and it will use the content.
I suggest to subscribe to the scons mailing list through the http://www.scons.org/lists.php page (or directly through the mailto:users-subscribe@sco
Anyway, I would try the first example from the above doc (the hello.c) just to ensure that you have installed scons correctly and that it works for you. After (un)successfull compilation of the hello.c example you will have more questions.
ASKER
pepr,
np on the heads up on such a sweat compiling prog.
My question still abides in the the "vi'ing a fresh SConcstruct" method...I can't simply call to a single file...there's tons of .sh files in the dir, i have to dig a touch deeper...
If you somehow can get a consistent way to compile more complex progs than the hello world exam[ple, please post it.
Why not try out nmap? it's a small prog, and would be a great excersice to help out.
BTW, this is a SCONS thread, not nmap...yes, fink carries the package...however fink doesn't compile scons, and fink doesn't offer much selection only 1700 progs...run of the mill unix, ie. "fetchmail"...and is far behind on the security sector, with unfulfilled packages for apps like "wireshark," etc...
MacAnthony, as skillful as your answer is as a workaround for installing nmap, people need to become more aware as to the awesome compiling prowess of SCONS, and add their advices pertaining to such.
Arigato{u}.
np on the heads up on such a sweat compiling prog.
My question still abides in the the "vi'ing a fresh SConcstruct" method...I can't simply call to a single file...there's tons of .sh files in the dir, i have to dig a touch deeper...
If you somehow can get a consistent way to compile more complex progs than the hello world exam[ple, please post it.
Why not try out nmap? it's a small prog, and would be a great excersice to help out.
BTW, this is a SCONS thread, not nmap...yes, fink carries the package...however fink doesn't compile scons, and fink doesn't offer much selection only 1700 progs...run of the mill unix, ie. "fetchmail"...and is far behind on the security sector, with unfulfilled packages for apps like "wireshark," etc...
MacAnthony, as skillful as your answer is as a workaround for installing nmap, people need to become more aware as to the awesome compiling prowess of SCONS, and add their advices pertaining to such.
Arigato{u}.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.