2.14 build failure on macOS
ilovezfs opened this issue · 8 comments
==> autoreconf --force --install
configure.ac:20: installing './compile'
configure.ac:5: installing './install-sh'
configure.ac:5: installing './missing'
src/Makefile.am: installing './depcomp'
==> ./configure --disable-debug --disable-dependency-tracking --disable-silent-rules --prefix=/usr/local/Cellar/btfs/2.14
configure: WARNING: unrecognized options: --disable-debug
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
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 clang++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of clang++... none
checking for pkg-config... /usr/local/opt/pkg-config/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for fuse >= 2.7.3... yes
checking for libtorrent-rasterbar >= 1.0.0... yes
checking for libcurl >= 7.22.0... yes
checking for gcc... clang
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking whether clang understands -c and -o together... yes
checking dependency style of clang... none
checking how to run the C preprocessor... clang -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -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 off_t... yes
checking for size_t... yes
checking for memset... yes
checking for mkdir... yes
checking for realpath... yes
checking for strdup... yes
checking for pthread_setname_np in -lpthread... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating man/Makefile
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating scripts/Makefile
config.status: executing depfiles commands
configure: WARNING: unrecognized options: --disable-debug
==> make install
Making install in src
clang++ -DPACKAGE_NAME=\"btfs\" -DPACKAGE_TARNAME=\"btfs\" -DPACKAGE_VERSION=\"2.14\" -DPACKAGE_STRING=\"btfs\ 2.14\" -DPACKAGE_BUGREPORT=\"johan.gunnarsson@gmail.com\" -DPACKAGE_URL=\"https://github.com/johang/btfs\" -DPACKAGE=\"btfs\" -DVERSION=\"2.14\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MEMSET=1 -DHAVE_MKDIR=1 -DHAVE_REALPATH=1 -DHAVE_STRDUP=1 -DHAVE_LIBPTHREAD=1 -I. -Wall -Wextra -Wconversion -Wsign-compare -Wsign-conversion -Wno-unused-parameter -D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE -I/usr/local/include/osxfuse/fuse -DTORRENT_DISABLE_LOGGING -DTORRENT_USE_OPENSSL -DBOOST_ASIO_HASH_MAP_BUCKETS=1021 -DBOOST_EXCEPTION_DISABLE -DBOOST_ASIO_ENABLE_CANCELIO -DTORRENT_LINKING_SHARED -I/usr/local/Cellar/libtorrent-rasterbar/1.1.4/include -I/usr/local/Cellar/libtorrent-rasterbar/1.1.4/include/libtorrent -std=c++11 -g -O2 -c -o btfs-btfs.o `test -f 'btfs.cc' || echo './'`btfs.cc
clang++ -std=c++11 -g -O2 -o btfs btfs-btfs.o -L/usr/local/lib -losxfuse -L/usr/local/Cellar/libtorrent-rasterbar/1.1.4/lib -ltorrent-rasterbar -lboost_system -lcurl -lpthread
Undefined symbols for architecture x86_64:
"libtorrent::session_handle::wait_for_alert(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> >)", referenced from:
alert_queue_loop(void*) in btfs-btfs.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [btfs] Error 1
make: *** [install-recursive] Error 1
/usr/local/Homebrew/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/python.rb
/usr/local/Homebrew/Library/Homebrew/debrew.rb:11:in `raise'
BuildError: Failed executing: make install
1. raise
2. ignore
3. backtrace
4. irb
5. shell
Choose an action:
Which versions of libtorrent do you build with?
Tested with 1.1.3 & 1.1.4
It looks like if I rebuild libtorrent-rasterbar with ENV.cxx11
set then btfs builds. I'm not sure that's the best idea since our boost isn't build with ENV.cxx11
by default, but it may be OK nonetheless.
Oh, I see. Modern compilers defaults to >=c++11 now. And libtorrent >=1.2 will require c++11. So I figured I could flip the switch too.
@johang yeah I think it's worth trying. I'm expecting https://github.com/Homebrew/homebrew-core/pull/16089/files to come back 🍏 now.
@johang I've now shipped 2.14 in
Homebrew/homebrew-core@b5fde06
Homebrew/homebrew-core@96b9605
I'll let you know if we hear about any issues due to the C++ standard mismatch on boost or otherwise.
Okay!
I've added Mac OS in btfs' Travis CI config to catch this kind of problems earlier.