OpenIndiana Filezillaのビルド

OpenIndiana Filezillaのビルド

2020年2月7日
OpenIndiana

 UNIX系OSの定番ソフトの中に、FTPソフトFilezillaがあるが、OpenIndiana Hipster 2019.10は、パッケージとしては無いようである。
 同様のソフトとしてgFTPのパッケージは登録されているが、できればFilezillaを使いたい。そうなると、自分でソースコードを取得してビルドする必要がある。
 今回、一応、ビルドに成功したので手順を以下に記載する。今のところ、次の2点問題がある。

・サイトマネージャーでBackSpace、Deleteキーが使えない。
・ファイルをドラッグした際に、ファイルをドラッグした様子が画面上で確認で移動できない。
 ファイルをドラッグして正常にFTP転送できるが、ドラッグしたことが画面上わからない。

 この2点を除けば、日本語表示なども正常だった。
 参考にしたのは、[OpenIndiana-discuss] Filezilla 3.41.2 GUIのメール。
 configureでビルド手順ファイルであるMakefileなどを作成するが、コンパイル、リンクに必要なインクルードファイルやライブラリが適切に指定されていないとビルドに失敗してしまい、要注意である。色々、パッケージをインストール、アンインストールを繰り返したので抜けている部分や要らない部分もあるかもしれない。

$ sudo pkg install gcc-7 gnu-binutils system/header object-file autoconf pkg-config
$ which gcc
/usr/bin/gcc
$ which g++
/usr/bin/g++
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/gcc/7/lib/gcc/i386-pc-solaris2.11/7.5.0/lto-wrapper
Target: i386-pc-solaris2.11
Configured with: /jenkins/jobs/oi-userland/workspace/components/developer/gcc-7/gcc-gcc-7.5.0-oi-0/configure CC=/usr/gcc/6/bin/gcc CXX=/usr/gcc/6/bin/g++ F77=/usr/gcc/6/bin/gfortran FC=/usr/gcc/6/bin/gfortran CFLAGS=-O2 CXXFLAGS=-O2 FFLAGS='  -O3 ' FCFLAGS=-O2 LDFLAGS=-m32 PKG_CONFIG_PATH=/usr/lib/pkgconfig --prefix=/usr/gcc/7 --mandir=/usr/gcc/7/share/man --bindir=/usr/gcc/7/bin --libdir=/usr/gcc/7/lib --sbindir=/usr/gcc/7/sbin --sbindir=/usr/gcc/7/bin --libdir=/usr/gcc/7/lib --libexecdir=/usr/gcc/7/lib --host i386-pc-solaris2.11 --build i386-pc-solaris2.11 --target i386-pc-solaris2.11 --with-pkgversion='OpenIndiana 7.5.0-il-0' --with-bugurl=https://bugs.openindiana.org --without-gnu-ld --with-ld=/usr/bin/ld --with-build-time-tools=/usr/gnu/i386-pc-solaris2.11/bin --with-gnu-as --with-as=/usr/bin/gas LDFLAGS=-R/usr/gcc/7/lib --enable-plugins --enable-objc-gc --enable-initfini-array --enable-languages=c,c++,fortran,lto,objc --disable-libitm enable_frame_pointer=yes
Thread model: posix
gcc version 7.5.0 (OpenIndiana 7.5.0-il-0)

 最新のFileZilla Clientのバージョンは、3.46.3でwxWidgets GUI libraryのバージョンが3.0系のものを必要とするようなのでJoyent Packages Documentation – Install On Illumosで登録されているwxGTK30-3.0.4nb3をインストールする。
 OpenIndiana関連のリポジトリImage Packaging System (IPS)のpkgコマンドでは、2.8.12と3.1.3が登録されているが3.0系のバージョンは登録されていないのでpkginコマンドでインストールする。

