Page 1 of 1

problem building FileZilla 3.14.1 on OS X Yosemite

Posted: 2016-01-21 19:01
by rrll
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.

Re: problem building FileZilla 3.14.1 on OS X Yosemite

Posted: 2016-01-21 19:29
by botg
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.

Re: problem building FileZilla 3.14.1 on OS X Yosemite

Posted: 2016-01-21 22:16
by rrll
I'm getting the same error. The log file is attached. Thank you.

Re: problem building FileZilla 3.14.1 on OS X Yosemite

Posted: 2016-01-21 22:31
by botg
Please attach the config.log output of wxWidgets.

Re: problem building FileZilla 3.14.1 on OS X Yosemite

Posted: 2016-01-21 22:49
by rrll
Attached.

Re: problem building FileZilla 3.14.1 on OS X Yosemite

Posted: 2016-01-21 22:52
by botg
Whoops, I see what's wrong. Argument only takes a single dash: CXX="clang++ -std=c++14"

Re: problem building FileZilla 3.14.1 on OS X Yosemite

Posted: 2016-01-21 23:17
by rrll
Same error. Here they are again.

Re: problem building FileZilla 3.14.1 on OS X Yosemite

Posted: 2016-01-22 08:05
by botg
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

Re: problem building FileZilla 3.14.1 on OS X Yosemite

Posted: 2016-01-22 19:33
by botg

Re: problem building FileZilla 3.14.1 on OS X Yosemite

Posted: 2016-01-26 01:01
by rrll
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!

Re: problem building FileZilla 3.14.1 on OS X Yosemite

Posted: 2016-01-26 07:42
by botg
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

Re: problem building FileZilla 3.14.1 on OS X Yosemite

Posted: 2016-01-26 22:06
by rrll
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!

Re: problem building FileZilla 3.14.1 on OS X Yosemite

Posted: 2016-01-26 22:54
by botg
If you don't distribute the binaries you shouldn't run into problems when using shared libraries.