Compiling on Mac OS X Tiger

Moderator: Project members

Message
Author
jdratlif
226 Transfer OK
Posts: 392
Joined: 2008-12-30 10:30
First name: John
Last name: Ratliff
Location: In a small white padded room.

Compiling on Mac OS X Tiger

#1 Post by jdratlif » 2008-12-30 20:58

edit: Compilation instructions are on the wiki now: Compiling FileZilla 3 under Mac OS X -- Please consult the Wiki as the directions here are outdated.
edit: New Binary Versions http://wiki.filezilla-project.org/Unofficial_Binaries

The official builds only work on Leopard due to some library thing. Since I don't have leopard, I had to compile my own. It seems many people have had trouble doing this, so I thought I'd share my thoughts.

You will need many, many, many things.

Xcode 2.5
http://connect.apple.com/cgi-bin/WebObj ... leID=19907

The FileZilla Source (FileZilla_3.1.6_src.tar.bz2)
http://filezilla-project.org/download.php?type=client

wxWidgets 2.8.9 for Mac (wxMac-2.8.9.tar.gz)
http://www.wxwidgets.org/downloads/

GNU lib idn (libidn-1.11.tar.gz)
http://ftp.gnu.org/gnu/libidn/

GNU TLS (I used gnutls-2.6.3.tar.bz2)
http://ftp.gnu.org/gnu/gnutls/

This patch for gnutls (thanks botg).
http://filezilla-project.org/codesquid/gnutls.patch

libgcrypt (libgcrypt-1.4.3.tar.bz2)
ftp://ftp.gnupg.org/gcrypt/libgcrypt/

libgpg-error (libgpg-error-1.7.tar.bz2)
ftp://ftp.gnupg.org/gcrypt/libgpg-error/

GNU gettext (gettext-0.17.tar.gz)
http://ftp.gnu.org/gnu/gettext/

You will need to install Xcode first. Don't forget the BSD Developer Subsystem and the Command Line Tools in the Xcode installer. After that's done, start Terminal. It's in the Utilities folder. Now we need to compile all the those archives we downloaded.

Code: Select all

username $ cd /tmp
username $ bzip2 -cd ~/Desktop/FileZilla_3.1.6_src.tar.bz2 | tar x&
username $ gzip -cd ~/Desktop/wxMac-2.8.9.tar.gz | tar x&
username $ gzip -cd ~/Desktop/libidn-1.11.tar.gz | tar x&
username $ bzip2 -cd ~/Desktop/gnutls-2.6.3.tar.bz2 | tar x&
username $ bzip2 -cd ~/Desktop/libgcrypt-1.4.3.tar.bz2 | tar x&
username $ bzip2 -cd ~/Desktop/libgpg-error-1.7.tar.bz2 | tar x&
username $ gzip -cd ~/Desktop/gettext-0.17.tar.gz | tar x&
Now we have all the source archives extracted in the /tmp directory. We'll start by building libidn since it doesn't depend on any of the others.

Code: Select all

username $ cd /tmp/libidn-1.11
username $ ./configure --disable-shared --prefix /usr/local
username $ make
username $ sudo make install
To build gnutls, we need libgcrypt, which in turn needs libgpg-error. So we'll build libgpg-error next.

Code: Select all

username $ cd /tmp/libgpg-error-1.7
username $ ./configure --disable-shared --prefix /usr/local
username $ make
username $ sudo make install
Now we can build libgcrypt.

Code: Select all

username $ cd /tmp/libgcrypt-1.4.3
username $ ./configure --disable-shared --with-gpg-error-prefix=/usr/local --prefix /usr/local
username $ make
username $ sudo make install
We can now finally build gnutls.

Code: Select all

username $ cd /tmp/gnutls-2.6.3
username $ patch < ~/Desktop/gnutls.patch
username $ ./configure --disable-shared --with-libgcrypt-prefix=/usr/local --prefix /usr/local
username $ make
username $ sudo make install
Now we need to fix a problem with libgnutls-config because it forgets it needs zlib.

Code: Select all

username $ cd /usr/local/bin
username $ sudo nano -w libgnutls-config
There is a line near the top that looks like this:

Code: Select all

