Cross compiling FileZilla on Linux for Windows

Need help with FileZilla Client? Something does not work as expected? In this forum you may find an answer.

Moderator: Project members

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

Re: Cross compiling FileZilla on Linux for Windows

#16 Post by botg » 2023-01-17 16:43

You are already past lib, all the rest after just isn't needed. So you can continue with cd lib && make install

winzilla
450 Internal Error
Posts: 36
Joined: 2023-01-14 19:31

Re: Cross compiling FileZilla on Linux for Windows

#17 Post by winzilla » 2023-01-17 20:42

Ah, good to know, thanks.
Now it gets all the way to cross compiling filezilla itself - really close!

It's failing on some of the final linking:

Code: Select all

libtool: link: x86_64-w64-mingw32-g++ -std=c++17 -I/root/prefix/lib/wx/include/x86_64-w64-mingw32-msw-unicode-3.0 -I/root/prefix/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -g -O2 -Wall -Wl,--subsystem -Wl,windows -mwindows resources/filezilla.o -Wl,--dynamicbase -Wl,--nxcompat -Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1 -Wl,--major-os-version -Wl,6 -Wl,--minor-os-version -Wl,1 -Wl,--image-base -Wl,0x120000000 -o .libs/filezilla.exe filezilla-aboutdialog.o filezilla-asksavepassworddialog.o filezilla-asyncrequestqueue.o filezilla-aui_notebook_ex.o filezilla-bookmarks_dialog.o filezilla-buildinfo.o filezilla-chmoddialog.o filezilla-clearprivatedata.o filezilla-cmdline.o filezilla-commandqueue.o filezilla-conditionaldialog.o filezilla-context_control.o filezilla-customheightlistctrl.o filezilla-defaultfileexistsdlg.o filezilla-dialogex.o filezilla-dndobjects.o filezilla-dragdropmanager.o filezilla-dropsource.o filezilla-drop_target_ex.o filezilla-edithandler.o filezilla-encoding_converter.o filezilla-export.o filezilla-fileexistsdlg.o filezilla-filelistctrl.o filezilla-filelist_statusbar.o filezilla-FileZilla.o filezilla-filter_manager.o filezilla-filter_conditions_dialog.o filezilla-filteredit.o filezilla-file_utils.o filezilla-fzputtygen_interface.o filezilla-graphics.o filezilla-import.o filezilla-infotext.o filezilla-inputdialog.o filezilla-led.o filezilla-listctrlex.o filezilla-listingcomparison.o filezilla-list_search_panel.o filezilla-local_recursive_operation.o filezilla-locale_initializer.o filezilla-LocalListView.o filezilla-LocalTreeView.o filezilla-loginmanager.o filezilla-Mainfrm.o filezilla-manual_transfer.o filezilla-menu_bar.o filezilla-msgbox.o filezilla-netconfwizard.o filezilla-Options.o filezilla-option_change_event_handler.o filezilla-overlay.o filezilla-power_management.o filezilla-queue.o filezilla-queue_storage.o filezilla-QueueView.o filezilla-queueview_failed.o filezilla-queueview_successful.o filezilla-quickconnectbar.o filezilla-recentserverlist.o filezilla-recursive_operation_status.o filezilla-remote_recursive_operation.o filezilla-RemoteListView.o filezilla-RemoteTreeView.o filezilla-renderer.o filezilla-search.o filezilla-serverdata.o settings/filezilla-optionspage.o settings/filezilla-optionspage_connection.o settings/filezilla-optionspage_connection_active.o settings/filezilla-optionspage_connection_ftp.o settings/filezilla-optionspage_connection_passive.o settings/filezilla-optionspage_connection_sftp.o settings/filezilla-optionspage_dateformatting.o settings/filezilla-optionspage_debug.o settings/filezilla-optionspage_edit.o settings/filezilla-optionspage_edit_associations.o settings/filezilla-optionspage_fileexists.o settings/filezilla-optionspage_filelists.o settings/filezilla-optionspage_filetype.o settings/filezilla-optionspage_ftpproxy.o settings/filezilla-optionspage_interface.o settings/filezilla-optionspage_language.o settings/filezilla-optionspage_logging.o settings/filezilla-optionspage_passwords.o settings/filezilla-optionspage_proxy.o settings/filezilla-optionspage_sizeformatting.o settings/filezilla-optionspage_themes.o settings/filezilla-optionspage_transfer.o settings/filezilla-optionspage_updatecheck.o settings/filezilla-settingsdialog.o filezilla-sftp_crypt_info_dlg.o filezilla-sitemanager.o filezilla-sitemanager_controls.o filezilla-sitemanager_dialog.o filezilla-sitemanager_site.o filezilla-sizeformatting.o filezilla-speedlimits_dialog.o filezilla-splitter.o filezilla-state.o filezilla-statusbar.o filezilla-statuslinectrl.o filezilla-StatusView.o filezilla-systemimagelist.o filezilla-textctrlex.o filezilla-themeprovider.o filezilla-timeformatting.o filezilla-toolbar.o filezilla-treectrlex.o filezilla-update_dialog.o filezilla-verifycertdialog.o filezilla-verifyhostkeydialog.o filezilla-view.o filezilla-viewheader.o filezilla-volume_enumerator.o filezilla-welcome_dialog.o filezilla-window_state_manager.o filezilla-wrapengine.o wxext/filezilla-spinctrlex.o filezilla-wxfilesystem_blob_handler.o filezilla-xh_text_ex.o filezilla-xmlfunctions.o filezilla-xrc_helper.o  ../commonui/.libs/libfzclient-commonui-private.dll.a /root/src/fz/src/engine/.libs/libfzclient-private.dll.a -L/root/prefix/lib ../engine/.libs/libfzclient-private.dll.a /root/prefix/lib/libfilezilla.dll.a /root/prefix/lib/libgnutls.dll.a -lcrypt32 -lnettle -lhogweed /root/prefix/lib/libgmp.dll.a -liphlpapi -lwx_mswu_aui-3.0 -lwx_mswu_xrc-3.0 -lwx_mswu_adv-3.0 -lwx_mswu_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu-3.0 /root/prefix/lib/libsqlite3.dll.a -lpthread -lnormaliz -lole32 -luuid -lnetapi32 -lmpr -lpowrprof -lws2_32 -lshlwapi -L/root/prefix/lib
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lwx_mswu_aui-3.0: No such file or directory
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lwx_mswu_xrc-3.0: No such file or directory
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lwx_mswu_adv-3.0: No such file or directory
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lwx_mswu_core-3.0: No such file or directory
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lwx_baseu_xml-3.0: No such file or directory
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lwx_baseu-3.0: No such file or directory
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:1134: filezilla.exe] Error 1
make[4]: Leaving directory '/root/src/fz/src/interface'
make[3]: *** [Makefile:3132: all-recursive] Error 1
make[3]: Leaving directory '/root/src/fz/src/interface'
make[2]: *** [Makefile:979: all] Error 2
make[2]: Leaving directory '/root/src/fz/src/interface'
make[1]: *** [Makefile:437: all-recursive] Error 1
make[1]: Leaving directory '/root/src/fz/src'
make: *** [Makefile:635: all-recursive] Error 1
Full log attached as well.
Attachments
fzlog.txt
(4.52 MiB) Downloaded 39 times

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