$ pkg search wxwidgets
INDEX                ACTION VALUE                                      PACKAGE
pkg.summary          set    wxWidgets A cross-platform GUI toolkit     pkg:/library/graphics/wxwidgets@2.8.12-2018.0.0.1
pkg.summary          set    wxWidgets - Cross-Platform GUI Library     pkg:/library/graphics/wxwidgets-3@3.1.3-2019.0.0.1
com.oracle.info.name set    wxwidgets                                  pkg:/library/graphics/wxwidgets@2.8.12-2018.0.0.1
pkg.fmri             set    openindiana.org/library/graphics/wxwidgets pkg:/library/graphics/wxwidgets@2.8.12-2018.0.0.1
$ pkgin search wxwidgets
wxGTK30-3.0.4nb3     Cross-platform wxWidgets GUI library
wxGTK28-contrib-2.8.12nb13  Contrib libraries for wxWidgets GTK
wxGTK28-2.8.12nb18   GTK-based implementation of the wxWidgets GUI library
py27-wxWidgets-2.8.12.0nb13  Python bindings for wxWidgets
p5-Wx-Perl-ProcessStream-0.32nb29  Access IO of external processes via events from WxWidgets
p5-Wx-0.9932nb9      Perl5 interface to the wxWidgets cross-platform GUI toolkit
p5-Alien-wxWidgets-0.69nb8  Building, finding and using wxWidgets binaries
$ sudo pkgin install wxGTK30-3.0.4nb3
パスワード:
pkg_summary.xz                                                    100% 2173KB 310.4KB/s   00:07
calculating dependencies...done.

14 packages to install:
  at-spi2-core-2.33.2nb1 py37-expat-3.7.5 py37-cElementTree-3.7.5 orc-0.4.31
  gobject-introspection-1.62.0 check-0.13.0nb1 libepoxy-1.5.3 hicolor-icon-theme-0.17
  desktop-file-utils-0.24 at-spi2-atk-2.33.2 gtk3+-3.24.12 gstreamer1-1.16.1
  gst-plugins1-base-1.16.1 wxGTK30-3.0.4nb3

0 to refresh, 0 to upgrade, 14 to install
49M to download, 201M to install

proceed ? [Y/n]
at-spi2-core-2.33.2nb1.tgz                                        100%  318KB 318.4KB/s   00:01
py37-expat-3.7.5.tgz                                              100%   37KB  37.2KB/s   00:00
py37-cElementTree-3.7.5.tgz                                       100%   42KB  42.1KB/s   00:00
orc-0.4.31.tgz                                                    100%  334KB 333.8KB/s   00:01
gobject-introspection-1.62.0.tgz                                  100% 1760KB 879.8KB/s   00:02
check-0.13.0nb1.tgz                                               100%  107KB 106.7KB/s   00:01
libepoxy-1.5.3.tgz                                                100%  935KB 935.0KB/s   00:01
hicolor-icon-theme-0.17.tgz                                       100%   13KB  13.5KB/s   00:00
desktop-file-utils-0.24.tgz                                       100%   89KB  89.0KB/s   00:01
at-spi2-atk-2.33.2.tgz                                            100%  106KB 105.6KB/s   00:00
gtk3+-3.24.12.tgz                                                 100%   24MB   1.0MB/s   00:24
gstreamer1-1.16.1.tgz                                             100% 5000KB 833.4KB/s   00:06
gst-plugins1-base-1.16.1.tgz                                      100% 5645KB 332.0KB/s   00:17
wxGTK30-3.0.4nb3.tgz                                              100%   11MB 851.9KB/s   00:13
installing at-spi2-core-2.33.2nb1...
at-spi2-core-2.33.2nb1: copying /opt/local/share/examples/at-spi2-core/at-spi2/accessibility.conf to /opt/local/etc/at-spi2/accessibility.conf
at-spi2-core-2.33.2nb1: copying /opt/local/share/examples/at-spi2-core/xdg/autostart/at-spi-dbus-bus.desktop to /opt/local/etc/xdg/autostart/at-spi-dbus-bus.desktop
installing py37-expat-3.7.5...
installing py37-cElementTree-3.7.5...
installing orc-0.4.31...
installing gobject-introspection-1.62.0...
installing check-0.13.0nb1...
installing libepoxy-1.5.3...
installing hicolor-icon-theme-0.17...
installing desktop-file-utils-0.24...
installing at-spi2-atk-2.33.2...
installing gtk3+-3.24.12...
installing gstreamer1-1.16.1...
installing gst-plugins1-base-1.16.1...
installing wxGTK30-3.0.4nb3...
pkg_install warnings: 0, errors: 0
reading local summary...
processing local summary...
marking wxGTK30-3.0.4nb3 as non auto-removable

 また、gmp、libidn、gettext、gnutlsも同様にpkginコマンドでインストールする。

$ sudo pkgin install gmp libidn gettext gnutls
calculating dependencies...done.

12 packages to install:
  gettext-tools-0.20.1 gettext-m4-0.20.1nb1 gettext-asprintf-0.20.1 p11-kit-0.23.15 nettle-3.5.1
  libunistring-0.9.10 libtasn1-4.14nb1 libcfg+-0.7.0 gmp-6.1.2 libidn-1.34nb1 gettext-0.20.1
  gnutls-3.6.11.1

0 to refresh, 0 to upgrade, 12 to install
15M to download, 47M to install

proceed ? [Y/n]
gmp-6.1.2.tgz                                                     100%  874KB 874.0KB/s   00:01
libidn-1.34nb1.tgz                                                100%  324KB 323.5KB/s   00:01
gettext-tools-0.20.1.tgz                                          100% 4189KB   1.4MB/s   00:03
gettext-m4-0.20.1nb1.tgz                                          100%   53KB  52.9KB/s   00:01
gettext-asprintf-0.20.1.tgz                                       100%   55KB  54.6KB/s   00:00
gettext-0.20.1.tgz                                                100%   34KB  34.4KB/s   00:00
p11-kit-0.23.15.tgz                                               100% 2176KB   1.1MB/s   00:02
nettle-3.5.1.tgz                                                  100%  733KB 732.7KB/s   00:01
libunistring-0.9.10.tgz                                           100% 1585KB   1.6MB/s   00:01
libtasn1-4.14nb1.tgz                                              100%  175KB 175.2KB/s   00:01
libcfg+-0.7.0.tgz                                                 100%  173KB 173.4KB/s   00:00
gnutls-3.6.11.1.tgz                                               100% 4858KB 809.7KB/s   00:06
installing gettext-tools-0.20.1...
gettext-tools-0.20.1: registering info file /opt/local/info/gettext.info
gettext-tools-0.20.1: registering info file /opt/local/info/libtextstyle.info
installing gettext-m4-0.20.1nb1...
installing gettext-asprintf-0.20.1...
gettext-asprintf-0.20.1: registering info file /opt/local/info/autosprintf.info
installing p11-kit-0.23.15...
libtasn1-4.14nb1: registering info file /opt/local/info/libtasn1.info
p11-kit-0.23.15: copying /opt/local/share/examples/p11-kit/pkcs11.conf.example to /opt/local/etc/pkcs11/pkcs11.conf
installing nettle-3.5.1...
gmp-6.1.2: registering info file /opt/local/info/gmp.info
nettle-3.5.1: registering info file /opt/local/info/nettle.info
installing libunistring-0.9.10...
libunistring-0.9.10: registering info file /opt/local/info/libunistring.info
installing libtasn1-4.14nb1...
libtasn1-4.14nb1: unregistering info file /opt/local/info/libtasn1.info
libtasn1-4.14nb1: registering info file /opt/local/info/libtasn1.info
installing libcfg+-0.7.0...
installing gmp-6.1.2...
gmp-6.1.2: unregistering info file /opt/local/info/gmp.info
gmp-6.1.2: registering info file /opt/local/info/gmp.info
installing libidn-1.34nb1...
libidn-1.34nb1: registering info file /opt/local/info/libidn-components.png
libidn-1.34nb1: registering info file /opt/local/info/libidn.info
installing gettext-0.20.1...
installing gnutls-3.6.11.1...
gnutls-3.6.11.1: registering info file /opt/local/info/gnutls-client-server-use-case.png
gnutls-3.6.11.1: registering info file /opt/local/info/gnutls-guile.info
gnutls-3.6.11.1: registering info file /opt/local/info/gnutls-handshake-sequence.png
gnutls-3.6.11.1: registering info file /opt/local/info/gnutls-handshake-state.png
gnutls-3.6.11.1: registering info file /opt/local/info/gnutls-internals.png
gnutls-3.6.11.1: registering info file /opt/local/info/gnutls-layers.png
gnutls-3.6.11.1: registering info file /opt/local/info/gnutls-logo.png
gnutls-3.6.11.1: registering info file /opt/local/info/gnutls-modauth.png
gnutls-3.6.11.1: registering info file /opt/local/info/gnutls-x509.png
gnutls-3.6.11.1: registering info file /opt/local/info/gnutls.info
gnutls-3.6.11.1: registering info file /opt/local/info/pkcs11-vision.png
pkg_install warnings: 0, errors: 0
reading local summary...
processing local summary...
marking gmp-6.1.2 as non auto-removable
marking libidn-1.34nb1 as non auto-removable
marking gettext-0.20.1 as non auto-removable
marking gnutls-3.6.11.1 as non auto-removable

 次にlibfilezillaのソースコードをDownloadのページよりダウンロードして解凍、ビルドを行う。

$ cd
$ mkdir source
$ cd source
$ tar jxvf ~/Downloads/libfilezilla-0.19.3.tar.bz2
$ export PATH=/usr/gnu/bin:$PATH
$ CXX=g++ CXXFLAGS="-m64 -I/opt/local/include" LDFLAGS=-L/opt/local/lib CC=gcc CFLAGS="-m64 -I/opt/local/include" NETTLE_CFLAGS=-I/opt/local/include/nettle NETTLE_LIBS="-L/opt/local/lib -lnettle" HOGWEED_CFLAGS=-I/opt/local/include/nettle HOGWEED_LIBS="-L/opt/local/lib -lhogweed" ./configure --prefix=$HOME/prefix --enable-static --disable-shared --disable-doxygen-doc
$ gmake

 ビルド途中で下記のエラーが発生して処理が止まってしまう。
/export/home/nakada/source/libfilezilla-0.19.3/lib/string.cppの357行目でエラーとなった。

libtool: compile:  g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../lib/libfilezilla/private -DBUILDING_LIBFILEZILLA -I/usr/include/nettle -I/usr/include/p11-kit-1 -I./libfilezilla -fvisibility=hidden -m64 -I/usr/include -I/usr/include/gmp -I/opt/local/include -Wall -g -MT libfilezilla_la-string.lo -MD -MP -MF .deps/libfilezilla_la-string.Tpo -c string.cpp -o libfilezilla_la-string.o
string.cpp: In function 'std::__cxx11::string fz::to_string(const wstring_view&)':
string.cpp:357:17: error: 'wcsnrtombs' was not declared in this scope
    size_t len = wcsnrtombs(nullptr, &in_p, inlen, 0, &ps);
                 ^~~~~~~~~~
string.cpp:357:17: note: suggested alternative:
In file included from /usr/include/wchar.h:31:0,
                 from /usr/gcc/7/include/c++/7.5.0/cwchar:44,
                 from /usr/gcc/7/include/c++/7.5.0/bits/postypes.h:40,
                 from /usr/gcc/7/include/c++/7.5.0/bits/char_traits.h:40,
                 from /usr/gcc/7/include/c++/7.5.0/string:40,
                 from libfilezilla/string.hpp:7,
                 from string.cpp:1:
/usr/include/iso/wchar_iso.h:310:15: note:   'std::wcsnrtombs'
 extern size_t wcsnrtombs(char *_RESTRICT_KYWD, const wchar_t **_RESTRICT_KYWD,
               ^~~~~~~~~~
gmake[1]: *** [Makefile:823: libfilezilla_la-string.lo] エラー 1
gmake[1]: ディレクトリ '/export/home/nakada/source/libfilezilla-0.19.3/lib' から出ます
gmake: *** [Makefile:486: all-recursive] エラー 1

 「wcsnrtombs」を「std::wcsnrtombs」に修正して再度gmakeコマンドを実行するとまた下記のエラーが発生する。

libtool: compile:  g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../lib/libfilezilla/private -DBUILDING_LIBFILEZILLA -I/usr/include/nettle -I/usr/include/p11-kit-1 -I./libfilezilla -fvisibility=hidden -m64 -I/usr/include -I/usr/include/gmp -I/opt/local/include -Wall -g -MT libfilezilla_la-string.lo -MD -MP -MF .deps/libfilezilla_la-string.Tpo -c string.cpp -o libfilezilla_la-string.o
string.cpp: In function 'std::__cxx11::string fz::to_string(const wstring_view&)':
string.cpp:367:5: error: 'wcsnrtombs' was not declared in this scope
     wcsnrtombs(out_p, &in_p, inlen, len, &ps);
     ^~~~~~~~~~
string.cpp:367:5: note: suggested alternative:
In file included from /usr/include/wchar.h:31:0,
                 from /usr/gcc/7/include/c++/7.5.0/cwchar:44,
                 from /usr/gcc/7/include/c++/7.5.0/bits/postypes.h:40,
                 from /usr/gcc/7/include/c++/7.5.0/bits/char_traits.h:40,
                 from /usr/gcc/7/include/c++/7.5.0/string:40,
                 from libfilezilla/string.hpp:7,
                 from string.cpp:1:
/usr/include/iso/wchar_iso.h:310:15: note:   'std::wcsnrtombs'
 extern size_t wcsnrtombs(char *_RESTRICT_KYWD, const wchar_t **_RESTRICT_KYWD,
               ^~~~~~~~~~
gmake[1]: *** [Makefile:823: libfilezilla_la-string.lo] エラー 1
gmake[1]: ディレクトリ '/export/home/nakada/source/libfilezilla-0.19.3/lib' から出ます
gmake: *** [Makefile:486: all-recursive] エラー 1

 先程と同様のエラーで/export/home/nakada/source/libfilezilla-0.19.3/lib/string.cppの367行目の「wcsnrtombs」を「std::wcsnrtombs」に修正して再度gmakeコマンドを実行するとlibfilezillaのビルドが完了するので「gmake install」コマンドを実行するとホームディレクトリ以下にprefixディレクトリが作成され、その中にビルドしたlibfilezillaがインストールされる。

$ gmake
$ gmake install

 次にDownload FileZilla ClientのページのSource Codeより、FileZilla_3.46.3_src.tar.bz2をクリックしてダウンロードする。その後、Filezillaのソースコードの展開、ビルドを行う。

$ cd $HOME/source
$ tar jxvf ~/Downloads/FileZilla_3.46.3_src.tar.bz2
$ which wx-config-3.0
/opt/local/bin/wx-config-3.0
$ sudo ln -s /opt/local/bin/wx-config-3.0 /opt/local/bin/wx-config
$ which wxrc-3.0
/opt/local/bin/wxrc-3.0
$ sudo ln -s /opt/local/bin/wxrc-3.0 /opt/local/bin/wxrc
$ CXX=g++ CXXFLAGS="-m64 -I$HOME/prefix/include -I/opt/local/include/wx-3.0 -I/opt/local/include" LDFLAGS="-m64 -L/opt/local/lib -L/usr/lib" CC=gcc CFLAGS="-m64 -I$HOME/prefix/include -I/opt/local/include/wx-3.0 -I/opt/local/include" NETTLE_CFLAGS="-I/opt/local/include/nettle -I/opt/local/include" NETTLE_LIBS="-L/opt/local/lib -lnettle" HOGWEED_CFLAGS="-I/opt/local/include/nettle -I/opt/local/include" HOGWEED_LIBS="-L/opt/local/lib -lhogweed" LIBFILEZILLA_CFLAGS=-I/opt/gnu/include LIBFILEZILLA_LIBS="-L$HOME/prefix/lib -lfilezilla -lpthread" PKG_CONFIG_PATH="$HOME/prefix/lib/pkgconfig;/opt/local/lib/pkgconfig;/usr/lib/pkgconfig;/usr/share/pkgconfig" LIBGNUTLS_CFLAGS="-I/opt/local/include -I/usr/include/p11-kit-1" LIBGNUTLS_LIBS="-L/opt/local/lib -Wl,-R/opt/local/lib -lgnutls" ./configure --prefix=$HOME/prefix --enable-static --disable-shared --with-pugixml=builtin
checking for a BSD-compatible install... /usr/gnu/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/gnu/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... i386-pc-solaris2.11
checking host system type... i386-pc-solaris2.11
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of g++... gcc3
checking for g++... g++
checking whether we are using the GNU Objective C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to print strings... print -r
checking for a sed that does not truncate output... /usr/gnu/bin/sed
checking for grep that handles long lines and -e... /usr/gnu/bin/grep
checking for egrep... /usr/gnu/bin/grep -E
checking for fgrep... /usr/gnu/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/gnu/bin/nm -B
checking the name lister (/usr/gnu/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786240
checking how to convert i386-pc-solaris2.11 file names to i386-pc-solaris2.11 format... func_convert_file_noop
checking how to convert i386-pc-solaris2.11 file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... print -r --
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/gnu/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/gnu/bin/dd
checking how to truncate binary pipes... /usr/gnu/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -64) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.11 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -64
checking if the linker (/usr/bin/ld -64) is GNU ld... no
checking whether the g++ linker (/usr/bin/ld -64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -64) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.11 ld.so
checking how to hardcode library paths into programs... immediate
checking whether C compiler accepts -Werror=partial-availability... no
checking whether the linker accepts -Wl,-no_weak_imports... no
checking whether g++ supports C++17 features with -std=c++17... yes
checking for whether we need -stdlib=libc++... no
checking whether std::map has emplace... yes
checking whether std::chrono::steady_clock is steady... yes
checking for thread_local... yes
checking whether std::atomic can be used without link library... yes
configure: Running sub-configure for shell extension
checking for a BSD-compatible install... /usr/gnu/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/gnu/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... i386-pc-solaris2.11
checking host system type... i386-pc-solaris2.11
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking whether we are using the GNU C++ compiler... yes
checking whether g++ -std=c++17 accepts -g... yes
checking dependency style of g++ -std=c++17... gcc3
checking how to print strings... print -r
checking for a sed that does not truncate output... /usr/gnu/bin/sed
checking for grep that handles long lines and -e... /usr/gnu/bin/grep
checking for egrep... /usr/gnu/bin/grep -E
checking for fgrep... /usr/gnu/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/gnu/bin/nm -B
checking the name lister (/usr/gnu/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786240
checking how to convert i386-pc-solaris2.11 file names to i386-pc-solaris2.11 format... func_convert_file_noop
checking how to convert i386-pc-solaris2.11 file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... print -r --
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/gnu/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/gnu/bin/dd
checking how to truncate binary pipes... /usr/gnu/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... solaris2.11 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -std=c++17 -E
checking for ld used by g++ -std=c++17... /usr/bin/ld -64
checking if the linker (/usr/bin/ld -64) is GNU ld... no
checking whether the g++ -std=c++17 linker (/usr/bin/ld -64) supports shared libraries... yes
checking for g++ -std=c++17 option to produce PIC... -fPIC -DPIC
checking if g++ -std=c++17 PIC flag -fPIC -DPIC works... yes
checking if g++ -std=c++17 static flag -static works... no
checking if g++ -std=c++17 supports -c -o file.o... yes
checking if g++ -std=c++17 supports -c -o file.o... (cached) yes
checking whether the g++ -std=c++17 linker (/usr/bin/ld -64) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.11 ld.so
checking how to hardcode library paths into programs... immediate
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libfilezilla >= 0.19.3... yes
checking for wx-config... /opt/local/bin/wx-config
checking for wxWidgets version >= 3.0.4 (--unicode=yes --universal=no)... yes (version 3.0.4)
checking for wxWidgets static library... no
checking positional printf argument support in wxWidgets... yes
checking GUI support in wxWidgets... yes
checking system type for sftp stub... unix
checking for utmpx.h... yes
checking for sys/select.h... yes
checking for library containing socket... -lxnet
checking for library containing getaddrinfo... none required
checking for library containing in6addr_loopback... -lsocket
checking for getaddrinfo... yes
checking for ptsname... yes
checking for setresuid... no
checking for strsignal... yes
checking for updwtmpx... yes
checking for gettimeofday... yes
checking for ftime... yes
checking for in6addr_loopback... yes
checking for in6addr_any... yes
checking whether CLOCK_MONOTONIC is declared... yes
checking for SO_PEERCRED and dependencies... no
checking whether to use windres... no
checking whether the linker accepts -Wl,--dynamicbase... no
checking whether the linker accepts -Wl,--nxcompat... no
checking for AI_IDN defined in netdb.h... no
checking idna.h usability... yes
checking idna.h presence... no
configure: WARNING: idna.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: idna.h: proceeding with the compiler's result
checking for idna.h... yes
checking for stringprep_check_version in -lidn... yes
checking whether to use precompiled headers... yes
checking for cppunit >= 1.13.0... no
checking for nettle >= 3.1... yes
checking for hogweed >= 3.1... yes
configure: Using builtin pugixml
checking for dbus-1 >= 1.2... yes
checking D-Bus support... yes
checking for xdg-open... /usr/bin/xdg-open
checking for gtk+-3.0... yes
checking for setenv... yes
checking for putenv... yes
checking for posix_fadvise... yes
checking for localtime_r... yes
checking for gmtime_r... yes
checking for timegm... yes
checking for clock_gettime... yes
checking for sqlite3 >= 3.7... yes
checking for xgettext... /usr/gnu/bin/xgettext
checking for msgfmt... /usr/gnu/bin/msgfmt
checking for msgmerge... /opt/local/bin/msgmerge
checking whether msgmerge version >= 0.11.0... yes, 0.20.1
checking available FZ3 message catalogs... an ar az bg_BG ca ca_ES@valencia co cs_CZ cy da de el es et eu fa_IR fi_FI fr gl_ES he_IL hr hu_HU hy id_ID is it ja_JP ka kab km_KH ko_KR ku ky lo_LA lt_LT lv_LV mk_MK nb_NO ne nl nn_NO oc pl_PL pt_BR pt_PT ro_RO ru sk_SK sl_SI sr sv ta th_TH tr uk_UA vi_VN zh_CN zh_TW
checking for wxrc... /opt/local/bin/wxrc
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/engine/Makefile
config.status: creating src/pugixml/Makefile
config.status: creating src/dbus/Makefile
config.status: creating src/interface/Makefile
config.status: creating src/interface/resources/Makefile
config.status: creating src/include/Makefile
config.status: creating locales/Makefile
config.status: creating data/Makefile
config.status: creating src/interface/resources/classic/Makefile
config.status: creating src/interface/resources/cyril/Makefile
config.status: creating src/interface/resources/cyril/16x16/Makefile
config.status: creating src/interface/resources/blukis/Makefile
config.status: creating src/interface/resources/default/Makefile
config.status: creating src/interface/resources/flatzilla/Makefile
config.status: creating src/interface/resources/lone/Makefile
config.status: creating src/interface/resources/minimal/Makefile
config.status: creating src/interface/resources/opencrystal/Makefile
config.status: creating src/interface/resources/sun/Makefile
config.status: creating src/interface/resources/tango/Makefile
config.status: creating src/putty/Makefile
config.status: creating src/storj/Makefile
config.status: creating tests/Makefile
config.status: creating src/interface/resources/version.rc
config.status: creating src/interface/resources/MacInfo.plist
config.status: creating src/fzshellext/version.rc
config.status: creating src/include/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
$ gmake

 すると、以下のエラーメッセージを出力して止まってしまう。

g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../src/include  -I./../include -I/opt/gnu/include -I/opt/local/lib/wx/include/gtk3-unicode-3.0 -I/opt/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__  -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -pthread -DFFI_NO_RAW_API -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/drm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/lib/libffi-3.2.1/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pcre -fpch-preprocess  -m64 -I/export/home/nakada/prefix/include -I/opt/local/include/wx-3.0 -I/opt/local/include -Wall -g -MT filezilla-themeprovider.o -MD -MP -MF .deps/filezilla-themeprovider.Tpo -c -o filezilla-themeprovider.o `test -f 'themeprovider.cpp' || echo './'`themeprovider.cpp
In file included from /usr/lib/glib-2.0/include/glibconfig.h:9:0,
                 from /usr/include/glib-2.0/glib/gtypes.h:32,
                 from /usr/include/glib-2.0/glib/galloca.h:32,
                 from /usr/include/glib-2.0/glib.h:30,
                 from /usr/include/gtk-3.0/gdk/gdkconfig.h:13,
                 from /usr/include/gtk-3.0/gdk/gdk.h:30,
                 from /usr/include/gtk-3.0/gtk/gtk.h:30,
                 from themeprovider.cpp:15:
/usr/include/glib-2.0/glib/gtypes.h: In function 'gboolean _GLIB_CHECKED_ADD_U64(guint64*, guint64, guint64)':
/usr/include/glib-2.0/glib/gmacros.h:738:31: error: '_Static_assert' was not declared in this scope
 #define G_STATIC_ASSERT(expr) _Static_assert (expr, "Expression evaluates to false")
                               ^
/usr/include/glib-2.0/glib/gtypes.h:466:3: note: in expansion of macro 'G_STATIC_ASSERT'
   G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64));
   ^~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:738:31: note: suggested alternative: 'wxStaticCast'
 #define G_STATIC_ASSERT(expr) _Static_assert (expr, "Expression evaluates to false")
                               ^
/usr/include/glib-2.0/glib/gtypes.h:466:3: note: in expansion of macro 'G_STATIC_ASSERT'
   G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64));
   ^~~~~~~~~~~~~~~