gnutls_libs="-L${exec_prefix}/lib -lgnutls  -L/usr/local/lib -lgcrypt -lgpg-error  "
Change it to look like this (you're adding -lz at the end)

Code: Select all

gnutls_libs="-L${exec_prefix}/lib -lgnutls  -L/usr/local/lib -lgcrypt -lgpg-error -lz "
Note the space between -lz and the closing quote. It MUST be there. Next we can compile GNU gettext.

Code: Select all

username $ cd /tmp/gettext-0.17
username $ ./configure --disable-shared --prefix /usr/local
username $ make
username $ sudo make install
Almost done. It's now time to compile wxWidgets.

Code: Select all

username $ cd /tmp
username $ mkdir build-wx
username $ cd build-wx
username $ ../wxMac-2.8.9/configure --disable-shared --disable-compat26 --enable-unicode --prefix /usr/local/wxMac-2.8.9
username $ make
username $ sudo make install
Okay, we're finally ready to compile FileZilla.

Code: Select all

username $ cd /tmp/filezilla-3.1.6
username $ export PATH=/usr/local/bin:/usr/local/wxMac-2.8.9/bin:$PATH
username $ ./configure --disable-shared --prefix /usr/local
username $ make
username $ mv FileZilla.app ~/Desktop
You should now have an up-to-date FileZilla app bundle on your Desktop.
Last edited by jdratlif on 2009-06-28 21:53, edited 7 times in total.
http://jdrrant.blogspot.com/ - CODEpendent Blog

User avatar
botg
Site Admin
Posts: 35552
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Compiling on Mac OS X Tiger

#2 Post by botg » 2008-12-30 21:17

Please add it to the wiki so it doesn't get lost. See http://wiki.filezilla-project.org/Compi ... er_Windows how it could look like.

jdratlif
226 Transfer OK
Posts: 392
Joined: 2008-12-30 10:30
First name: John
Last name: Ratliff
Location: In a small white padded room.

Re: Compiling on Mac OS X Tiger

#3 Post by jdratlif » 2008-12-30 23:36

botg wrote:Please add it to the wiki so it doesn't get lost. See http://wiki.filezilla-project.org/Compi ... er_Windows how it could look like.
http://wiki.filezilla-project.org/Compi ... r_Mac_OS_X

Should I be concerned that a wiki search for Mac doesn't return that page, but Compiling or Tiger does?
http://jdrrant.blogspot.com/ - CODEpendent Blog

User avatar
botg
Site Admin
Posts: 35552
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Compiling on Mac OS X Tiger

#4 Post by botg » 2008-12-31 00:11

If I might make a suggestion, it's generally not a good idea to directly install stuff into /usr/local without using your system's package manager (granted, OS X has none).

For all my development works I use a custom prefix and set the required environment variables accordingly. (See http://wiki.filezilla-project.org/Compi ... tion_flags and http://wiki.filezilla-project.org/Compi ... _variables)

jdratlif
226 Transfer OK
Posts: 392
Joined: 2008-12-30 10:30
First name: John
Last name: Ratliff
Location: In a small white padded room.

Re: Compiling on Mac OS X Tiger

#5 Post by jdratlif » 2008-12-31 03:27

botg wrote:If I might make a suggestion, it's generally not a good idea to directly install stuff into /usr/local without using your system's package manager (granted, OS X has none).

For all my development works I use a custom prefix and set the required environment variables accordingly. (See http://wiki.filezilla-project.org/Compi ... tion_flags and http://wiki.filezilla-project.org/Compi ... _variables)
I'm not sure what you mean here.

Are you saying all packages should be installed /usr/local/pkgname? Qt's default install path is /usr/local/Trolltech/Qt-version. I setup wxWidgets similarly as /usr/local/wxMac-2.8.9, but I left everything else in /usr/local.

That's pretty much what was done in msys, though granted, msys is self-contained, so it's not really the same.
http://jdrrant.blogspot.com/ - CODEpendent Blog

User avatar
botg
Site Admin
Posts: 35552
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Compiling on Mac OS X Tiger

#6 Post by botg » 2008-12-31 10:38

Personally I install absolutely everything that doesn't use the system's package manager into a subdir in my home directory. Does not clutter the system and does not affect other users at all.

User avatar
boco
Contributor
Posts: 26931
Joined: 2006-05-01 03:28
Location: Germany

Re: Compiling on Mac OS X Tiger

#7 Post by boco » 2008-12-31 20:37

I'm doing that, too, with Filezilla in Kubuntu, as Kubuntu Hardy package is way behing the latest version.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

jdratlif
226 Transfer OK
Posts: 392
Joined: 2008-12-30 10:30
First name: John
Last name: Ratliff
Location: In a small white padded room.

Re: Compiling on Mac OS X Tiger

#8 Post by jdratlif » 2008-12-31 21:03

botg wrote:Personally I install absolutely everything that doesn't use the system's package manager into a subdir in my home directory. Does not clutter the system and does not affect other users at all.
Okay, that's a good point. I will change it; probably later today.
boco wrote:I'm doing that, too, with Filezilla in Kubuntu, as Kubuntu Hardy package is way behing the latest version.
How far is way behind? Gentoo stable x86 is using 3.1.3, but unstable has 3.1.6 if I wanted to grab it.
http://jdrrant.blogspot.com/ - CODEpendent Blog

User avatar
boco
Contributor
Posts: 26931
Joined: 2006-05-01 03:28
Location: Germany

Re: Compiling on Mac OS X Tiger

#9 Post by boco » 2008-12-31 22:07

jdratlif wrote:
boco wrote:I'm doing that, too, with Filezilla in Kubuntu, as Kubuntu Hardy package is way behing the latest version.
How far is way behind? Gentoo stable x86 is using 3.1.3, but unstable has 3.1.6 if I wanted to grab it.
I have to add: Last time I checked it was way behind. Using the binary from filezilla-project.org since.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

da chicken
226 Transfer OK
Posts: 619
Joined: 2005-11-02 06:41

Re: Compiling on Mac OS X Tiger

#10 Post by da chicken » 2008-12-31 22:22


jdratlif
226 Transfer OK
Posts: 392
Joined: 2008-12-30 10:30
First name: John
Last name: Ratliff
Location: In a small white padded room.

Re: Compiling on Mac OS X Tiger

#11 Post by jdratlif » 2009-01-01 09:39

Okay, I changed the wiki page to use the $HOME directory.

Happy New Year!

P.S. I am more than happy to supply unofficial Mac OS X Tiger builds for FileZilla if someone will drop me a line when a new release is out.
http://jdrrant.blogspot.com/ - CODEpendent Blog

User avatar
botg
Site Admin
Posts: 35552
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Compiling on Mac OS X Tiger

#12 Post by botg » 2009-01-01 16:40

One more suggestion: $HOME might contain spaces. So you need to properly quote every argument involving $HOME, or it will be interpreted as several arguments. Same applies to all other environment variables (e.g. $PATH)

jdratlif
226 Transfer OK
Posts: 392
Joined: 2008-12-30 10:30
First name: John
Last name: Ratliff
Location: In a small white padded room.

Re: Compiling on Mac OS X Tiger

#13 Post by jdratlif » 2009-01-01 19:10

botg wrote:One more suggestion: $HOME might contain spaces. So you need to properly quote every argument involving $HOME, or it will be interpreted as several arguments. Same applies to all other environment variables (e.g. $PATH)
Good catch. It's fixed now. I try very hard to avoid spaces in my paths, so I wouldn't have thought of that.
http://jdrrant.blogspot.com/ - CODEpendent Blog

User avatar
botg
Site Admin
Posts: 35552
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Compiling on Mac OS X Tiger

#14 Post by botg » 2009-01-01 22:00

Nice guide, too bad I can never test it ;)

jdratlif
226 Transfer OK
Posts: 392
Joined: 2008-12-30 10:30
First name: John
Last name: Ratliff
Location: In a small white padded room.

Re: Compiling on Mac OS X Tiger

#15 Post by jdratlif » 2009-01-02 01:04

botg wrote:Nice guide, too bad I can never test it ;)
Thanks.

Don't you have Leopard? The guide should work the same, although you would be better off with a newer Xcode probably.
http://jdrrant.blogspot.com/ - CODEpendent Blog

Post Reply