Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-16870

[C++] lld does not like --as-needed flag

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 8.0.0
    • 10.0.0
    • C++

    Description

      I've been getting this annoying linking error if I try to build examples using Clang 13 on MacOS:

      [build] [807/827] Linking CXX executable debug/flight-grpc-example
      [build] FAILED: debug/flight-grpc-example
      [build] : && /Library/Developer/CommandLineTools/usr/bin/c++ -Qunused-arguments -fcolor-diagnostics  ...
      [build] ld: unknown option: --no-as-needed
      [build] clang: error: linker command failed with exit code 1 (use -v to see invocation)
      

      Should we drop the --as-needed or should I carve out for Apple? cc davidli

      My workaround has been to comment out these lines: https://github.com/apache/arrow/blob/982ea6c4d382d1e85164f09b711e87938eaa674a/cpp/examples/arrow/CMakeLists.txt#L39-L40

      Attachments

        Issue Links

          Activity

            People

              aucahuasi Percy Camilo TriveƱo Aucahuasi
              wjones127 Will Jones
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 10m
                  2h 10m