problem building FileZilla 3.14.1 on OS X Yosemite

Moderator: Project members

Post Reply
Message
Author
rrll
504 Command not implemented
Posts: 6
Joined: 2016-01-20 18:48
First name: Randy
Last name: Randall

problem building FileZilla 3.14.1 on OS X Yosemite

#1 Post by rrll » 2016-01-21 19:01

I am trying to build FileZilla on OS X. However, I'm running into a problem with wxWidgets:

Code: Select all

checking for wx-config... /usr/local/bin/wx-config
checking for wxWidgets version >= 3.0.2 (--unicode=yes --universal=no)... yes (version 3.0.2)
checking for wxWidgets static library... no
checking positional printf argument support in wxWidgets... no
configure: error: in `/Users/Shared/filezilla-3.14.1':
configure: error: Positional printf argument support in wxWidgets is required by FileZilla. Please rebuild wxWidgets and pass --enable-printfposparam to its configure script.
See `config.log' for more details
I built wxWidgets with --enable-printfposparam, so this isn't it. Another user on this forum was getting the same error message, so (without comparing log files), I tried the first suggested solution, I did make uninstall on wxWidgets, then set the following env variables:

Code: Select all

export AS="as -arch i386 -mmacosx-version-min=10.7"
export LD="ld -arch i386 -macosx_version_min 10.7"
export CC="gcc -arch i386 -mmacosx-version-min=10.7"
export CXX="g++ -arch i386 -mmacosx-version-min=10.7 -stdlib=libc++"
and rebuilt wxWidgets (as before, with legacy WebKit):

Code: Select all

./configure --enable-printfposparam --enable-unicode
make
make install
However, when trying to ./configure FileZilla, I got the same error. The log file is attached.

I am new to building from source and I appreciate any help.
Attachments
config.log
(38.87 KiB) Downloaded 258 times

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

Re: problem building FileZilla 3.14.1 on OS X Yosemite

#2 Post by botg » 2016-01-21 19:29

Don't pass "-arch i386", that's for 32bit builds. These days all of OS X is 64bit.

Your compiler is broken, it does not default to any modern C++ standard. Try CXX="clang++ --std=c++14" to force it to use a modern C++ standard and recompile both wx and fz with it.

rrll
504 Command not implemented
Posts: 6
Joined: 2016-01-20 18:48
First name: Randy
Last name: Randall

Re: problem building FileZilla 3.14.1 on OS X Yosemite

#3 Post by rrll » 2016-01-21 22:16

I'm getting the same error. The log file is attached. Thank you.
Attachments
config.log
(35.07 KiB) Downloaded 267 times

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

Re: problem building FileZilla 3.14.1 on OS X Yosemite

#4 Post by botg » 2016-01-21 22:31

Please attach the config.log output of wxWidgets.

rrll
504 Command not implemented
Posts: 6
Joined: 2016-01-20 18:48
First name: Randy
Last name: Randall

Re: problem building FileZilla 3.14.1 on OS X Yosemite

#5 Post by rrll » 2016-01-21 22:49

Attached.
Attachments
config.log
(221.21 KiB) Downloaded 275 times

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

Re: problem building FileZilla 3.14.1 on OS X Yosemite

#6 Post by botg » 2016-01-21 22:52

Whoops, I see what's wrong. Argument only takes a single dash: CXX="clang++ -std=c++14"

rrll
504 Command not implemented
Posts: 6
Joined: 2016-01-20 18:48
First name: Randy
Last name: Randall

Re: problem building FileZilla 3.14.1 on OS X Yosemite

#7 Post by rrll » 2016-01-21 23:17

Same error. Here they are again.
Attachments
config.log
wxWidgets
(221.15 KiB) Downloaded 265 times
config.log
FileZilla
(35.02 KiB) Downloaded 251 times

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

Re: problem building FileZilla 3.14.1 on OS X Yosemite

#8 Post by botg » 2016-01-22 08:05

OS X 10.5 is too old. The most minimal OS X version you can build for is 10.7, everything older simply lacks [1] the runtime requirements.

Try compiling a simple test program, let's call it test.cpp:

Code: Select all

#include <type_traits>
#include <memory>
int main() {
  std::make_unique<int>();
  return 0;
}

