Skip to content

Replace folly::Function #6

@dennisklein

Description

@dennisklein

On clang (macOS system variant) the embedded folly::Function does not compile properly:

The following files are present in the log:
- sw/BUILD/asiofi-latest/log
## Begin sw/BUILD/asiofi-latest/log
++ mkdir -p /build/ci_checks/alidist_checker_macos_o2_ci_1/sw/INSTALLROOT/9e4ebe5003834b2ead934222c72c7f48854ad2b4/osx_x86-64/asiofi/v0.4.3-1
++ cmake /build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3 -DCMAKE_INSTALL_PREFIX=/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/INSTALLROOT/9e4ebe5003834b2ead934222c72c7f48854ad2b4/osx_x86-64/asiofi/v0.4.3-1 -DCMAKE_BUILD_TYPE=RELWITHDEBINFO -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_BINDIR=bin -DDISABLE_COLOR=ON -DOFI_ROOT=/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/osx_x86-64/ofi/v1.7.1-1 -DBUILD_TESTING=ON
-- Found Git: /usr/bin/git (found version "2.20.1 (Apple Git-117)") 
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
asiofi 0.4.3 from Tue Jul 9 19:42:56 2019 +0200
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
CMake Warning (dev) at cmake/FindOFI.cmake:16 (set):
  Only the first value argument is used when setting an environment variable.
  Argument
  '/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/osx_x86-64/ofi/v1.7.1-1/lib/pkgconfig:'
  and later are unused.
Call Stack (most recent call first):
  cmake/asiofiLib.cmake:258 (find_package)
  CMakeLists.txt:51 (find_package2)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/FindOFI.cmake:22 (set):
  Only the first value argument is used when setting an environment variable.
  Argument
  '/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/osx_x86-64/ofi/v1.7.1-1/lib/pkgconfig:'
  and later are unused.
Call Stack (most recent call first):
  cmake/asiofiLib.cmake:258 (find_package)
  CMakeLists.txt:51 (find_package2)
This warning is for project developers.  Use -Wno-dev to suppress it.

--   
--   DEPENDENCY FOUND   VERSION                      PREFIX
--   Boost              1.70.0 (>= 1.70)             /build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3
--   OFI                1.7.1 (>= 1.6.0)             /build/ci_checks/alidist_checker_macos_o2_ci_1/sw/osx_x86-64/ofi/v1.7.1-1
--   folly              internal (>= 2019.04.01.00)  internal copy (folly::Function only)
--   
--   COMPONENT  BUILT?  INFO
--   core        YES
--   tests       YES    (disable with -DBUILD_TESTING=OFF)
--   
-- Configuring done
-- Generating done
-- Build files have been written to: /build/ci_checks/alidist_checker_macos_o2_ci_1/sw/BUILD/9e4ebe5003834b2ead934222c72c7f48854ad2b4/asiofi
++ cmake --build . --target install -- -j6
Scanning dependencies of target afi_msg_bw
[ 50%] Building CXX object test/CMakeFiles/afi_msg_bw.dir/benchmarks/msg_bw.cpp.o
In file included from /build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/test/benchmarks/msg_bw.cpp:10:
In file included from /build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi.hpp:23:
In file included from /build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/semaphore.hpp:18:
In file included from /build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Function.h:228:
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:658:27: error: reference to 'pair' is ambiguous
struct IsRelocatable<std::pair<T, U>>
                          ^
/usr/local/include/boost/container/detail/std_fwd.hpp:39:8: note: candidate found by name lookup is 'std::__1::pair'
struct pair;
       ^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:631:8: note: candidate found by name lookup is 'std::pair'
struct pair;
       ^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:658:31: error: expected '>'
struct IsRelocatable<std::pair<T, U>>
                              ^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:658:36: error: expected ';' at end of declaration
struct IsRelocatable<std::pair<T, U>>
                                   ^
                                   ;
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:658:36: error: expected unqualified-id
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:755:41: error: reference to 'basic_string' is ambiguous
FOLLY_ASSUME_FBVECTOR_COMPATIBLE_3(std::basic_string)
                                        ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string:660:28: note: candidate found by name lookup is 'std::__1::basic_string'
class _LIBCPP_TEMPLATE_VIS basic_string
                           ^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:635:7: note: candidate found by name lookup is 'std::basic_string'
class basic_string;
      ^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:755:1: error: expected '>'
FOLLY_ASSUME_FBVECTOR_COMPATIBLE_3(std::basic_string)
^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:612:39: note: expanded from macro 'FOLLY_ASSUME_FBVECTOR_COMPATIBLE_3'
  FOLLY_ASSUME_RELOCATABLE(__VA_ARGS__<T1, T2, T3>); \
                                      ^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:755:1: error: a template declaration can only declare a single entity
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:612:46: note: expanded from macro 'FOLLY_ASSUME_FBVECTOR_COMPATIBLE_3'
  FOLLY_ASSUME_RELOCATABLE(__VA_ARGS__<T1, T2, T3>); \
                                             ^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:757:41: error: reference to 'vector' is ambiguous
FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2(std::vector)
                                        ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/vector:464:28: note: candidate found by name lookup is 'std::__1::vector'
class _LIBCPP_TEMPLATE_VIS vector
                           ^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:642:7: note: candidate found by name lookup is 'std::vector'
class vector;
      ^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:757:1: error: expected '>'
FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2(std::vector)
^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:606:39: note: expanded from macro 'FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2'
  FOLLY_ASSUME_RELOCATABLE(__VA_ARGS__<T1, T2>); \
                                      ^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:757:1: error: expected ';' at end of declaration
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:606:46: note: expanded from macro 'FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2'
  FOLLY_ASSUME_RELOCATABLE(__VA_ARGS__<T1, T2>); \
                                             ^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:757:1: error: expected unqualified-id
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:606:46: note: expanded from macro 'FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2'
  FOLLY_ASSUME_RELOCATABLE(__VA_ARGS__<T1, T2>); \
                                             ^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:758:41: error: reference to 'deque' is ambiguous
FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2(std::deque)
                                        ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/deque:1193:28: note: candidate found by name lookup is 'std::__1::deque'
class _LIBCPP_TEMPLATE_VIS deque
                           ^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:644:7: note: candidate found by name lookup is 'std::deque'
class deque;
      ^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:758:1: error: expected '>'
FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2(std::deque)
^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:606:39: note: expanded from macro 'FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2'
  FOLLY_ASSUME_RELOCATABLE(__VA_ARGS__<T1, T2>); \
                                      ^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:758:1: error: expected ';' at end of declaration
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:606:46: note: expanded from macro 'FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2'
  FOLLY_ASSUME_RELOCATABLE(__VA_ARGS__<T1, T2>); \
                                             ^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:758:1: error: expected unqualified-id
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:606:46: note: expanded from macro 'FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2'
  FOLLY_ASSUME_RELOCATABLE(__VA_ARGS__<T1, T2>); \
                                             ^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:760:41: error: reference to 'shared_ptr' is ambiguous
FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1(std::shared_ptr)
                                        ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/memory:4034:60: note: candidate found by name lookup is 'std::__1::shared_ptr'
    template <class _Up> friend class _LIBCPP_TEMPLATE_VIS shared_ptr;
                                                           ^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:650:7: note: candidate found by name lookup is 'std::shared_ptr'
class shared_ptr;
      ^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:760:1: error: expected '>'
FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1(std::shared_ptr)
^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:600:39: note: expanded from macro 'FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1'
  FOLLY_ASSUME_RELOCATABLE(__VA_ARGS__<T1>);    \
                                      ^
In file included from /build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/test/benchmarks/msg_bw.cpp:10:
In file included from /build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi.hpp:23:
In file included from /build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/semaphore.hpp:18:
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Function.h:310:8: error: reference to 'shared_ptr' is ambiguous
  std::shared_ptr<Function<F>> sp_;
       ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/memory:4034:60: note: candidate found by name lookup is 'std::__1::shared_ptr'
    template <class _Up> friend class _LIBCPP_TEMPLATE_VIS shared_ptr;
                                                           ^
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Traits.h:650:7: note: candidate found by name lookup is 'std::shared_ptr'
class shared_ptr;
      ^
In file included from /build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/test/benchmarks/msg_bw.cpp:10:
In file included from /build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi.hpp:23:
In file included from /build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/semaphore.hpp:18:
/build/ci_checks/alidist_checker_macos_o2_ci_1/sw/SOURCES/asiofi/v0.4.3/v0.4.3/include/asiofi/3rdparty/folly/Function.h:310:18: error: expected member name or ';' after declaration specifiers
  std::shared_ptr<Function<F>> sp_;
  ~~~~~~~~~~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [test/CMakeFiles/afi_msg_bw.dir/benchmarks/msg_bw.cpp.o] Error 1
make[1]: *** [test/CMakeFiles/afi_msg_bw.dir/all] Error 2
make: *** [all] Error 2
## End sw/BUILD/asiofi-latest/log

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions