apple / swift-nio-examples

examples of how to use swift-nio
Apache License 2.0
237 stars 60 forks source link

build swift-nio-example failed get error, memory file not found #63

Open ggjjlldd opened 4 years ago

ggjjlldd commented 4 years ago

Expected behavior

[what you expected to happen] build success

Actual behavior

[what actually happened]

Resolving https://github.com/apple/swift-nio at 2.18.0
In file included from /Users/aeris/hswork/http2/swift-nio-examples/http2-client/.build/checkouts/swift-nio-ssl/Sources/CNIOBoringSSL/ssl/tls_record.cc:109:
In file included from /Users/aeris/hswork/http2/swift-nio-examples/http2-client/.build/checkouts/swift-nio-ssl/Sources/CNIOBoringSSL/include/CNIOBoringSSL_ssl.h:145:
/Users/aeris/hswork/http2/swift-nio-examples/http2-client/.build/checkouts/swift-nio-ssl/Sources/CNIOBoringSSL/include/CNIOBoringSSL_base.h:478:10: fatal error: 'memory' file not found
#include <memory>
         ^~~~~~~~
In file included from /Users/aeris/hswork/http2/swift-nio-examples/http2-client/.build/checkouts/swift-nio-ssl/Sources/CNIOBoringSSL/ssl/tls13_enc.cc:15:
In file included from /Users/aeris/hswork/http2/swift-nio-examples/http2-client/.build/checkouts/swift-nio-ssl/Sources/CNIOBoringSSL/include/CNIOBoringSSL_ssl.h:145:
/Users/aeris/hswork/http2/swift-nio-examples/http2-client/.build/checkouts/swift-nio-ssl/Sources/CNIOBoringSSL/include/CNIOBoringSSL_base.h:478:10: fatal er

In file included from /Users/aeris/hswork/http2/swift-nio-examples/http2-client/.build/checkouts/swift-nio-ssl/Sources/CNIOBoringSSL/ssl/tls_method.cc:57:
In file included from /Users/aeris/hswork/http2/swift-nio-examples/http2-client/.build/checkouts/swift-nio-ssl/Sources/CNIOBoringSSL/include/CNIOBoringSSL_ssl.h:145:
/Users/aeris/hswork/http2/swift-nio-examples/http2-client/.build/checkouts/swift-nio-ssl/Sources/CNIOBoringSSL/include/CNIOBoringSSL_base.h:478:10: fatal error: 'memory' file not found
#include <memory>
         ^~~~~~~~
In file included from /Users/aeris/hswork/http2/swift-nio-examples/http2-client/.build/checkouts/swift-nio-ssl/Sources/CNIOBoringSSL/ssl/tls13_server.cc:15:
In file included from /Users/aeris/hswork/http2/swift-nio-examples/http2-client/.build/checkouts/swift-nio-ssl/Sources/CNIOBoringSSL/include/CNIOBoringSSL_ssl.h:145:

         ^~~~~~~~
1 error generated.
1 error generated.
[6/435] Compiling tls_method.cc

Steps to reproduce

  1. git clone https://github.com/apple/swift-nio-examples.git
  2. cd swift-nio-examples
  3. cd http2-client
  4. swift build

If possible, minimal yet complete reproducer code (or URL to code)

[anything to help us reproducing the issue]

version/commit hashes from all involved dependencies

[tag/commit hash]

Swift & OS version (output of swift --version && uname -a)

swift version: swift/5.2.4 macos:10.15.4

Lukasa commented 4 years ago

Huh. <memory> is a standard C++ header, part of the C++ STL, and present when compiling in C++11 mode, which is what CNIOBoringSSL does. Can you try deleting your .swiftpm and .build directories, as well as your Package.resolved, and rebuild?

If that doesn’t work, we can investigate whether there’s an issue with your sytem.