shadowsocks / libQtShadowsocks

A lightweight and ultra-fast shadowsocks library written in C++14 with Qt framework
GNU Lesser General Public License v3.0
1.5k stars 645 forks source link

Linking dylib on macos 10.13.4 fails #186

Closed akamensky closed 6 years ago

akamensky commented 6 years ago

Branch: stable (2594d83ea02f9ca6b19e682a228344205fb478bf) Building with Qt5.10.1 static build

cmake cmdline: cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/qt/libQtShadowsocks -DQt5Core_DIR=/usr/local/qt/5.10.1-static/lib/cmake/Qt5Core -DQt5Network_DIR=/usr/local/qt/5.10.1-static/lib/cmake/Qt5Network -DQt5Test_DIR=/usr/local/qt/5.10.1-static/lib/cmake/Qt5Test

make cmdline: make all

[100%] Linking CXX shared library libQtShadowsocks.dylib
undef: __objc_empty_cache
undef: _OBJC_CLASS_$_NSApplication
undef: _OBJC_CLASS_$_NSNotificationCenter
undef: _OBJC_CLASS_$_NSBundle
undef: _OBJC_CLASS_$_NSAutoreleasePool
undef: _OBJC_CLASS_$_NSString
undef: _OBJC_CLASS_$_NSUUID
undef: _SSLGetNumberSupportedCiphers
undef: _kSecPolicyOid
undef: _kSecPolicyAppleSSL
undef: _kSecPolicyClient
undef: _SecTrustSettingsCopyCertificates
undef: _kSCPropNetProxiesHTTPPort
undef: _SecTrustSettingsCopyTrustSettings
undef: _SSLSetConnection
undef: _NSSearchPathForDirectoriesInDomains
undef: _UTTypeCreatePreferredIdentifierForTag
undef: _SSLSetPeerDomainName
undef: _SSLCreateContext
undef: _SSLSetClientSideAuthenticate
undef: _kSecImportExportKeychain
undef: _kSecRandomDefault
undef: _kCFProxyTypeHTTP
undef: _kCFProxyTypeNone
undef: _SecPKCS12Import
undef: _objc_msgSend_stret
undef: _objc_enumerationMutation
undef: _SSLSetCertificate
undef: _SSLCopyPeerTrust
undef: _SecCertificateCopyData
undef: _SecCertificateCreateWithData
undef: _SSLHandshake
undef: _SecTrustSetAnchorCertificates
undef: _SSLGetNegotiatedProtocolVersion
undef: _NSTemporaryDirectory
undef: _SCDynamicStoreCopyProxies
undef: _CFNetworkExecuteProxyAutoConfigurationURL
undef: _kCFProxyTypeSOCKS
undef: _kCFProxyTypeKey
undef: _kCFProxyTypeHTTPS
undef: _SSLSetProtocolVersionMin
undef: _kCFProxyHostNameKey
undef: _kCFProxyUsernameKey
undef: _kCFProxyPasswordKey
undef: _kCFProxyPortNumberKey
undef: _kSCPropNetProxiesHTTPEnable
undef: _kSecImportExportPassphrase
undef: _kSCPropNetProxiesProxyAutoConfigEnable
undef: _kCFProxyTypeFTP
undef: _SecPolicyCopyProperties
undef: _SSLRead
undef: _kSecImportItemCertChain
undef: _SSLSetSessionOption
undef: _kSCPropNetProxiesFTPProxy
undef: _pcre2_code_free_16
undef: _kSCPropNetProxiesExceptionsList
undef: _deflateEnd
undef: _kSCPropNetProxiesFTPPort
undef: _kSCPropNetProxiesSOCKSPort
undef: _OBJC_CLASS_$_NSProcessInfo
undef: _kSCPropNetProxiesSOCKSEnable
undef: _kSCPropNetProxiesSOCKSProxy
undef: _pcre2_match_16
undef: _kSCPropNetProxiesHTTPSEnable
undef: _kSCPropNetProxiesHTTPSProxy
undef: _SecRandomCopyBytes
undef: _SecTrustGetCertificateAtIndex
undef: _inflateInit_
undef: _inflate
undef: _SecTrustSetAnchorCertificatesOnly
undef: _pcre2_pattern_info_16
undef: _kSecImportItemIdentity
undef: _inflateInit2_
undef: _objc_msgSendSuper2
undef: _SSLSetDiffieHellmanParams
undef: _UTTypeConformsTo
undef: _pcre2_get_ovector_pointer_16
undef: _kUTTagClassFilenameExtension
undef: _SSLGetNegotiatedCipher
undef: _SecKeychainCreate
undef: _pcre2_config_16
undef: _LSCopyDefaultApplicationURLForURL
undef: _pcre2_match_context_create_16
undef: _SSLSetIOFuncs
undef: _kSCPropNetProxiesFTPEnable
undef: _objc_msgSend
undef: _pcre2_jit_compile_16
undef: _kSCPropNetProxiesHTTPProxy
undef: _kUTTypeBundle
undef: _SSLGetSupportedCiphers
undef: _uncompress
undef: _inflateEnd
undef: _pcre2_jit_stack_assign_16
undef: _pcre2_match_data_create_from_pattern_16
undef: _SecKeychainDelete
undef: _SSLWrite
undef: _pcre2_match_context_free_16
undef: _pcre2_jit_stack_create_16
undef: _deflate
undef: _kSCPropNetProxiesProxyAutoConfigURLString
undef: _pcre2_jit_stack_free_16
undef: _inflateSetDictionary
undef: _SecTrustGetCertificateCount
undef: _kSCPropNetProxiesExcludeSimpleHostnames
undef: _pcre2_match_data_free_16
undef: _kSCPropNetProxiesHTTPSPort
undef: _SSLClose
undef: _deflateInit_
undef: _SSLSetProtocolVersionMax
undef: _SecTrustEvaluate
undef: _pcre2_compile_16
Undefined symbols for architecture x86_64:
  "__objc_empty_cache", referenced from:
      _OBJC_CLASS_$_QMacAutoReleasePoolTracker in lto.o
      _OBJC_METACLASS_$_QMacAutoReleasePoolTracker in lto.o
      _OBJC_METACLASS_$_QT_ROOT_LEVEL_POOL__THESE_OBJECTS_WILL_BE_RELEASED_WHEN_QAPP_GOES_OUT_OF_SCOPE in lto.o
      _OBJC_CLASS_$_QT_ROOT_LEVEL_POOL__THESE_OBJECTS_WILL_BE_RELEASED_WHEN_QAPP_GOES_OUT_OF_SCOPE in lto.o
      _OBJC_CLASS_$_RunLoopModeTracker in lto.o
      _OBJC_METACLASS_$_RunLoopModeTracker in lto.o
  "_OBJC_CLASS_$_NSApplication", referenced from:
      objc-class-ref in lto.o
  "_OBJC_CLASS_$_NSNotificationCenter", referenced from:
      objc-class-ref in lto.o
  "_OBJC_CLASS_$_NSBundle", referenced from:
      objc-class-ref in lto.o
  "_OBJC_CLASS_$_NSAutoreleasePool", referenced from:
      objc-class-ref in lto.o
  "_OBJC_CLASS_$_NSString", referenced from:
      objc-class-ref in lto.o
  "_OBJC_CLASS_$_NSUUID", referenced from:
      objc-class-ref in lto.o
  "_SSLGetNumberSupportedCiphers", referenced from:
      QSslSocketPrivate::ensureInitialized() in lto.o
  "_kSecPolicyOid", referenced from:
      QSslSocketPrivate::ensureInitialized() in lto.o
  "_kSecPolicyAppleSSL", referenced from:
      QSslSocketPrivate::ensureInitialized() in lto.o
  "_kSecPolicyClient", referenced from:
      QSslSocketPrivate::ensureInitialized() in lto.o
  "_SecTrustSettingsCopyCertificates", referenced from:
      QSslSocketPrivate::ensureInitialized() in lto.o
  "_kSCPropNetProxiesHTTPPort", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_SecTrustSettingsCopyTrustSettings", referenced from:
      QSslSocketPrivate::ensureInitialized() in lto.o
  "_SSLSetConnection", referenced from:
      QSslSocketBackendPrivate::initSslContext() in lto.o
  "_NSSearchPathForDirectoriesInDomains", referenced from:
      QLoggingRegistry::instance() in lto.o
  "_UTTypeCreatePreferredIdentifierForTag", referenced from:
      QFileSystemEngine::fillMetaData(QFileSystemEntry const&, QFileSystemMetaData&, QFlags<QFileSystemMetaData::MetaDataFlag>) in lto.o
  "_SSLSetPeerDomainName", referenced from:
      QSslSocketBackendPrivate::initSslContext() in lto.o
  "_SSLCreateContext", referenced from:
      qt_createSecureTransportContext(QSslSocket::SslMode) in lto.o
  "_SSLSetClientSideAuthenticate", referenced from:
      QSslSocketBackendPrivate::initSslContext() in lto.o
  "_kSecImportExportKeychain", referenced from:
      QSslSocketBackendPrivate::setSessionCertificate(QString&, QAbstractSocket::SocketError&) in lto.o
  "_kSecRandomDefault", referenced from:
      QSslSocketBackendPrivate::setSessionCertificate(QString&, QAbstractSocket::SocketError&) in lto.o
  "_kCFProxyTypeHTTP", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_kCFProxyTypeNone", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_SecPKCS12Import", referenced from:
      QSslSocketBackendPrivate::setSessionCertificate(QString&, QAbstractSocket::SocketError&) in lto.o
  "_objc_msgSend_stret", referenced from:
      QOperatingSystemVersion::current() in lto.o
  "_objc_enumerationMutation", referenced from:
      runLoopMode(NSDictionary*) in lto.o
  "_SSLSetCertificate", referenced from:
      QSslSocketBackendPrivate::setSessionCertificate(QString&, QAbstractSocket::SocketError&) in lto.o
  "_SSLCopyPeerTrust", referenced from:
      QSslSocketBackendPrivate::startHandshake() in lto.o
  "_SecCertificateCopyData", referenced from:
      QSslSocketBackendPrivate::startHandshake() in lto.o
      QSslSocketPrivate::ensureInitialized() in lto.o
  "_SecCertificateCreateWithData", referenced from:
      QSslSocketBackendPrivate::startHandshake() in lto.o
  "_SSLHandshake", referenced from:
      QSslSocketBackendPrivate::startHandshake() in lto.o
  "_SecTrustSetAnchorCertificates", referenced from:
      QSslSocketBackendPrivate::startHandshake() in lto.o
  "_SSLGetNegotiatedProtocolVersion", referenced from:
      QSslSocketBackendPrivate::sessionProtocol() const in lto.o
  "_NSTemporaryDirectory", referenced from:
      QSslSocketBackendPrivate::setSessionCertificate(QString&, QAbstractSocket::SocketError&) in lto.o
  "_SCDynamicStoreCopyProxies", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_CFNetworkExecuteProxyAutoConfigurationURL", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_kCFProxyTypeSOCKS", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_kCFProxyTypeKey", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_kCFProxyTypeHTTPS", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_SSLSetProtocolVersionMin", referenced from:
      QSslSocketBackendPrivate::initSslContext() in lto.o
  "_kCFProxyHostNameKey", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_kCFProxyUsernameKey", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_kCFProxyPasswordKey", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_kCFProxyPortNumberKey", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_kSCPropNetProxiesHTTPEnable", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_kSecImportExportPassphrase", referenced from:
      QSslSocketBackendPrivate::setSessionCertificate(QString&, QAbstractSocket::SocketError&) in lto.o
  "_kSCPropNetProxiesProxyAutoConfigEnable", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_kCFProxyTypeFTP", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_SecPolicyCopyProperties", referenced from:
      QSslSocketPrivate::ensureInitialized() in lto.o
  "_SSLRead", referenced from:
      QSslSocketBackendPrivate::transmit() in lto.o
  "_kSecImportItemCertChain", referenced from:
      QSslSocketBackendPrivate::setSessionCertificate(QString&, QAbstractSocket::SocketError&) in lto.o
  "_SSLSetSessionOption", referenced from:
      QSslSocketBackendPrivate::initSslContext() in lto.o
  "_kSCPropNetProxiesFTPProxy", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_pcre2_code_free_16", referenced from:
      QRegularExpressionPrivate::~QRegularExpressionPrivate() in lto.o
      QRegularExpressionPrivate::compilePattern() in lto.o
  "_kSCPropNetProxiesExceptionsList", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_deflateEnd", referenced from:
      QSpdyProtocolHandler::~QSpdyProtocolHandler() in lto.o
  "_kSCPropNetProxiesFTPPort", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_kSCPropNetProxiesSOCKSPort", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_OBJC_CLASS_$_NSProcessInfo", referenced from:
      objc-class-ref in lto.o
  "_kSCPropNetProxiesSOCKSEnable", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_kSCPropNetProxiesSOCKSProxy", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_pcre2_match_16", referenced from:
      QRegularExpressionPrivate::doMatch(QString const&, int, int, int, QRegularExpression::MatchType, QFlags<QRegularExpression::MatchOption>, QRegularExpressionPrivate::CheckSubjectStringOption, QRegularExpressionMatchPrivate const*) const in lto.o
  "_kSCPropNetProxiesHTTPSEnable", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_kSCPropNetProxiesHTTPSProxy", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_SecRandomCopyBytes", referenced from:
      QSslSocketBackendPrivate::setSessionCertificate(QString&, QAbstractSocket::SocketError&) in lto.o
  "_SecTrustGetCertificateAtIndex", referenced from:
      QSslSocketBackendPrivate::startHandshake() in lto.o
  "_inflateInit_", referenced from:
      QHttpNetworkConnectionChannel::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) in lto.o
  "_inflate", referenced from:
      QHttpNetworkReplyPrivate::uncompressBodyData(QByteDataBuffer*, QByteDataBuffer*) in lto.o
      QSpdyProtocolHandler::parseHttpHeaders(char, QByteArray const&) in lto.o
  "_SecTrustSetAnchorCertificatesOnly", referenced from:
      QSslSocketBackendPrivate::startHandshake() in lto.o
  "_pcre2_pattern_info_16", referenced from:
      QRegularExpressionPrivate::compilePattern() in lto.o
      QRegularExpressionPrivate::doMatch(QString const&, int, int, int, QRegularExpression::MatchType, QFlags<QRegularExpression::MatchOption>, QRegularExpressionPrivate::CheckSubjectStringOption, QRegularExpressionMatchPrivate const*) const in lto.o
  "_kSecImportItemIdentity", referenced from:
      QSslSocketBackendPrivate::setSessionCertificate(QString&, QAbstractSocket::SocketError&) in lto.o
  "_inflateInit2_", referenced from:
      QHttpNetworkReplyPrivate::readHeader(QAbstractSocket*) in lto.o
      QHttpNetworkReplyPrivate::uncompressBodyData(QByteDataBuffer*, QByteDataBuffer*) in lto.o
  "_objc_msgSendSuper2", referenced from:
      -[QMacAutoReleasePoolTracker initWithPool:] in lto.o
      -[QMacAutoReleasePoolTracker dealloc] in lto.o
      -[RunLoopModeTracker init] in lto.o
      -[RunLoopModeTracker dealloc] in lto.o
  "_SSLSetDiffieHellmanParams", referenced from:
      QSslSocketBackendPrivate::initSslContext() in lto.o
  "_UTTypeConformsTo", referenced from:
      QFileSystemEngine::fillMetaData(QFileSystemEntry const&, QFileSystemMetaData&, QFlags<QFileSystemMetaData::MetaDataFlag>) in lto.o
  "_pcre2_get_ovector_pointer_16", referenced from:
      QRegularExpressionPrivate::doMatch(QString const&, int, int, int, QRegularExpression::MatchType, QFlags<QRegularExpression::MatchOption>, QRegularExpressionPrivate::CheckSubjectStringOption, QRegularExpressionMatchPrivate const*) const in lto.o
  "_kUTTagClassFilenameExtension", referenced from:
      QFileSystemEngine::fillMetaData(QFileSystemEntry const&, QFileSystemMetaData&, QFlags<QFileSystemMetaData::MetaDataFlag>) in lto.o
  "_SSLGetNegotiatedCipher", referenced from:
      QSslSocketBackendPrivate::sessionCipher() const in lto.o
  "_SecKeychainCreate", referenced from:
      QSslSocketBackendPrivate::setSessionCertificate(QString&, QAbstractSocket::SocketError&) in lto.o
  "_pcre2_config_16", referenced from:
      QRegularExpressionPrivate::compilePattern() in lto.o
  "_LSCopyDefaultApplicationURLForURL", referenced from:
      QFileSystemEngine::fillMetaData(QFileSystemEntry const&, QFileSystemMetaData&, QFlags<QFileSystemMetaData::MetaDataFlag>) in lto.o
  "_pcre2_match_context_create_16", referenced from:
      QRegularExpressionPrivate::doMatch(QString const&, int, int, int, QRegularExpression::MatchType, QFlags<QRegularExpression::MatchOption>, QRegularExpressionPrivate::CheckSubjectStringOption, QRegularExpressionMatchPrivate const*) const in lto.o
  "_SSLSetIOFuncs", referenced from:
      QSslSocketBackendPrivate::initSslContext() in lto.o
  "_kSCPropNetProxiesFTPEnable", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_objc_msgSend", referenced from:
      QOperatingSystemVersion::current() in lto.o
      QThreadPrivate::createEventDispatcher(QThreadData*) in lto.o
      QSystemLocale::query(QSystemLocale::QueryType, QVariant) const in lto.o
      QMacTimeZonePrivate::clone() const in lto.o
      QMacTimeZonePrivate::comment() const in lto.o
      QMacTimeZonePrivate::displayName(QTimeZone::TimeType, QTimeZone::NameType, QLocale const&) const in lto.o
      QMacTimeZonePrivate::abbreviation(long long) const in lto.o
      ...
  "_pcre2_jit_compile_16", referenced from:
      QRegularExpressionPrivate::doMatch(QString const&, int, int, int, QRegularExpression::MatchType, QFlags<QRegularExpression::MatchOption>, QRegularExpressionPrivate::CheckSubjectStringOption, QRegularExpressionMatchPrivate const*) const in lto.o
  "_kSCPropNetProxiesHTTPProxy", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_kUTTypeBundle", referenced from:
      QFileSystemEngine::fillMetaData(QFileSystemEntry const&, QFileSystemMetaData&, QFlags<QFileSystemMetaData::MetaDataFlag>) in lto.o
  "_SSLGetSupportedCiphers", referenced from:
      QSslSocketPrivate::ensureInitialized() in lto.o
  "_uncompress", referenced from:
      QResourceFileEnginePrivate::uncompress() const in lto.o
  "_inflateEnd", referenced from:
      QHttpNetworkReply::~QHttpNetworkReply() in lto.o
      QHttpNetworkReplyPrivate::clearHttpLayerInformation() in lto.o
      QHttpNetworkReplyPrivate::uncompressBodyData(QByteDataBuffer*, QByteDataBuffer*) in lto.o
  "_pcre2_jit_stack_assign_16", referenced from:
      QRegularExpressionPrivate::doMatch(QString const&, int, int, int, QRegularExpression::MatchType, QFlags<QRegularExpression::MatchOption>, QRegularExpressionPrivate::CheckSubjectStringOption, QRegularExpressionMatchPrivate const*) const in lto.o
  "_pcre2_match_data_create_from_pattern_16", referenced from:
      QRegularExpressionPrivate::doMatch(QString const&, int, int, int, QRegularExpression::MatchType, QFlags<QRegularExpression::MatchOption>, QRegularExpressionPrivate::CheckSubjectStringOption, QRegularExpressionMatchPrivate const*) const in lto.o
  "_SecKeychainDelete", referenced from:
      QSslSocketBackendPrivate::setSessionCertificate(QString&, QAbstractSocket::SocketError&) in lto.o
      (anonymous namespace)::EphemeralSecKeychain::~EphemeralSecKeychain() in lto.o
  "_SSLWrite", referenced from:
      QSslSocketBackendPrivate::transmit() in lto.o
  "_pcre2_match_context_free_16", referenced from:
      QRegularExpressionPrivate::doMatch(QString const&, int, int, int, QRegularExpression::MatchType, QFlags<QRegularExpression::MatchOption>, QRegularExpressionPrivate::CheckSubjectStringOption, QRegularExpressionMatchPrivate const*) const in lto.o
  "_pcre2_jit_stack_create_16", referenced from:
      QRegularExpressionPrivate::doMatch(QString const&, int, int, int, QRegularExpression::MatchType, QFlags<QRegularExpression::MatchOption>, QRegularExpressionPrivate::CheckSubjectStringOption, QRegularExpressionMatchPrivate const*) const in lto.o
  "_deflate", referenced from:
      QSpdyProtocolHandler::sendRequest() in lto.o
  "_kSCPropNetProxiesProxyAutoConfigURLString", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_pcre2_jit_stack_free_16", referenced from:
      QThreadStorage<QPcreJitStackPointer*>::deleteData(void*) in lto.o
  "_inflateSetDictionary", referenced from:
      QSpdyProtocolHandler::parseHttpHeaders(char, QByteArray const&) in lto.o
  "_SecTrustGetCertificateCount", referenced from:
      QSslSocketBackendPrivate::startHandshake() in lto.o
  "_kSCPropNetProxiesExcludeSimpleHostnames", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_pcre2_match_data_free_16", referenced from:
      QRegularExpressionPrivate::doMatch(QString const&, int, int, int, QRegularExpression::MatchType, QFlags<QRegularExpression::MatchOption>, QRegularExpressionPrivate::CheckSubjectStringOption, QRegularExpressionMatchPrivate const*) const in lto.o
  "_kSCPropNetProxiesHTTPSPort", referenced from:
      QNetworkProxyFactory::proxyForQuery(QNetworkProxyQuery const&) in lto.o
  "_SSLClose", referenced from:
      QSslSocketBackendPrivate::disconnectFromHost() in lto.o
  "_deflateInit_", referenced from:
      QHttpNetworkConnectionChannel::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) in lto.o
  "_SSLSetProtocolVersionMax", referenced from:
      QSslSocketBackendPrivate::initSslContext() in lto.o
  "_SecTrustEvaluate", referenced from:
      QSslSocketBackendPrivate::startHandshake() in lto.o
  "_pcre2_compile_16", referenced from:
      QRegularExpressionPrivate::compilePattern() in lto.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[3]: *** [lib/libQtShadowsocks.2.1.0.dylib] Error 1
make[2]: *** [lib/CMakeFiles/QtShadowsocks.dir/all] Error 2
make[1]: *** [lib/CMakeFiles/QtShadowsocks.dir/rule] Error 2
make: *** [QtShadowsocks] Error 2
akamensky commented 6 years ago

Same error on current master branch

librehat commented 6 years ago

I don't have a Mac but it seems like a link line issue... Will need help to fix it, you can try to play with CMake rules to see if it can be addressed.

akamensky commented 6 years ago

I could look and see, perhaps it does not find relevant headers/libraries. But not sure how long that would take me as my schedule is a bit busy these days. Also I am far from familiar with cmake files. Any suggestions where to start looking would be appreciated.

akamensky commented 6 years ago

Okay, after some short digging I found that building against open-source version of Qt works flawlessly, but building against statically built version does not work (version built from sources provided by Qt for commercial license).

My curious question is whether this library I got will work when building statically linked application (I presume for license reasons this lib will have to be linked dynamically, since it is licensed under LGPL3 and not some more liberal but still compatible license).

librehat commented 6 years ago

Statically linking is always tricky, it's not working very well so you're really looking into a rabbit hole now :rabbit2:

akamensky commented 6 years ago

This keeps me wondering -- why on Earth LGPL? Qt libraries are not restricted to GPL/LGPL licenses, any other license with more liberal permissions could be used, such as BSD (3 clause) or MIT, or even Apache. With all honesty -- GPL is evil, which either forces me to link dynamically (and then my application is unusable for my case of tiny embedded device due to size restrictions) or I am forced to open-source it (or at the very least provide static libs for manual relinking by whomever), which none of the business would agree to do.

And static linking is not that complicated to be fearing it :)

akamensky commented 6 years ago

I guess can be closed as seems there is no way to properly link this library to statically built Qt application (as it drags in 3 other libs that combined make the size of over 10 MB and that's not counting the size of application executable itself which is about 5 MB when statically linked).