Skip to content

Proxygen for iOS #489

Open
Open

Description

@pedro-alfonso-miris

HI,

Is it possible to compile proxygen for iOS?

Activity

  1. lnicco commented on Mar 18, 2024

    @lnicco
    Contributor

    we don't provide a build script for ios (the getdeps build system doesn't support that at this time), but we do build the library for ios internally, so the code should build fine and work if you include it in an ios project

  2. pedro-alfonso-miris commented on Mar 19, 2024

    @pedro-alfonso-miris
    Author

    Thanks for the swift response. We're compiling proxygen with VS Code in our Apple M2 machines and getting these linker errors:

    [build] Undefined symbols for architecture arm64:
    [build]   "folly::SocketAddress::setFromIpPort(char const*, unsigned short)", referenced from:
    [build]       folly::SocketAddress::SocketAddress(char const*, unsigned short, bool) in IlluscioPointCore[85](Http3Server.cpp.o)
    [build]   "folly::SocketAddress::setFromHostPort(char const*, unsigned short)", referenced from:
    [build]       folly::SocketAddress::SocketAddress(char const*, unsigned short, bool) in IlluscioPointCore[85](Http3Server.cpp.o)
    [build]   "folly::ltrimWhitespace(folly::Range<char const*>)", referenced from:
    [build]       folly::trimWhitespace(folly::Range<char const*>) in IlluscioPointCore[86](EchoHandler.cpp.o)
    [build]   "folly::rtrimWhitespace(folly::Range<char const*>)", referenced from:
    [build]       folly::trimWhitespace(folly::Range<char const*>) in IlluscioPointCore[86](EchoHandler.cpp.o)
    [build]   "folly::IOBuf::appendToChain(std::__1::unique_ptr<folly::IOBuf, std::__1::default_delete<folly::IOBuf>>&&)", referenced from:
    [build]       folly::IOBuf::prependChain(std::__1::unique_ptr<folly::IOBuf, std::__1::default_delete<folly::IOBuf>>&&) in IlluscioPointCore[86](EchoHandler.cpp.o)
    [build]   "folly::IOBuf::~IOBuf()", referenced from:
    [build]       std::__1::default_delete<folly::IOBuf>::operator()[abi:ue170006](folly::IOBuf*) const in IlluscioPointCore[86](EchoHandler.cpp.o)
    [build]   "folly::IOBuf::operator delete(void*)", referenced from:
    [build]       std::__1::default_delete<folly::IOBuf>::operator()[abi:ue170006](folly::IOBuf*) const in IlluscioPointCore[86](EchoHandler.cpp.o)
    [build]   "folly::detail::to_ascii_table<10ull, folly::to_ascii_alphabet<false>>::data", referenced from:
    [build]       unsigned long folly::to_ascii_with<10ull, folly::to_ascii_alphabet<false>, 20ul>(char (&) [20ul], unsigned long long) in IlluscioPointCore[86](EchoHandler.cpp.o)
    [build]       unsigned long folly::to_ascii_with<10ull, folly::to_ascii_alphabet<false>, 20ul>(char (&) [20ul], unsigned long long) in IlluscioPointCore[86](EchoHandler.cpp.o)
    [build]   "folly::detail::to_ascii_powers<10ull, unsigned long long>::data", referenced from:
    [build]       unsigned long folly::to_ascii_size<10ull>(unsigned long long) in IlluscioPointCore[86](EchoHandler.cpp.o)
    [build]       unsigned long folly::to_ascii_with<10ull, folly::to_ascii_alphabet<false>, 20ul>(char (&) [20ul], unsigned long long) in IlluscioPointCore[86](EchoHandler.cpp.o)
    [build]   "folly::detail::ScopeGuardImplBase::terminate()", referenced from:
    [build]       folly::detail::ScopeGuardImpl<proxygen::ResponseBuilder::send()::'lambda'(), true>::execute() in IlluscioPointCore[86](EchoHandler.cpp.o)
    [build]   "folly::IPAddress::IPAddress()", referenced from:
    [build]       folly::SocketAddress::AddrStorage::AddrStorage() in IlluscioPointCore[85](Http3Server.cpp.o)
    [build]   "proxygen::HTTPServer::bind(std::__1::vector<proxygen::HTTPServer::IPConfig, std::__1::allocator<proxygen::HTTPServer::IPConfig>> const&)", referenced from:
    [build]       Illuscio::Http3Server::startServer() in IlluscioPointCore[85](Http3Server.cpp.o)
    [build]   "proxygen::HTTPServer::start(std::__1::function<void ()>, std::__1::function<void (std::exception_ptr)>, std::__1::shared_ptr<wangle::AcceptorFactory>, std::__1::shared_ptr<folly::IOThreadPoolExecutor>)", referenced from:
    [build]       Illuscio::Http3Server::startServer()::$_0::operator()() const in IlluscioPointCore[85](Http3Server.cpp.o)
    [build]   "proxygen::HTTPServer::HTTPServer(proxygen::HTTPServerOptions)", referenced from:
    [build]       std::__1::__unique_if<proxygen::HTTPServer>::__unique_single std::__1::make_unique[abi:ue170006]<proxygen::HTTPServer, proxygen::HTTPServerOptions>(proxygen::HTTPServerOptions&&) in IlluscioPointCore[85](Http3Server.cpp.o)
    [build]   "proxygen::HTTPServer::~HTTPServer()", referenced from:
    [build]       std::__1::default_delete<proxygen::HTTPServer>::operator()[abi:ue170006](proxygen::HTTPServer*) const in IlluscioPointCore[85](Http3Server.cpp.o)
    [build]   "proxygen::HTTPHeaders::~HTTPHeaders()", referenced from:
    [build]       std::__1::default_delete<proxygen::HTTPHeaders>::operator()[abi:ue170006](proxygen::HTTPHeaders*) const in IlluscioPointCore[86](EchoHandler.cpp.o)
    [build]   "proxygen::HTTPMessage::setStatusCode(unsigned short)", referenced from:
    [build]       proxygen::ResponseBuilder::status(unsigned short, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) in IlluscioPointCore[86](EchoHandler.cpp.o)
    [build]   "proxygen::HTTPMessage::setHTTPVersion(unsigned char, unsigned char)", referenced from:
    [build]       proxygen::ResponseBuilder::status(unsigned short, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) in IlluscioPointCore[86](EchoHandler.cpp.o)
    [build]   "proxygen::HTTPMessage::HTTPMessage()", referenced from:
    [build]       std::__1::__unique_if<proxygen::HTTPMessage>::__unique_single std::__1::make_unique[abi:ue170006]<proxygen::HTTPMessage>() in IlluscioPointCore[86](EchoHandler.cpp.o)
    [build]   "proxygen::HTTPMessage::~HTTPMessage()", referenced from:
    [build]       std::__1::default_delete<proxygen::HTTPMessage>::operator()[abi:ue170006](proxygen::HTTPMessage*) const in IlluscioPointCore[86](EchoHandler.cpp.o)
    [build]   "proxygen::HTTPCommonHeaders::getPointerToTable(proxygen::HTTPCommonHeaderTableType)", referenced from:
    [build]       proxygen::HTTPCommonHeaders::getPointerToName(proxygen::HTTPHeaderCode, proxygen::HTTPCommonHeaderTableType) in IlluscioPointCore[86](EchoHandler.cpp.o)
    [build]   "proxygen::HTTPCommonHeaders::hash(char const*, unsigned long)", referenced from:
    [build]       void proxygen::HTTPHeaders::add<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&>(folly::Range<char const*>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) in IlluscioPointCore[86](EchoHandler.cpp.o)
    [build]   "folly::IOBuf::computeChainDataLength() const", referenced from:
    [build]       proxygen::ResponseBuilder::send() in IlluscioPointCore[86](EchoHandler.cpp.o)
    [build]       proxygen::ResponseBuilder::send() in IlluscioPointCore[86](EchoHandler.cpp.o)
    [build]   "proxygen::HTTPMessage::getStatusCode() const", referenced from:
    [build]       proxygen::ResponseBuilder::send() in IlluscioPointCore[86](EchoHandler.cpp.o)
    [build] ld: symbol(s) not found for architecture arm64
    [build] clang: error: linker command failed with exit code 1 (use -v to see invocation)
    [build] ninja: build stopped: subcommand failed.
    

    Kindly let us know how to fix these errors...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions