Howto: Compiling FileZilla 3 under Windows

Moderator: Project members

Message
Author
FileGamer
450 Internal Error
Posts: 38
Joined: 2014-08-16 06:26

Re: Howto: Compiling FileZilla 3 under Windows

#181 Post by FileGamer » 2014-10-04 03:52

botg wrote:Let's start with your environment first.

Do you have the PATH, CPPFLAGS, LDFLAGS and PKG_CONFIG_PATH variables set as mentioned in the guide? Note that these variables need to be set anew if you ever close the shell.
I'm using an Oracle VM VirtualBox which saves the machine state whenever I close it. Does that still apply? I did issue those commands at the beginning of the whole thing as a normal user, but they didn't return anything like a note or success message or anything? Should they have? I even issued them again before installing wxWidgets this time and no difference.

Now I'm getting this too:

libgnutls 3.1.12 greater was not found. You can get it from http://gnutls.org/

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

Re: Howto: Compiling FileZilla 3 under Windows

#182 Post by botg » 2014-10-04 07:22

I did issue those commands at the beginning of the whole thing as a normal user, but they didn't return anything like a note or success message or anything?
That's normal. The return code of each command can be accessed through the $? special parameter.
libgnutls 3.1.12 greater was not found. You can get it from http://gnutls.org/
At least now it detects wx properly as the GnuTLS check comes later.

Try this:

Code: Select all

export PKG_CONFIG_PATH="$HOME/prefix-win32/lib/pkgconfig"

FileGamer
450 Internal Error
Posts: 38
Joined: 2014-08-16 06:26

Re: Howto: Compiling FileZilla 3 under Windows

#183 Post by FileGamer » 2014-10-04 21:35

botg wrote:
I did issue those commands at the beginning of the whole thing as a normal user, but they didn't return anything like a note or success message or anything?
That's normal. The return code of each command can be accessed through the $? special parameter.
libgnutls 3.1.12 greater was not found. You can get it from http://gnutls.org/
At least now it detects wx properly as the GnuTLS check comes later.

Try this:

Code: Select all

export PKG_CONFIG_PATH="$HOME/prefix-win32/lib/pkgconfig"
Thank you. We're getting closer. Now we're up to compiling errors of Filezilla itself that I've tried to do:

viewtopic.php?f=3&t=17085&p=127220#p127220

keeproll
500 Command not understood
Posts: 1
Joined: 2014-12-10 13:36
First name: Ku
Last name: Je-woong

Re: Howto: Compiling FileZilla 3 under Windows

#184 Post by keeproll » 2014-12-10 13:51

FileGamer wrote:
botg wrote:You may or may not have to start over. Only trying it out will bring clarity.
[Is there like a pre-compiled compiler I can download for Filezilla where its just enter the filezilla directory and it will compile it into the necessary executables.
Yes, that's what the guide does. But it's not working for you for some reason.
I've been having trouble finding an older version of the compiler. Do you happen to have a link?
Hi, there?

Do you solved this problem?

I'm just completed compiling.
cc1plus.exe stop working problem still present, but I solved.

That problem related the '-std=gnu++11' options in Makefile.

The 'aboutdialog.cpp' file (maybe first file occurring cc1plus.exe problem) have to complie "-std=c++11'
and the other file have to compile "-std=gnu++11".

So, check the below steps.
1. change gnu++11 to c++11 the Makefile in filezilla/src/interface directory
2. make
3. aboutdialog.cpp is OK. but second error file is asksavepassworddialog.cpp stop woring cc1plus.exe
4. rechange c++11 to gnu++11 the Makefile in filezilla/src/interface directory
5. At this time. you never run "make clean", only make again.
6. check working good.

reply your opinion or send email to me if you have any question.

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

Re: Howto: Compiling FileZilla 3 under Windows

#185 Post by botg » 2014-12-11 08:42

Far simpler alternative workaround: Configure with --disable-precomp

FileGamer
450 Internal Error
Posts: 38
Joined: 2014-08-16 06:26

Re: Howto: Compiling FileZilla 3 under Windows

#186 Post by FileGamer » 2014-12-19 06:52

keeproll wrote: Hi, there?

Do you solved this problem?

I'm just completed compiling.
cc1plus.exe stop working problem still present, but I solved.

That problem related the '-std=gnu++11' options in Makefile.

The 'aboutdialog.cpp' file (maybe first file occurring cc1plus.exe problem) have to complie "-std=c++11'
and the other file have to compile "-std=gnu++11".

So, check the below steps.
1. change gnu++11 to c++11 the Makefile in filezilla/src/interface directory
2. make
3. aboutdialog.cpp is OK. but second error file is asksavepassworddialog.cpp stop woring cc1plus.exe
4. rechange c++11 to gnu++11 the Makefile in filezilla/src/interface directory
5. At this time. you never run "make clean", only make again.
6. check working good.

reply your opinion or send email to me if you have any question.
I gave up on compiling in Windows. I ended up making a Debian Jessie VM and compiling Filezilla in that.

JeanA
504 Command not implemented
Posts: 8
Joined: 2015-09-09 17:51
First name: Jean

Re: Howto: Compiling FileZilla 3 under Windows

#187 Post by JeanA » 2015-09-09 18:35

Are there any plans to update the Wiki pages for compiling FileZilla Client on Windows?

The current wiki pages (both the main and the msys2 version) seem to pre-date the following changes mentioned for 3.13 and higher:
  • FileZilla now requires a C++14 compiler
  • FileZilla now uses pugixml instead of TinyXML
  • Official binaries now link against GnuTLS 3.4.4
  • Official binaries now link against SQLite 3.8.11.1
I've tried making those changes (plus the nettle dependency) myself and changing the scripts that reference those various versions/directories. And changing the filezilla configure to use --with-pugixml=builtin instead of --with-tinyxml=builtin. I've gotten the farthest on the msys2 instructions (newer gcc compiler).

I ran into problems compiling gnutls:

Code: Select all

In file included from srptool-args.c:43:0:
srptool-args.h:49:30: fatal error: autoopts/options.h: No such file or directory
compilation terminated.
So I tried updating from gnutls 3.4.4 to 3.4.4.1 and added --enable-local-libopts based on various forum postings.

I'm now able to get past all the dependency compiles but get the following error when trying to compile FileZilla itself:

Code: Select all

../engine/libengine.a(libengine_a-tlssocket.o): In function `ZN10CTlsSocket15CopySessionDataEPKS_':
C:\msys64\home\jean\filezilla\src\engine/tlssocket.cpp:408: undefined reference to `_imp__gnutls_free'
collect2.exe: error: ld returned 1 exit status
I suspect that error may be related to adding --enable-local-libopts but I wasn't able to compile gnutls without it.

Any help would be greatly appreciated.

Thanks,
jean

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

Re: Howto: Compiling FileZilla 3 under Windows

#188 Post by botg » 2015-09-09 19:32

It should suffice to build and install the lib directory of GnuTLS, the other stuff isn't needed. As for the undefined reference when linking, edit gnutls.h and remove the _SYM_EXPORT part from the gnutls_free declaration.

JeanA
504 Command not implemented
Posts: 8
Joined: 2015-09-09 17:51
First name: Jean

Re: Howto: Compiling FileZilla 3 under Windows

#189 Post by JeanA » 2015-09-09 22:21

botg wrote:edit gnutls.h and remove the _SYM_EXPORT part from the gnutls_free declaration.
That worked great. Thank you!

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

Re: Howto: Compiling FileZilla 3 under Windows

#190 Post by botg » 2015-09-11 14:32

I've updated the wiki pages.

JeanA
504 Command not implemented
Posts: 8
Joined: 2015-09-09 17:51
First name: Jean

Re: Howto: Compiling FileZilla 3 under Windows

#191 Post by JeanA » 2015-09-14 19:20

Thank you for the updated instructions. I did try starting over and using them.

Regarding:

Code: Select all

rm /mingw32/i686-w64-mingw32/lib/libpthread.dll.a
rm /mingw32/i686-w64-mingw32/lib/libwinpthread.dll.a
rm /mingw64/x86_64-w64-mingw32/lib/libpthread.dll.a
rm /mingw64/x86_64-w64-mingw32/lib/libpthread.dll.a
I assume that last line should be:

Code: Select all

rm /mingw64/x86_64-w64-mingw32/lib/libwinpthread.dll.a
I tried replacing

Code: Select all

tar xf zlib-1.2.8
with

Code: Select all

tar xf zlib-1.2.8.tar.gz
but was unable to configure zlib using those instructions.

Code: Select all

$ ./configure --prefix="$HOME/prefix" --static
Checking for gcc...
Please use win32/Makefile.gcc instead.
** ./configure aborting.
In the end, I used steps based on the original msys2 instructions:

Code: Select all

cd ~
git clone https://github.com/rexdf/build_filezilla_on_msys2.git
cp build_filezilla_on_msys2/*.patch ~
cd ~
git clone https://github.com/Alexpux/MINGW-packages.git
cd ~/MINGW-packages
git apply ../mingw-w64-zlib.patch
cd mingw-w64-zlib
makepkg-mingw -sLf
cp mingw-w64-i686-zlib-1.2.8-9-any.pkg.tar.xz ~/
cd ~
tar axvf mingw-w64-i686-zlib-1.2.8-9-any.pkg.tar.xz -C "$HOME/prefix" --transform 's,^mingw32/,./,' --strip-components=1
Regardless of following these new instructions or the older ones for msys2, I ended up getting the same error during the filezilla (3.13.1) make:

Code: Select all

make[3]: Entering directory '/home/jean/filezilla/src/fzshellext/32'
/bin/sh ./libtool  --tag=CXX   --mode=compile i686-w64-mingw32-g++ -DHAVE_CONFIG_H -I. -I/home/jean/filezilla/src/fzshellext  \
    -I./.. -I/home/jean/build/include  -fno-exceptions -fno-rtti -g -O2 -Wall -g -std=gnu++14 -MT libfzshellext_la-shellext.lo -MD -MP -MF \
    .deps/libfzshellext_la-shellext.Tpo -c -o libfzshellext_la-shellext.lo `test -f 'shellext.cpp' || echo '/home/jean/filezilla/src/fzshellext/'`shellext.cpp
libtool: Version mismatch error.  This is libtool 2.4.2 Debian-2.4.2-1.11, but the
libtool: definition of this LT_INIT comes from libtool 2.4.6.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2 Debian-2.4.2-1.11
libtool: and run autoconf again.
Makefile:498: recipe for target 'libfzshellext_la-shellext.lo' failed
make[3]: *** [libfzshellext_la-shellext.lo] Error 63
make[3]: Leaving directory '/home/jean/filezilla/src/fzshellext/32'
Makefile:376: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/jean/filezilla/src/fzshellext/32'
Makefile:409: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/jean/filezilla/src'
Makefile:593: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
I tried, unsuccessfully, to follow various instructions on resolving that error including the steps listed on http://stackoverflow.com/questions/2878 ... iblinphone in some combination or another both in the filezilla directory and its src/fzshellext subdirectory.

Skipping the autoreconf line ended up working but I assume there are better ways.
Last edited by botg on 2015-09-14 19:43, edited 2 times in total.
Reason: Added line-breaks

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

Re: Howto: Compiling FileZilla 3 under Windows

#192 Post by botg » 2015-09-14 19:51

JeanA wrote:

Code: Select all

rm /mingw32/i686-w64-mingw32/lib/libpthread.dll.a
rm /mingw32/i686-w64-mingw32/lib/libwinpthread.dll.a
rm /mingw64/x86_64-w64-mingw32/lib/libpthread.dll.a
rm /mingw64/x86_64-w64-mingw32/lib/libpthread.dll.a
I assume that last line should be:

Code: Select all

rm /mingw64/x86_64-w64-mingw32/lib/libwinpthread.dll.a
Thanks, fixed.
I tried replacing

Code: Select all

tar xf zlib-1.2.8
with

Code: Select all

tar xf zlib-1.2.8.tar.gz
but was unable to configure zlib using those instructions.
Oops, yes, that's the correct replacement.

Code: Select all

$ ./configure --prefix="$HOME/prefix" --static
Checking for gcc...
Please use win32/Makefile.gcc instead.
** ./configure aborting.
That's strange. What's the output of the following command for you?

Code: Select all

uname -a

Regardless of following these new instructions or the older ones for msys2, I ended up getting the same error during the filezilla (3.13.1) make:

Code: Select all

make[3]: Entering directory '/home/jean/filezilla/src/fzshellext/32'
/bin/sh ./libtool  --tag=CXX   --mode=compile i686-w64-mingw32-g++ -DHAVE_CONFIG_H -I. -I/home/jean/filezilla/src/fzshellext  \
    -I./.. -I/home/jean/build/include  -fno-exceptions -fno-rtti -g -O2 -Wall -g -std=gnu++14 -MT libfzshellext_la-shellext.lo -MD -MP -MF \
    .deps/libfzshellext_la-shellext.Tpo -c -o libfzshellext_la-shellext.lo `test -f 'shellext.cpp' || echo '/home/jean/filezilla/src/fzshellext/'`shellext.cpp
libtool: Version mismatch error.  This is libtool 2.4.2 Debian-2.4.2-1.11, but the
libtool: definition of this LT_INIT comes from libtool 2.4.6.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2 Debian-2.4.2-1.11
libtool: and run autoconf again.
Makefile:498: recipe for target 'libfzshellext_la-shellext.lo' failed
make[3]: *** [libfzshellext_la-shellext.lo] Error 63
make[3]: Leaving directory '/home/jean/filezilla/src/fzshellext/32'
Makefile:376: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/jean/filezilla/src/fzshellext/32'
Makefile:409: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/jean/filezilla/src'
Makefile:593: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
Did you get the FileZilla sources from the 3.13.1 tarball or where does your source originate from? Did you run autoreconf -i?

JeanA
504 Command not implemented
Posts: 8
Joined: 2015-09-09 17:51
First name: Jean

Re: Howto: Compiling FileZilla 3 under Windows

#193 Post by JeanA » 2015-09-14 20:11

Code: Select all

$ uname -a
MINGW32_NT-6.1 ZZZ 2.3.0(0.290/5/3) 2015-09-11 13:29 x86_64 Msys
The new wiki no longer mentions it, but I was using the shortcut named "MinGW-w64 Win32 Shell" as indicated in the earlier msys2 instructions. Running Windows 7 64-bit.

The libtool mismatch error I mentioned was when I DID run autoreconf -i. Removing it allowed the make command to finish without that error.

I'm not sure if it means anything, but after running autoreconf -i, the m4/libtool.m4 file had "serial 58 LT_INIT" in it and the src/m4/libtool.m4 still had "serial 57 LT_INIT". I tried copying all the *.m4 files that autoreconf updated in the m4 directory to the src/m4 directory so that they'd match but that didn't help either.

I had also tried running aclocal in both ~/filezilla and ~/filezilla/src/fzshellext prior to running autoreconf -i.

The source code was originally from a downloaded FileZilla_3.13.1_src.tar.bz2 file.

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

Re: Howto: Compiling FileZilla 3 under Windows

#194 Post by botg » 2015-09-14 20:32

Code: Select all

$ uname -a
MINGW32_NT-6.1 ZZZ 2.3.0(0.290/5/3) 2015-09-11 13:29 x86_64 Msys
The new wiki no longer mentions it, but I was using the shortcut named "MinGW-w64 Win32 Shell" as indicated in the earlier msys2 instructions. Running Windows 7 64-bit.
Ah, that explains it. Ever since, I've manually entered the full path to the MSYS batch file in the MSYS(2) directory into the Win+R prompt.

Please try configuring zlib with ./configure --prefix="$HOME/prefix" --static -u=GNU
I'm not sure if it means anything, but after running autoreconf -i, the m4/libtool.m4 file had "serial 58 LT_INIT" in it and the src/m4/libtool.m4 still had "serial 57 LT_INIT". I tried copying all the *.m4 files that autoreconf updated in the m4 directory to the src/m4 directory so that they'd match but that didn't help either.
There's an m4 directory in the src subdirectory? That shouldn't be. I'll investigate.

JeanA
504 Command not implemented
Posts: 8
Joined: 2015-09-09 17:51
First name: Jean

Re: Howto: Compiling FileZilla 3 under Windows

#195 Post by JeanA » 2015-09-14 20:56

botg wrote:Please try configuring zlib with ./configure --prefix="$HOME/prefix" --static -u=GNU
That worked. Thank you! Much more elegant than the workaround.

So would the original configure command have worked if I had been using the one labeled "MSYS2 Shell" which references the msys2_shell.bat file?

Post Reply