Skip to content

Error when make -j #894

Open
Open

Description

@xiongxiongjiang

When exexute make -j:

Undefined symbols for architecture x86_64:
  "folly::f14::detail::F14LinkCheck<(folly::f14::detail::F14IntrinsicsMode)1>::check()", referenced from:
      folly::f14::detail::F14Table<folly::f14::detail::NodeContainerPolicy<folly::dynamic, folly::dynamic, folly::detail::DynamicHasher, folly::detail::DynamicKeyEqual, void> >::rehashImpl(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)::'lambda'()::operator()() const in ColdResumeManager.cpp.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[2]: *** [tests] Error 1
make[1]: *** [CMakeFiles/tests.dir/all] Error 2
1 warning generated.
[100%] Linking CXX executable yarpl-tests
[100%] Built target yarpl-tests
make: *** [all] Error 2

Activity

  1. robertroeser commented on Aug 7, 2019

    @robertroeser
    Member

    Does this fix your issue or is it something else?
    #888

  2. xiongxiongjiang commented on Aug 8, 2019

    @xiongxiongjiang
    Author

    I tried, didn't work.

  3. gf59ru commented on Aug 12, 2019

    @gf59ru

    Has same bug. Fix from #888 doesn't help.

  4. timotheecour commented on Oct 16, 2019

    @timotheecour

    same error; this seems related to facebook/folly#1027
    here are the relevant code snippets from folly sources:

    template <>
    struct F14LinkCheck<getF14IntrinsicsMode()> {
      // The purpose of this method is to trigger a link failure if
      // compilation flags vary across compilation units.  The definition
      // is in F14Table.cpp, so only one of F14LinkCheck<None>::check,
      // F14LinkCheck<Simd>::check, or F14LinkCheck<SimdAndCrc>::check will
      // be available at link time.
      //
      // To cause a link failure the function must be invoked in code that
      // is not optimized away, so we call it on a couple of cold paths
      // (exception handling paths in copy construction and rehash).  LTO may
      // remove it entirely, but that's fine.
      static void check() noexcept;
    };
    // If you get a link failure that leads you here, your build has varying
    // compiler flags across compilation units in a way that would break F14.
    // SIMD (SSE2 or NEON) needs to be either on everywhere or off everywhere
    // that uses F14.  If SIMD is on then hardware CRC needs to be enabled
    // everywhere or disabled everywhere.
    void F14LinkCheck<getF14IntrinsicsMode()>::check() noexcept {}
  5. iychche commented on Oct 22, 2020

    @iychche

    Is there a solution for this issue? I am new to C++ and I am trying to build this on Mac. Here is the error:

    Undefined symbols for architecture x86_64:
      "folly::f14::detail::F14LinkCheck<(folly::f14::detail::F14IntrinsicsMode)1>::check()", referenced from:
          folly::f14::detail::F14Table<folly::f14::detail::NodeContainerPolicy<folly::dynamic, folly::dynamic, folly::detail::DynamicHasher, folly::detail::DynamicKeyEqual, void> >::rehashImpl(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)::'lambda'()::operator()() const in libreactivesocket_examples_util.a(ColdResumeManager.cpp.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[2]: *** [example_cold-resumption-client] Error 1
    make[1]: *** [CMakeFiles/example_cold-resumption-client.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    Undefined symbols for architecture x86_64:
      "folly::f14::detail::F14LinkCheck<(folly::f14::detail::F14IntrinsicsMode)1>::check()", referenced from:
          folly::f14::detail::F14Table<folly::f14::detail::NodeContainerPolicy<folly::dynamic, folly::dynamic, folly::detail::DynamicHasher, folly::detail::DynamicKeyEqual, void> >::rehashImpl(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)::'lambda'()::operator()() const in ColdResumeManager.cpp.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[2]: *** [tests] Error 1
    make[1]: *** [CMakeFiles/tests.dir/all] Error 2
    make: *** [all] Error 2
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions