Building folly fails on Future-inl.h on Arch with v2017.05.29.00 / master

114 views
Skip to first unread message

Markus Lachinger

unread,
Jun 3, 2017, 4:05:39 PM6/3/17
to Folly: the Facebook Open-source LibrarY
I updated Arch and tried to build folly again, it is failing with following error:


In file included from ./../folly/futures/Future.h:499:0,
                 from futures/Future.cpp:16:
./../folly/futures/Future-inl.h:236:6: error: prototype for ‘decltype (((folly::Future<T>*)this)->folly::Future<T>::then(forward<Arg>(arg), (forward<Args>)(folly::Future::then::args)...)) folly::Future<T>::then(Executor*, Arg&&, Args&& ...)’ does not match any in class ‘folly::Future<T>’
 auto Future<T>::then(Executor* x, Arg&& arg, Args&&... args)
      ^~~~~~~~~


Full trace & commands here in this gist: https://gist.github.com/mmlac/213eac9b526e7703ecf8b9ded45db179


Any ideas what I am doing wrong?


$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release
Thread model: posix
gcc version 7.1.1 20170516 (GCC) 

Markus Lachinger

unread,
Jun 3, 2017, 6:35:25 PM6/3/17
to Folly: the Facebook Open-source LibrarY
If I switch to clang, I get  a linker error:

 /bin/sh ./libtool  --tag=CXX   --mode=link clang  -std=gnu++1y -g -O2 -lboost_context -lboost_program_options -lboost_thread -lboost_filesystem -lboost_system -lboost_regex -lpthread -lboost_chrono  -lssl -lcrypto  -o generate_fingerprint_tables build/GenerateFingerprintTables.o libfollybase.la -lbz2 -llzma -lz -lsnappy -llz4 -liberty -ldl -latomic -levent -ldouble-conversion -lglog -lgflags  -v
libtool: link: clang -std=gnu++1y -g -O2 -o generate_fingerprint_tables build/GenerateFingerprintTables.o -v  ./.libs/libfollybase.a -lboost_context -lboost_program_options -lboost_thread -lboost_filesystem -lboost_system -lboost_regex -lpthread -lboost_chrono -lssl -lcrypto -lbz2 -llzma -lz -lsnappy -llz4 -liberty -ldl -latomic -levent -ldouble-conversion -lglog -lgflags
clang version 4.0.0 (tags/RELEASE_400/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-pc-linux-gnu/5.4.0
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-pc-linux-gnu/7.1.1
Found candidate GCC installation: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/5.4.0
Found candidate GCC installation: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1
Found candidate GCC installation: /usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib64/gcc/x86_64-pc-linux-gnu/7.1.1
Selected GCC installation: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1
Candidate multilib: .;@m64
Selected multilib: .;@m64
 "/usr/bin/ld" --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o generate_fingerprint_tables /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../lib64/crt1.o /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../lib64/crti.o /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/crtbegin.o -L/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1 -L/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../lib64 -L/usr/bin/../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../.. -L/usr/bin/../lib -L/lib -L/usr/lib build/GenerateFingerprintTables.o ./.libs/libfollybase.a -lboost_context -lboost_program_options -lboost_thread -lboost_filesystem -lboost_system -lboost_regex -lpthread -lboost_chrono -lssl -lcrypto -lbz2 -llzma -lz -lsnappy -llz4 -liberty -ldl -latomic -levent -ldouble-conversion -lglog -lgflags -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/crtend.o /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../lib64/crtn.o
/usr/bin/ld: build/GenerateFingerprintTables.o: undefined reference to symbol '_ZNSt16invalid_argumentD2Ev@@GLIBCXX_3.4.15'
/usr/lib/libstdc++.so.6: error adding symbols: DSO missing from command line
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)

Markus Lachinger

unread,
Jun 3, 2017, 6:58:06 PM6/3/17
to Folly: the Facebook Open-source LibrarY
If I switch to clang, I get  a linker error:


I got around this by calling the linker manually like below and just adding -lstdc++


That made the build pass, but I wonder what I can do to just make the default build with GCC pass, and why GCC would fail the compilation where clang thinks the code is just fine?
(Also changed double-conversion's ceil into main in autoconf to make it pass configure with clang)

Building wangle though now dies with the same Future compiler issues and can't build with clang as it can't deal with libatomic :(

Any idea why it would break with gcc?

Markus Lachinger

unread,
Jun 4, 2017, 1:41:04 AM6/4/17
to faceboo...@googlegroups.com
Seems to be folly just not compiling on GCC 7. Using GCC 5 worked. Filed an issue:  https://github.com/facebook/folly/issues/607

--

---
You received this message because you are subscribed to a topic in the Google Groups "Folly: the Facebook Open-source LibrarY" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/facebook-folly/ArVHa8QOvMo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to facebook-folly+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages