Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Compile a cross-server UNIX FTP program UNIX
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!
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[9,510 views]  

Compile a cross-server UNIX FTP program | 5 comments | Create New Account
Click here to return to the 'Compile a cross-server UNIX FTP program' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Compile a cross-server UNIX FTP program
Authored by: mzs on Apr 20, '04 11:46:09AM
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.

I just wanted to clarify this so people do not get confused. Yes Darwin is multithreaded (inherently so in fact because it is based on Mach) but this has nothing to do with the -pthread option really. Darwin is the kernel though not a user-level thread library. In fact the earliest version of MacOS X server did not even have a pthreads library, you were supposed to use the old cthreads library or mach threads directly! The -pthread option to the compiler toolchain is a common thing on some systems. What it does is it tells the compiler driver to use the appropriate options/libraries/macro definitions to compile/link/preprocess multithreaded code linked with pthreads. On MacOS X the pthreads library is part of the system library automatically linked with all applications and everything has been precompiled in an MT-safe manner, so there is no need for any special options for using pthreads. You can verify this yourself, there is a /usr/lib/libpthread.dylib symlink so that you can link with -lpthread (as you probably should) and it points to libSystem.dylib which is like libc plus a whole bunch of other libraries all in one.

[ Reply to This | # ]

Compile a cross-server UNIX FTP program
Authored by: fds on Apr 20, '04 12:03:39PM

A highly customizable command-line ftp client I can recommend is LFTP. Setting it up on Panther is a simple

./configure && make && sudo make

without any additional dependencies. It too supports direct site-to-site transfers (fxp), ftp over ssl, http downloads, and since 3.0 even sftp (ssh2).



[ Reply to This | # ]
Compile a cross-server UNIX FTP program
Authored by: fds on Apr 20, '04 12:06:03PM
oops. make the last part of that a sudo make install of course.

[ Reply to This | # ]
Compile a cross-server UNIX FTP program
Authored by: RawData on Apr 20, '04 03:33:47PM

Not with an ncurses interface and the handy features pftp has. :-)



[ Reply to This | # ]
You could also try gftp
Authored by: ethomas on Apr 21, '04 04:56:05AM
gFTP is a free multithreaded ftp client for *NIX based machines running X11R6 or later. It has the following features:
  • Distributed under the terms of the GNU Public License Agreement
  • Written in C and has a text interface and a GTK+ 1.2/2.x interface
  • Supports the FTP, FTPS (control connection only), HTTP, HTTPS and SSH protocols
  • FTP and HTTP proxy server support
  • Supports FXP file transfers (transfering files between 2 remote servers via FTP)
  • Supports UNIX, EPLF, Novell, MacOS, VMS, MVS and NT (DOS) style directory listings
  • Bookmarks menu to allow you to quickly connect to remote sites
  • Fully Internationalized
Both gFTP and LFTP are available through Fink.

[ Reply to This | # ]