Compile a cross-server UNIX FTP program

Apr 20, '04 09:31:00AM

Contributed by: RawData

A prior hint, Perform direct site-to-site FTP with any FTP client involved using Transmit which, at least for me, can be quite confusing. There was one app that I used on Linux called pftpfxp that worked quite well. You can get it to compile cleanly on OS X ... first download it from tanesha.net. There's a little problem, however, compiling it on OS X, because it uses the pthreads library. On OS X we don't use it, because threads are already built into the Darwin kernel, so you should edit the Makefile and remove the reference to the pthreads lib.

So, just save pftpfxp anywhere in your hard drive, open a shell in Terminal, and cd into that dir, like cd ~/Desktop (if that's where you saved it). Then do tar xvzf pftpfxp-v0.11.4mew6.tgz to extract three folders:

mIRC-mew
pftpfxp-autoconnect
pftpfxp-mew
The only one that matters to compile the client is pftpfxp-mew, so do this:
 $ cd ~/Desktop/pftpfxp-mew/
 $ ./configure bsd
Read the rest of the hint for the remainder of the how-to...

Now you have to edit the resulting Makefile file in the src dir:

pico ~/Desktop/pftpfxp-mew/src/Makefile
On the third line, there's an entry that reads:
LINKFLAGS       = -pthread -lpanel -lncurses
Just delete the -pthread reference, and hit Control-O and Control-X to save and exit from pico. At the prompt, issue a make static (or in case you want a dynamic binary, make dynamic). This should compile cleanly, well kinda ... but don't worry about the warnings. Remember that after compiling, you should edit the file config in the pftpfxp-mew/.pftp directory to reflect your settings -- like this:
pico ~/Desktop/pftpfxp-mew/.pftp/config
Notice that the folder .pftp should always reside one level below where the pftp binary is. This file is self-explanatory, but for those of you just wanting to give it a try, edit the entry labeled OKAYDIR and point it to some existing folder like making a temp under where the pftp binary is:
mkdir /Users/your-user-name/Desktop/pftpfxp-mew/temp
Leaving the OKAYDIR entry like this:
OKAYDIR=/Users/your-user-name/Desktop/pftpfxp-mew/temp
I advise in reading the README.MEW and the keymap files under the .pftp folder. Have fun!

Comments (5)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20040413105107877