Re: Cross compiling FileZilla on Linux for Windows

#18 Post by botg » 2023-01-17 23:20


winzilla
450 Internal Error
Posts: 36
Joined: 2023-01-14 19:31

Re: Cross compiling FileZilla on Linux for Windows

#19 Post by winzilla » 2023-01-18 01:48

That patch did the trick, everything compiles successfully now, and it gets all the way through.

Now that I can successfully compile it and build a working installer, I've been trying to change the timeout settings to see if I can change that properly. I've been trying for an hour or two and I think I must be missing something simple. I've grepped "imeout" in the source directory and I seem to have touched everywhere timeout stuff appears. I was able to change the UI to say 1-9999 instead of 10-9999, but nothing else seems to have changed. It still auto-defaults to a minimum of 10, if greater than 0, strangely. Additionally, the log message I changed hasn't changed.

I wasn't rebooting between uninstalls/installs initially, but I went ahead and uninstalled, rebooted, and installed again, and it seems to be the same case.

I speculate you didn't want this changed anyways, but does anything I've done stand out as wrong here? Otherwise, I'm going to continue tweaking and see if I can get things to change:

Code: Select all

root@ubuntu:~/src/fz# svn diff
Index: src/engine/controlsocket.cpp
===================================================================
--- src/engine/controlsocket.cpp        (revision 10845)
+++ src/engine/controlsocket.cpp        (working copy)
@@ -192,7 +192,9 @@
                                        log(logmsg::status, _("Directory listing successful"));
                                }
                                else {
-                                       log(logmsg::status, _("Directory listing of \"%s\" successful"), currentPath_.GetPath());
+                                       int timeout2 = engine_.GetOptions().get_int(OPTION_TIMEOUT);
+                                       //log(logmsg::status, _("Directory listing of \"%s\" successful"), currentPath_.GetPath());
+                                       log(logmsg::error, _("Directory listing timeout %d"), timeout2);
                                }
                        }
                        break;
Index: src/engine/engine_options.cpp
===================================================================
--- src/engine/engine_options.cpp       (revision 10845)
+++ src/engine/engine_options.cpp       (working copy)
@@ -16,10 +16,10 @@
                { "Last resolved IP", L"", option_flags::normal, 100 },
                { "No external ip on local conn", true, option_flags::normal },
                { "Pasv reply fallback mode", 0, option_flags::normal, 0, 2 },