Code: Select all

export CXX="clang++ -std=c++14"
$CXX -stdlib=libc++ test.cpp



[1] You could get around this by manually building an entire toolchain and statically link to the runtime libs, but that's out of scope

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

Re: problem building FileZilla 3.14.1 on OS X Yosemite

#9 Post by botg » 2016-01-22 19:33


rrll
504 Command not implemented
Posts: 6
Joined: 2016-01-20 18:48
First name: Randy
Last name: Randall

Re: problem building FileZilla 3.14.1 on OS X Yosemite

#10 Post by rrll » 2016-01-26 01:01

I had no problem compiling test.cpp, it gave me a.out.

But I got an error configuring wxWidgets:

Code: Select all

checking if C compiler (clang -mmacosx-version-min=10.7 -mmacosx-version-min=10.5) works with SDK/version options... yes
checking if C++ compiler (clang++ -std=c++14 -stdlib=libc++ -mmacosx-version-min=10.7 -mmacosx-version-min=10.5) works with SDK/version options... configure: error: in `/usr/local/src/wxWidgets-3.0.2':
configure: error: no.  Try a different SDK
The full log file is attached. I tried to make make everything go into --prefix="/usr/local/" so this was my environment (/usr/local/bin was already in PATH):

Code: Select all

export CC="clang -mmacosx-version-min=10.7"
export CXX="clang++ -std=c++14 -stdlib=libc++ -mmacosx-version-min=10.7"
export AS="as -mmacosx-version-min=10.7"
export LD="ld -macosx_version_min 10.7"
export CPPFLAGS="-I/usr/local/include"
export LDFLAGS="-L/usr/local/lib"
export LD_LIBRARY_PATH="/usr/local/lib"
export PKG_CONFIG_PATH="/usr/local/bin/pkg-config"
I tried following the updated instructions, making sure to use pkg-config 0.28 instead of 0.29, since I didn't have most of the dependencies installed when I first posted. Is it important to build everything with static libraries? I built the dependencies with shared libraries. But, since these are dependencies of FileZilla and not of wxWidgets, I figure it shouldn't have made a difference at this point...

Thank you!
Attachments
config.log
(65.18 KiB) Downloaded 265 times

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

Re: problem building FileZilla 3.14.1 on OS X Yosemite

#11 Post by botg » 2016-01-26 07:42

rrll wrote:checking if C++ compiler (clang++ -std=c++14 -stdlib=libc++ -mmacosx-version-min=10.7 -mmacosx-version-min=10.5) works with SDK/version options... configure: error: in `/usr/local/src/wxWidgets-3.0.2':
configure: error: no. Try a different SDK
botg wrote:OS X 10.5 is too old. The most minimal OS X version you can build for is 10.7, everything older simply lacks the runtime requirements.


rrll wrote:Is it important to build everything with static libraries? I built the dependencies with shared libraries.
If using shared libraries, they do not become part of the FileZilla application bundle. Since to my knowlege you cannot codesign standalone .so files it becomes impossible to run the built binaries to other computers without disabling application signature checks.
But, since these are dependencies of FileZilla and not of wxWidgets, I figure it shouldn't have made a difference at this point...
Correct

rrll
504 Command not implemented
Posts: 6
Joined: 2016-01-20 18:48
First name: Randy
Last name: Randall

Re: problem building FileZilla 3.14.1 on OS X Yosemite

#12 Post by rrll » 2016-01-26 22:06

Success! I don't know how the second -mmacosx-version-min snuck in there, but here's what got rid of it:

Code: Select all

./configure --prefix="/usr/local/" --disable-shared --disable-webkit --disable-webview --with-macosx-version-min=10.7
After that, I was able to build FileZilla, and it's looking good.

Re shared libraries - does that mean that with shared libraries, I could have a problem if I build FileZilla on one computer and then put the binary on another computer - but as long as only one computer is involved, it should be ok? Since I put shared libraries in /usr/local/, I think that means that they are safe from interference by other installations, but I'm very new to this so I could easily be missing something.

Thank you!

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

Re: problem building FileZilla 3.14.1 on OS X Yosemite

#13 Post by botg » 2016-01-26 22:54

If you don't distribute the binaries you shouldn't run into problems when using shared libraries.

Post Reply