In file included from /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf.h:36:0,
                 from /usr/include/gtk-3.0/gdk/gdkpixbuf.h:33,
                 from /usr/include/gtk-3.0/gdk/gdkcairo.h:29,
                 from /usr/include/gtk-3.0/gdk/gdk.h:33,
                 from /usr/include/gtk-3.0/gtk/gtk.h:30,
                 from themeprovider.cpp:15:
/usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h: At global scope:
/usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h:111:113: warning: 'GTimeVal' is deprecated [-Wdeprecated-declarations]
                                                                               const GTimeVal         *start_time);
                                                                                                                 ^
/usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h:122:115: warning: 'GTimeVal' is deprecated [-Wdeprecated-declarations]
                                                                               const GTimeVal         *current_time);
                                                                                                                   ^
gmake[4]: *** [Makefile:2720: filezilla-themeprovider.o] エラー 1
gmake[4]: ディレクトリ '/export/home/nakada/source/filezilla-3.46.3/src/interface' から出ます

/usr/include/glib-2.0/glib/gmacros.hに問題が出ていた。locateコマンドでgmacros.hを検索すると、/opt/local/include/glib-2.0/glib/gmacros.hにも存在しており、ファイルサイズが異なっていた。

$ locate gmacros.h
/opt/local/include/glib-2.0/glib/gmacros.h
/usr/include/glib-2.0/glib/gmacros.h
$ ls -l /opt/local/include/glib-2.0/glib/gmacros.h
-rw-r--r-- 1 root root 41861  1月  6 06:38 /opt/local/include/glib-2.0/glib/gmacros.h
$ ls -l /usr/include/glib-2.0/glib/gmacros.h
-r--r--r-- 1 root root 41836  2月 12 14:52 /usr/include/glib-2.0/glib/gmacros.h
$ locate glib-2.0.pc
/opt/local/lib/pkgconfig/glib-2.0.pc
/usr/lib/amd64/pkgconfig/glib-2.0.pc
/usr/lib/pkgconfig/glib-2.0.pc
$ pkg-config --cflags /opt/local/lib/pkgconfig/glib-2.0.pc
-I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/usr/include/pcre
$ pkg-config --libs /opt/local/lib/pkgconfig/glib-2.0.pc
-L/opt/local/lib -Wl,-R/opt/local/lib -lglib-2.0 -lintl

/export/home/nakada/source/filezilla-3.46.3/src/interfaceのMakefileを以下のように「-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include」を「-I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include」に修正する。
修正前

LIBGTK_CFLAGS = -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -pthread -DFFI_NO_RAW_API -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/drm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/lib/libffi-3.2.1/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pcre

修正後

LIBGTK_CFLAGS = -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -pthread -DFFI_NO_RAW_API -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/drm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/lib/libffi-3.2.1/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/usr/include/pcre

 再度、gmakeコマンドを実行するとFilezillaのビルドが完了する。

$ gmake
$ gmake install
$ PATH=$HOME/prefix/bin:$PATH
$ filezilla &




 もし、$HOME/prefix以下でなく/usr/localなど別のディレクトリにインストールしたい場合は、configureを実行する際の$HOME/prefixの部分を全て/usr/localなどに変更してビルドし直す。「gmake install」のところは、「sudo gmake install」とroot権限で実行する。
 デスクトップのメニューに登録するには、以下のコマンドを実行する。「アプリケーション」→「インターネット」→「Filezilla」に登録される。

$ sudo ln -s /usr/local/share/applications/filezilla.desktop  /usr/share/applications/filezilla.desktop