-               { "Timeout", 20, option_flags::normal, 0, 9999, [](int& v)
+               { "Timeout", 15, option_flags::normal, 0, 9999, [](int& v)
                        {
-                               if (v && v < 10) {
-                                       v = 10;
+                               if (v && v < 0) {
+                                       v = 1;
                                }
                                return true;
                        }
Index: src/interface/settings/optionspage_connection.cpp
===================================================================
--- src/interface/settings/optionspage_connection.cpp   (revision 10845)
+++ src/interface/settings/optionspage_connection.cpp   (working copy)
@@ -43,7 +43,7 @@
                impl_->timeout_ = new wxTextCtrlEx(box, nullID, wxString(), wxDefaultPosition, wxSize(lay.dlgUnits(22), -1));
                impl_->timeout_->SetMaxLength(4);
                row->Add(impl_->timeout_, lay.valign);
-               row->Add(new wxStaticText(box, nullID, _("(10-9999, 0 to disable)")), lay.valign);
+               row->Add(new wxStaticText(box, nullID, _("(1-9999, 0 to disable)")), lay.valign);
                inner->Add(new wxStaticText(box, nullID, _("If no data is sent or received during an operation for longer than the specified time, the connection will be closed and FileZilla will try to reconnect.")));
        }
        {
@@ -105,8 +105,8 @@
 bool COptionsPageConnection::Validate()
 {
        auto const timeout = fz::to_integral<int>(impl_->timeout_->GetValue().ToStdWstring(), -1);
-       if (timeout != 0 && (timeout < 10 || timeout > 9999)) {
-               return DisplayError(impl_->timeout_, _("Please enter a timeout between 10 and 9999 seconds or 0 to disable timeouts."));
+       if (timeout != 0 && (timeout < 0 || timeout > 9999)) {
+               return DisplayError(impl_->timeout_, _("Please enter a timeout between 1 and 9999 seconds or 0 to disable timeouts."));
        }

        auto const retries = fz::to_integral<int>(impl_->tries_->GetValue().ToStdWstring(), -1);

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

Re: Cross compiling FileZilla on Linux for Windows

#20 Post by botg » 2023-01-18 08:40

Such a change is very ill-advised and causes excess transfer failures on slow servers, slow internet connections, busy servers, rotating harddiscs and just randomly because the internet is a lot less reliable than people think it is.

winzilla
450 Internal Error
Posts: 36
Joined: 2023-01-14 19:31

Re: Cross compiling FileZilla on Linux for Windows

#21 Post by winzilla » 2023-01-18 11:42

I am aware that's how you feel about it, but that's just not the case for me, which I say since I've been dealing with this for years. Transfers are either instant or always time out. I need to make this change to make the program usable for the scenarios I actually encounter. Of course the actual timeout can still be set, just now to any value.

Do you have any thoughts on the change itself, technically rather than philosophically? Or at a glance, should this type of thing be sufficient?

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

Re: Cross compiling FileZilla on Linux for Windows

#22 Post by botg » 2023-01-18 12:17

Have you tried out to instead find the offending firewall or NAT router in your network that silently drops connections?

winzilla
450 Internal Error
Posts: 36
Joined: 2023-01-14 19:31

Re: Cross compiling FileZilla on Linux for Windows

#23 Post by winzilla » 2023-01-18 12:21

This only seems to happen with VPSes in the cloud. It doesn't happen when accessing hosts over site-to-site tunnels that I have set up or other hosts on my network.
For that reason, I think it's the provider, just like as mentioned on that thread. Seems to be common, unfortunately. Other people I know have complained about the same issue.

I know that would be the proper fix, to actually fix the silent dropping, and the connection drops aren't really FileZilla's fault, but I don't have control over what everyone else is doing, and almost certainly won't get anywhere with that. I'd rather just have it be able to cope with whatever gets thrown at it.

winzilla
450 Internal Error
Posts: 36
Joined: 2023-01-14 19:31

Re: Cross compiling FileZilla on Linux for Windows

#24 Post by winzilla » 2023-01-19 02:08

It appears that it wasn't actually restarting the computer that mattered, it was running "make clean". I'd made all the necessary code changes already.

For some reason, just running "make" again doesn't seem to be sufficient to recompile everything properly. Perhaps some of the files that needed to be recompiled weren't getting recompiled, possible Makefile issue. Not really going to look into that further. Would explain why basic changes I'd made didn't seem to be getting reflected.

I do hope you'll reconsider your position and make it possible to use FileZilla with broken network firewalls in the official version. Until then, at least I have a version that is functional for me. I'll distribute it to others who are having the same issue as I am. Thanks again for your help.

winzilla
450 Internal Error
Posts: 36
Joined: 2023-01-14 19:31

Re: Cross compiling FileZilla on Linux for Windows

#25 Post by winzilla » 2023-01-19 02:26

One other last comment:

I do notice that upon initial connection, it does take longer to connect, and so 1 is certainly too low of a timeout setting for that, and it will never successfully connect.

On an existing connection, there is no problem with 1 as the timeout, as it's super fast once a connection is open.

So perhaps there really should be 2 timeout settings: one for the initial connection/reconnection, and one for using an existing connection.

Your concern makes sense for the former case, although a setting of 4 or 5 seconds still works fine for that, and for the latter any value down to 1 works fine.

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

Re: Cross compiling FileZilla on Linux for Windows

#26 Post by boco » 2023-01-20 12:33

I'll distribute it to others who are having the same issue as I am.
You can do that, but please, do it in compliance with the license. Thanks.
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

Post Reply