mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-poco.git
synced 2025-10-30 18:17:50 +00:00
* fix a leak, add some table features * few PostgreSQL fixes * GH #2351: WebSocket docs * Rename pcre internal symbols used by Poco to avoid symbol collision https://github.com/pocoproject/poco/issues/2916 This patch was backported from https://github.com/pld-linux/poco/blob/master/pcre.patch * Fix warning in clang * Fix MSVC clang build fail * Zip and SevenZip do not depend on Util, XML, JSON * Added Test and new Pattern 'O' to only log the Filename not the full Path. * Updated Comment * Configuration to receive OCSP stapling response for client connections and callback implementation to verify the response if the server returns any response * removed SDK version from project files * run Application::initialize() in try-catch block * fix Invalid condition [ICMPv4PacketImpl.cpp:234] #2783 * style fixes for #2935; check OpenSSL version * Fixed issue 2945 (#2946) * Fixed #2945 * Added unit tests for #2945 * Dissalow iterator on empty Var (#2945) * Updated unit tests for #2945 * More concise unit tests for #2945 * Removed some more clutter (#2945) * NetSSL_Win: fix potential endless loop due to wrong error handling * fixed GH #2970: Poco::Data::TypeHandler<Poco::Nullable<T>>::prepare() must prepare with underlying type, not Poco::Data::Keywords::null * Fixed linking with Data ODBC error on some platforms * Fix set padding call for new versions of OpenSSL * PatternFormatter priorityNames fix * PKCS12Container: fix memory leaks on exceptions * Fix constness of URI::getPathSegments * Fix typo in the ThreadPool's docs * cmake: use GNUInstallDirs * Changed EventHandlerMap key (#3116) * Changed EventHandlerMap key Changed EventHandlerMap key from Socket to poco_socket_t to avoid errors in removing/access EventHandlerMap when for example we make an SSL handshake * Changed EventHandlerMap key Changed EventHandlerMap key from Socket to poco_socket_t to avoid errors in removing/access EventHandlerMap when for example we make an SSL handshake * avoid too much call to sockfd() and impl() * Fix configuration error while cross compiling (#3127) During the configuration phase in a cross compilation scenario, `include(InstallRequiredSystemLibraries)` fails even if `MSVC_REDIST_DIR` is provided. This should not be an hard error, in case someone wants to compile/use the library, and not package it. As explained on https://reviews.llvm.org/D41220, the most sensible fix is to include `InstallRequiredSystemLibraries` only on a Windows host. * crash when remove key from JSON::Object(JSON_PRESERVE_KEY_ORDER). (#3151) * #3153: Poco::Data::ODBC [N]VARCHAR(MAX) wrong maxDataSize() result * [SharedPtr] Poco::makeSharedArray #3200 * #3202: JWT: ESxxx signature must include padding for ECDSA R and S values * feat(HashRange): port HashRange from boost * chore(cmake): spelling typo fix * fix(hashRange): change function names casing * merge changes from 1.10.2 * formatting * merge JSON formatting changes from 1.10.2 * added Application::windowSize() * RemoteSyslogChannel/RemoteSyslogListener: make UDP buffer size configurable * merge fix from 1.10.2 * merge Postgres fixes from 1.10.2 * #2993: The Sec-WebSocket-Key of WebSocket is always the same one * formatting * #2927 * remove HowToGetHelp page due to outdated information * formatting * #3044: Upgrade PCRE to 8.44 * #3086: Use POCO_IOS_INIT_HACK for Linux in combination with libc++ * #3095: Digest proxy authentication does not work in 1.10.1 * #3136: Fixed null character issue when parsing a JSON * #3114: Added JSON Array::empty() method * #3230: ECDSADigestEngine: include missing header * fix include order * include order * fix(PollSet): #3248 #3249 * chore(UDPServer): fix spelling * feat(SocketReactor): extract and expose poll() as a member function * feat(Endpoint): add Endpoint (socket address directly wrapping native structures) * fix(Endpoint): osx build, align family enum with patform, some other adjustments * fix(EndpointTest): add missing include * feat(Endpoint): add some low-level accessors * feat(IPAddress): add functions returning addres as raw bytes * feat(DatagramSocket): DatagramSocket does not allow IPV6_V6ONLY #3283 * feat(SocketReactor): Add completion handling to SocketReactor #3290 * feat(SocketReactor): Add completion handling to SocketReactor #3290 (add scheduled handlers and runOne()) * chore(Net-testsuite): fix some tests warnings * feat: move semantics for sockets and addresses * fix(NetworkInterface): Unterminated string possible in NetworkInterfaceImpl::setPhyParams() #3301 * feat(Net): Add move semantics to Net (sockets and addresses) #3296 * fix(HostEntry): DNS HostEntry returns multiple entries #3303 * fix(SocketReactor): completion handling fixes and tests, separation of i/o and completion mutexes * feat(SocketReactor): execute permanent completion handlers on when there are I/O handlers and the expired ones whenever they expire * feat(Socket): expose lastError() * fix(SocketReactor): windows compile * windows fixes, remove Endnpoint * feat(Socket): expose error() * feat(PollSet): Use select() on windows for PollSet #3339 * add ci.yml * fix compile errors * revert(SocketReactor): back to devel branch * feat(SocketProactor): initial version w/ completion handler and executor * chore(SocketProactor): Sockets package * chore(ci): add dir and run script * feat(SocketProactor): add socket error handling #3357 * modify(SocketProactor): wait for completion handlers availability #3357 * feat(PollSet): Make PollSet::poll() interruptible #3359 * modify(SocketProactor): make addSend() public #3357 * modify(SocketProactor): platform non-interrupt sleep without Poco thread #3357 * modify(SocketProactor): allow restart #3357 * fix(SocketProactor): windows fixes and VS build * fix(SocketProactor): race when stop() is called before run() * fix(Socket): Windows SO_REUSEADDR is neither reliable nor safe #3380 * fix(SocketProactor): rvalue refs should not be const * fix(DNS): DNS::hostByAddress not thread-safe #3381 * chore(SocketProactor): remove unnecessary this capture * fix(IPAddress): IPAddress::tryParse does not work for :: #3385 * fix(SoccketProactor): add some try/catch safety nets; broaden the work list mutex coverage to protect all function access * fix(SocketProactor): use Poco::Mutex only * fix(SocketProactor): scheduled work skipped in the absence of socket events * fix(SocketProactor): test * chore (SocketProactor): add some state members * Fix clang linker problem by defining POCO_NO_AUTOMATIC_LIBS (#3177) * Basic support for OpenSSL 3.0.0 (#3448) * updated README.md * Create close-inactive-issues.yml * check return codes of EVP_CIPHER_CTX_new and EVP_CipherInit Especially with OpenSSL 3, it is possible that EVP_CipherInit may fail even when passed a non-null cipher[1]. Without the checking, it will finally get to a segfault. [1] https://github.com/openssl/openssl/issues/16864 * Automatically load default and legacy providers with OpenSSL 3 Without the legacy provider [1], some ciphers are not available. For example, the 'des-ecb' one used by test sutie is missed and the test will fail. [1] OSSL_PROVIDER-LEGACY(7ossl) * Make p12 ca order the same as pem OpenSSL < 3 returns p12 ca order in reversed order. This is fixed in OpenSSL 3. We work around it with old OpenSSL. See: https://github.com/openssl/openssl/issues/16421 https://github.com/openssl/openssl/pull/12641f5eb85eb0f* Implement SSL abort handling on OpenSSL 3 On an unexpected EOF, versions before OpenSSL 3.0 returned SSL_ERROR_SYSCALL, nothing was added to the error stack, and errno was 0. Since OpenSSL 3.0 the returned error is SSL_ERROR_SSL with a meaningful error on the error stack.[1] [1] SSL_GET_ERROR(3ossl) Co-authored-by: Günter Obiltschnig <guenter.obiltschnig@appinf.com> Co-authored-by: Robin Lee <cheeselee@fedoraproject.org> Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com> * fix(Socket): shutdown fixes from pull #3448 * chore: cleanup * fix(X509Certificate): add missing string format * feat(EVP): 3.0 support - add EVPCipher - additional EVPPKey constructors - tests - fix and improve openssl-related exceptions Transition towards 3.0 support; deprecating direct EC and RSA interface portions. * fix(openssl): pre 3.0 compile * feat(Envelope): Add envelope to crypto #3561 * fix(Envelope): mac/clang compile * fix(Any): #3297 #3514 * Refactor/any soo (#3564) * refactor(Any): SOO - encapsulate data holders - add missing gets and ops - eliminate g++ warnings with enable_if's - default enable SOO * refactor(Placeholder): encapsulate SOO memory management and fix leaks; cf. #3297 #3514 * fix(Placeholder): asan errors and add tests cf. #3297 #3514 * fix(SSLManager): Race condition in SSLManager #3558 * fix(SHA2Engine): cannot use HMACEngine with SHA2Engine #3421 * refactor(Placeholder): ifdef POCO_NO_SOO only in Placeholder and remove it anywhere else (#3566) * refactor(Placeholder): more SOO consolidation and optimization * fix(FPEnvironment): Visual Studio Warning C4244 #3543 * fix(Extractor): move extraction decoding to AbstractExtractor #3396 * Netssl/openssl3 (#3575) * feat(Context): DH init openssl3 port (1/2 hardcoded params) * create poco-1.11.3 branch, bump version * update copyright date * #3567: check legacy provider existence for legacy exception #3567 * fix(Placeholder): comparison for zero value * feat(Context): DH init openssl3 port (2/2 params from file) * test(HTTPSClientSession): try/catch to understand CI failure * chore(cmake): copy the DH parameters file * fix(OpenSSLInitializer): unload provider on uninitialize * chore(HTTPSClientSessionTest): remove try/catch * fix(OpenSSLInitializer): fix provider unloading * feat(CppUnit): make tests exceptions more descriptive * chore(CppUnit): a more descriptive name for callback Co-authored-by: Günter Obiltschnig <guenter.obiltschnig@appinf.com> * fix(Foundation): update VS 2019 platform version * chore(Data): update VS project files (add Transcoder #3396) * fix(Data): Poco::Data::ODBC-dbEncoding property not used for insert/update #3396 * fix(Data): add transcoder to Makefile #3396 * Dev/devel 1.12.0 (#3585) * fix(PollSet): #3248 #3249 * bump version to 1.11.0 * updated changelog| * #3299: NetSSL: Allow per-Context InvalidCertificateHandler * #3022: Process::isRunning(PID pid) causes handle leak on Windows * #3022: fix for WinCE * upgrade bundled pdjson to latest master * update build configs - add support for Apple Silicon * #2906, #2904: Support environments without hardware floating point * #3130: fix error handling: report original error before close() * #3107: remove unused variable * #3219: SMTPClientSession: invalid SMTP command if empty recipients list in MailMessage * Poco::trim*() code cleanup - use ptrdiff_t instead of int; additional test cases * #3182 Poco::Process:launch on MacOS BigSur: limit maximum number of file descriptors to close before exec() to 100000 * #3278: Fixing no hardware floating point support - Part II * #3090: Do not initialize value with undefined behavior * #3163: Correct Var::parse null value * #3196: std::forward for Poco::Optional ctor with rvalue * #3068: Documented ENABLE_JWT option * #3041: PostgreSQL and TEXT column type * #3099: Fixed Postgres extraction into Dynamic::Var * #3138: Add support of arch riscv32 * #2825: riscv: Enable double operations when using double float abi * #3166: Fix PostgresSQL BLOB extractor * #3237: An error in the documentation for Poco/JSON/Parser.h * #3193: ServerApplication::registerService() unquoted path security vulnerability * #3266: Order of Util::Application::uninitialize() is not in reverse as documented * #3215: XML parser returns item from different element in a array * #3282: Update constant in setContentType documentation * #3089: HTTPSessionFactory does not support HTTPClientSession::ProxyConfig * #2418: SecureServerSocket doesn't work with IpV6 * fix warnings * #3019: ObjectPool wait on borrow condition fix * #3224: Remove SSL23 support from Poco/Crypto * #3191: Fixing a bug in the NetSSL_Win module (Host name verification failed error) * disallow SSLv3 * #3269: Poco::Net::Context initialization with empty certificateFile * #3307: Poco::Crypto::X509Certificate: obtain certificate fingerprint * #3260: Memory leak in EVPPKey::loadKey used with files & wrong password * #3157: fix(openssl): add missing dependency to OpenSSL components * #3066: CMake warning about MYSQL casing * #3135: Poco::Data::SQLite::Utility::fileToMemory unsuccessful if journal exists * #3217: CMake: warning message with -DPOCO_STATIC confusing * #3274: Fix localtime_r for VxWorks 6.9 and later * #2746, #3169: Fix race condition on TCPServerDispatcher stop * #3092: add more detailed error description when LoadLibrary fails| * #3074: Fix sessions may not return back to the pool * #3309: optimize parsing from stream (no copying of entire JSON to memory); limit maximum depth to avoid stack overflow with malicious documents (fuzzing - #3285); code cleanup * JSON Parser performance improvements * #3310: Upgrade bundled SQLite to 3.35.5 * fix UB/bad cast in TCPServerTest.cpp * add comment regarding potential UB in AnyTest::testCastToReference() * support sanitizers in build configs * bump version * fix 'catching polymorphic type by value' warnings * fix 'catching polymorphic type by value' warnings * fix 'catching polymorphic type by value' warnings * remove failing Android build; add sanitizer builds * update postgres version * fix warning * fix warning * add GitHub workflow * fix ci.yml * fix ci.yml * additional ci builds * fix ci.yml for macos and windows * fix(double-conversion): Upgrade bundled double-conversion #3313 * ci fixes * #3314: NetSSL_OpenSSL: any.pem certificate error: ca md too weak * testReuseSession: remove bad checks for session reuse * investigate failing test * investigate failing test * investigate failing test * investigate failing test * ci * remove travis and appveyor * ci, readme * ci fixes * fix ci * fix ci * fix ci * fix memory leak when ignoring test error/failure * fix ci * don't define UNREACHABLE as poco_bugcheck as it triggers 'control reaches end of non-void function' warning * add Linux cross build, build Data libs on macos * fix ci * add MySQL include/lib search paths for Homebrew * ci fixes * ci fixes * ci fixes * ci fixes * fix indluce paths for brew mysql * #3317: Data::MySQL MySQL headers and library search paths * fix ARM-Linux build config * fix MySQL.make * update FindMySQL.cmake * fix(SocketReactor): fix dataCollection test * chore: remove troubleshooting help leftovers * #3302: MSVC: Poco hides warnings (C4996) for the C++14 attribute [[deprecated]] * fix potential crash in testAsyncNotify: don't delete event object while async notification is still in progress * fix(PollSetTest): change connect to blocking * added ActiveRecord library and compiler * added dependencies file * update copyright dates * ActiveRecord: project files and fixes for MSVC * ci: enable ActiveRecord on Windows * fix(PollSetTest): remove poll timing check (fails on msvc ci) * fix ActiveRecord CMake build and configuration * feat(build): add gen directory (for generated sources) and macchina lib link dirs (if needed) * #3318: Data: Support Poco::UUID for data binding * ODBC tests for UUID, updated ActiveRecord projects * ActiveRecord user guide * update ActiveRecord documentation * documentation fixes * #3321: manually merge ODBC text encoding support * CppParser: merge changes from internal repository * updated Makefile * AbstractObserver::accepts() - add optional name parameter * fix SharedPtr::makeSharedArray() [merge from devel] * remove blank line * #2895, #2935: support OCSP stapling * style * clang support (merge from devel) * #3322: remove useless struct * link libmariadb instead of libmysql if headers indicate MariaDB * fix nullptr passed to memcmp/memcpy reported by ubsan * fix nullptr passed to memcmp/memcpy reported by ubsan * fix PageCompiler cross-compile; fix Content-Security-Policy header * remove Data release notes page * style, remove unused var * update docs * improve BLOB handling, clean-up code * fix(ICMPv4Packet): [asan] Undefined behavior in ICMPv4PacketImpl.cpp #3326 * fix(NumericString): Bug in NumericString with decSep != '.' #3159 * fix(HostEntry): DNS HostEntry returns multiple entries #3303 * fix(PollSet): #3248 #3249 * fix(NetworkInterface): Unterminated string possible in NetworkInterfaceImpl::setPhyParams() #3301 * style/whitespace * fix warnings * add version resources to executables * style * whitespace * update changelog * cpproj: also copy testsuite/include if it's there * branch off 1.11.1 * #3335: XML error when build 1.11.0 * #3353: add POCO_NO_FORK_EXEC CMake option * #3381: DNS::hostByAddress not thread-safe * #3400: fix std::localtime not thread safe * #3221: Crash reported on Windows in X509Certificate verification * #3344: [bug] MacOS bundle destination path is not set * #3360: Add POCO_PGSQL_{INCLUDE,LIB} variables * #3363: Fixed compilation error with MongoDB::Connection and Util::Application * #3377: Correct Poco::Path::configHome() and dataHome() documentation for Windows * #2823: error: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 * #3425: Fixed suspend/resumeEvents pair in DirectoryWatcher * #2966: SocketReactor loads one core of CPU up to 100% * #3330: Poco::Data::ODBC::ODBCStatementImpl causes crash * use OpenSSL 1.1.1 on macOS * add missing include search path * upgrade bundled PCRE to 8.45 * upgrade bundled SQLite to 3.36.0 * updated changelog * fix brew OpenSSL version * branch off poco-1.11.2 * #3506: Upgrade bundled expat to 2.4.4 * manually merge #3448, part 1 (Crypto) * manually merge #3448, part 1 (NetSSL) * #3515: NetSSL_OpenSSL Testsuite: testInterop() and testProxy() fail due to changed certificate * #3448: fix version check * #3465: NetSSL_Win: bad error handling when decodeMessage() fails * #3458: encryptString() crash on redhat/centos 8 with FIPS enabled using md5 default digest * #3505: JSON::PrintHandler.value(bool) prints incorrect value * #3527: Upgrade bundled expat to 2.4.5 * #3470: bug in JSON ParseHandler.cpp (RFC 7159 should be valid) * #3507: Reference counting for bound configuration in Util::Option is broken * #3518: Expat version check in #defines incorrect * #3338: NamedMutex does not work on Linux distributions where fs.protected_regular=1 * CI: don't build PageCompiler in ARM cross build * detect ARM64 on Windows * updated README.md * ProGen: support generation of VS 2022 project files * ci: add windows 2022 * fix library name * remove unused CppUnit headers * added VS2022 project files * #3530: Upgrade bundled expat to 2.4.6 * #3538: Upgrade bundled expat to 2.4.7 * Add back NIOS2 double conversion detection to fix compile errors The commit558324f672removed the nios2 support, which was originally added ine7b91e8125This commit add it back. Signed-off-by: Julien Olivain <ju.o@free.fr> * #3466: DefinePlatformSpecific.cmake: handle RelWithDebInfo and MinSizeRel configurations * #3524: remove XML and Util dependencies in Zip/SevenZip * #3483: Adds Windows 11 and Server 2022 to Environment::osDisplayName() * #3495: Array::operator[] should not throw * #3268: Poco redis command set have a bug when you want to set nx ex or expireTime * #3509: fix dst and utcOffset handling for Dublin time zone * #2882: another attempt at fixing it that should also work on other platforms * remove unused method in Timezone_WIN32.cpp * use tm_gmtoff on Linux * Basic support for OpenSSL 3.0.0 (#3448) * updated README.md * Create close-inactive-issues.yml * check return codes of EVP_CIPHER_CTX_new and EVP_CipherInit Especially with OpenSSL 3, it is possible that EVP_CipherInit may fail even when passed a non-null cipher[1]. Without the checking, it will finally get to a segfault. [1] https://github.com/openssl/openssl/issues/16864 * Automatically load default and legacy providers with OpenSSL 3 Without the legacy provider [1], some ciphers are not available. For example, the 'des-ecb' one used by test sutie is missed and the test will fail. [1] OSSL_PROVIDER-LEGACY(7ossl) * Make p12 ca order the same as pem OpenSSL < 3 returns p12 ca order in reversed order. This is fixed in OpenSSL 3. We work around it with old OpenSSL. See: https://github.com/openssl/openssl/issues/16421 https://github.com/openssl/openssl/pull/12641f5eb85eb0f* Implement SSL abort handling on OpenSSL 3 On an unexpected EOF, versions before OpenSSL 3.0 returned SSL_ERROR_SYSCALL, nothing was added to the error stack, and errno was 0. Since OpenSSL 3.0 the returned error is SSL_ERROR_SSL with a meaningful error on the error stack.[1] [1] SSL_GET_ERROR(3ossl) Co-authored-by: Günter Obiltschnig <guenter.obiltschnig@appinf.com> Co-authored-by: Robin Lee <cheeselee@fedoraproject.org> Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com> * fix(Socket): shutdown fixes from pull #3448 * #3500: Sandbox all iFrames in PocoDoc * #3549; replace assert with assertTrue * #3553: Upgrade bundled zlib to 1.2.12 * #3525: Bad management of file in case of OpenSSLException in X509Certificate::readPEM and X509Certificate::writePEM * disable OpenSSL deprecation warnings * chore: cleanup * fix(X509Certificate): add missing string format * #3559: Poco::Data::PostgreSQL - DateTime extraction truncates fractional seconds * feat(EVP): 3.0 support - add EVPCipher - additional EVPPKey constructors - tests - fix and improve openssl-related exceptions Transition towards 3.0 support; deprecating direct EC and RSA interface portions. * fix(openssl): pre 3.0 compile * feat(Envelope): Add envelope to crypto #3561 * fix(Envelope): mac/clang compile * fix(Any): #3297 #3514 * #3562: fixed OpenSSL setup/shutdown * fix exception text * #3563: Remove support for OpenSSL < 1.0 * ci jobs for OpenSSL 1.1 and 3 * updated CHANGELOG * updated .vscode * Refactor/any soo (#3564) * refactor(Any): SOO - encapsulate data holders - add missing gets and ops - eliminate g++ warnings with enable_if's - default enable SOO * refactor(Placeholder): encapsulate SOO memory management and fix leaks; cf. #3297 #3514 * fix(Placeholder): asan errors and add tests cf. #3297 #3514 * fix(SSLManager): Race condition in SSLManager #3558 * remove unused include * updated copyright date * PocoDoc: fix iframe sandboxing * fix(SHA2Engine): cannot use HMACEngine with SHA2Engine #3421 * refactor(Placeholder): ifdef POCO_NO_SOO only in Placeholder and remove it anywhere else (#3566) * refactor(Placeholder): more SOO consolidation and optimization * fix(FPEnvironment): Visual Studio Warning C4244 #3543 * fix(Extractor): move extraction decoding to AbstractExtractor #3396 * Netssl/openssl3 (#3575) * feat(Context): DH init openssl3 port (1/2 hardcoded params) * create poco-1.11.3 branch, bump version * update copyright date * #3567: check legacy provider existence for legacy exception #3567 * fix(Placeholder): comparison for zero value * feat(Context): DH init openssl3 port (2/2 params from file) * test(HTTPSClientSession): try/catch to understand CI failure * chore(cmake): copy the DH parameters file * fix(OpenSSLInitializer): unload provider on uninitialize * chore(HTTPSClientSessionTest): remove try/catch * fix(OpenSSLInitializer): fix provider unloading * feat(CppUnit): make tests exceptions more descriptive * chore(CppUnit): a more descriptive name for callback Co-authored-by: Günter Obiltschnig <guenter.obiltschnig@appinf.com> * fix(Foundation): update VS 2019 platform version * chore(Data): update VS project files (add Transcoder #3396) * fix(Data): Poco::Data::ODBC-dbEncoding property not used for insert/update #3396 * fix(Data): add transcoder to Makefile #3396 * fix(JWT): remove duplicate test functions after merge Co-authored-by: Günter Obiltschnig <guenter.obiltschnig@appinf.com> Co-authored-by: Julien Olivain <ju.o@free.fr> Co-authored-by: Robin Lee <robinlee.sysu@gmail.com> Co-authored-by: Robin Lee <cheeselee@fedoraproject.org> * #2755: Fix MySQL's LONGBLOB/LONGTEXT not allocating enough space (#3474) * Unit test for bug #2755. * Removed condition to set buffer length to 0. * Fixes to unit tests for LONGBLOB/TEXT data type. * Adjusted buffer sizes to accommodate LONGBLOBs. Co-authored-by: Hector Toledo Soto <hsoto@transperfect.com> * fix(Data): MySQL UUID binding temporary string #3587 * feat(CI): add MySQL tests to CI #3588 * fix(CI): remove mysql client dev (using mariadb) #3588 * fix(CI): another shot at mysql * fix(Net/testsuite): add missing include * fix(DatagramSocket): Socket::available does not always return correct value for UDP #3589 * fix(SocketProactor): few improvements (#3357) * fix(ICMPsocketTest): change appinf (doesn't respond to ping) to github * fix(PollSet): windows fixes * fix(PollSet): windows implementation fixes (multi-fd_set select); minor reactor fixes * Extract JSON type as string (#3491) * Declared JSON as string data # Conflicts: # Data/include/Poco/Data/MetaColumn.h # Data/src/RecordSet.cpp # Data/src/StatementImpl.cpp * Added JSON extractor as string * Added unit test * Update comment * Devel (#3586) * Enable unit test in cmake build * add BLOB SQLite test * accept notifications by name (if they have one) * catch std::exception on parsing * fix a leak, add some table features * few PostgreSQL fixes * GH #2351: WebSocket docs * Rename pcre internal symbols used by Poco to avoid symbol collision https://github.com/pocoproject/poco/issues/2916 This patch was backported from https://github.com/pld-linux/poco/blob/master/pcre.patch * Fix warning in clang * Fix MSVC clang build fail * Zip and SevenZip do not depend on Util, XML, JSON * Added Test and new Pattern 'O' to only log the Filename not the full Path. * Updated Comment * Configuration to receive OCSP stapling response for client connections and callback implementation to verify the response if the server returns any response * removed SDK version from project files * run Application::initialize() in try-catch block * fix Invalid condition [ICMPv4PacketImpl.cpp:234] #2783 * style fixes for #2935; check OpenSSL version * Fixed issue 2945 (#2946) * Fixed #2945 * Added unit tests for #2945 * Dissalow iterator on empty Var (#2945) * Updated unit tests for #2945 * More concise unit tests for #2945 * Removed some more clutter (#2945) * NetSSL_Win: fix potential endless loop due to wrong error handling * fixed GH #2970: Poco::Data::TypeHandler<Poco::Nullable<T>>::prepare() must prepare with underlying type, not Poco::Data::Keywords::null * Fixed linking with Data ODBC error on some platforms * Fix set padding call for new versions of OpenSSL * PatternFormatter priorityNames fix * PKCS12Container: fix memory leaks on exceptions * Fix constness of URI::getPathSegments * Fix typo in the ThreadPool's docs * cmake: use GNUInstallDirs * Changed EventHandlerMap key (#3116) * Changed EventHandlerMap key Changed EventHandlerMap key from Socket to poco_socket_t to avoid errors in removing/access EventHandlerMap when for example we make an SSL handshake * Changed EventHandlerMap key Changed EventHandlerMap key from Socket to poco_socket_t to avoid errors in removing/access EventHandlerMap when for example we make an SSL handshake * avoid too much call to sockfd() and impl() * Fix configuration error while cross compiling (#3127) During the configuration phase in a cross compilation scenario, `include(InstallRequiredSystemLibraries)` fails even if `MSVC_REDIST_DIR` is provided. This should not be an hard error, in case someone wants to compile/use the library, and not package it. As explained on https://reviews.llvm.org/D41220, the most sensible fix is to include `InstallRequiredSystemLibraries` only on a Windows host. * crash when remove key from JSON::Object(JSON_PRESERVE_KEY_ORDER). (#3151) * #3153: Poco::Data::ODBC [N]VARCHAR(MAX) wrong maxDataSize() result * [SharedPtr] Poco::makeSharedArray #3200 * #3202: JWT: ESxxx signature must include padding for ECDSA R and S values * feat(HashRange): port HashRange from boost * chore(cmake): spelling typo fix * fix(hashRange): change function names casing * merge changes from 1.10.2 * formatting * merge JSON formatting changes from 1.10.2 * added Application::windowSize() * RemoteSyslogChannel/RemoteSyslogListener: make UDP buffer size configurable * merge fix from 1.10.2 * merge Postgres fixes from 1.10.2 * #2993: The Sec-WebSocket-Key of WebSocket is always the same one * formatting * #2927 * remove HowToGetHelp page due to outdated information * formatting * #3044: Upgrade PCRE to 8.44 * #3086: Use POCO_IOS_INIT_HACK for Linux in combination with libc++ * #3095: Digest proxy authentication does not work in 1.10.1 * #3136: Fixed null character issue when parsing a JSON * #3114: Added JSON Array::empty() method * #3230: ECDSADigestEngine: include missing header * fix include order * include order * fix(PollSet): #3248 #3249 * chore(UDPServer): fix spelling * feat(SocketReactor): extract and expose poll() as a member function * feat(Endpoint): add Endpoint (socket address directly wrapping native structures) * fix(Endpoint): osx build, align family enum with patform, some other adjustments * fix(EndpointTest): add missing include * feat(Endpoint): add some low-level accessors * feat(IPAddress): add functions returning addres as raw bytes * feat(DatagramSocket): DatagramSocket does not allow IPV6_V6ONLY #3283 * feat(SocketReactor): Add completion handling to SocketReactor #3290 * feat(SocketReactor): Add completion handling to SocketReactor #3290 (add scheduled handlers and runOne()) * chore(Net-testsuite): fix some tests warnings * feat: move semantics for sockets and addresses * fix(NetworkInterface): Unterminated string possible in NetworkInterfaceImpl::setPhyParams() #3301 * feat(Net): Add move semantics to Net (sockets and addresses) #3296 * fix(HostEntry): DNS HostEntry returns multiple entries #3303 * fix(SocketReactor): completion handling fixes and tests, separation of i/o and completion mutexes * feat(SocketReactor): execute permanent completion handlers on when there are I/O handlers and the expired ones whenever they expire * feat(Socket): expose lastError() * fix(SocketReactor): windows compile * windows fixes, remove Endnpoint * feat(Socket): expose error() * feat(PollSet): Use select() on windows for PollSet #3339 * add ci.yml * fix compile errors * revert(SocketReactor): back to devel branch * feat(SocketProactor): initial version w/ completion handler and executor * chore(SocketProactor): Sockets package * chore(ci): add dir and run script * feat(SocketProactor): add socket error handling #3357 * modify(SocketProactor): wait for completion handlers availability #3357 * feat(PollSet): Make PollSet::poll() interruptible #3359 * modify(SocketProactor): make addSend() public #3357 * modify(SocketProactor): platform non-interrupt sleep without Poco thread #3357 * modify(SocketProactor): allow restart #3357 * fix(SocketProactor): windows fixes and VS build * fix(SocketProactor): race when stop() is called before run() * fix(Socket): Windows SO_REUSEADDR is neither reliable nor safe #3380 * fix(SocketProactor): rvalue refs should not be const * fix(DNS): DNS::hostByAddress not thread-safe #3381 * chore(SocketProactor): remove unnecessary this capture * fix(IPAddress): IPAddress::tryParse does not work for :: #3385 * fix(SoccketProactor): add some try/catch safety nets; broaden the work list mutex coverage to protect all function access * fix(SocketProactor): use Poco::Mutex only * fix(SocketProactor): scheduled work skipped in the absence of socket events * fix(SocketProactor): test * chore (SocketProactor): add some state members * Fix clang linker problem by defining POCO_NO_AUTOMATIC_LIBS (#3177) * Dev/devel 1.12.0 (#3585) * fix(PollSet): #3248 #3249 * bump version to 1.11.0 * updated changelog| * #3299: NetSSL: Allow per-Context InvalidCertificateHandler * #3022: Process::isRunning(PID pid) causes handle leak on Windows * #3022: fix for WinCE * upgrade bundled pdjson to latest master * update build configs - add support for Apple Silicon * #2906, #2904: Support environments without hardware floating point * #3130: fix error handling: report original error before close() * #3107: remove unused variable * #3219: SMTPClientSession: invalid SMTP command if empty recipients list in MailMessage * Poco::trim*() code cleanup - use ptrdiff_t instead of int; additional test cases * #3182 Poco::Process:launch on MacOS BigSur: limit maximum number of file descriptors to close before exec() to 100000 * #3278: Fixing no hardware floating point support - Part II * #3090: Do not initialize value with undefined behavior * #3163: Correct Var::parse null value * #3196: std::forward for Poco::Optional ctor with rvalue * #3068: Documented ENABLE_JWT option * #3041: PostgreSQL and TEXT column type * #3099: Fixed Postgres extraction into Dynamic::Var * #3138: Add support of arch riscv32 * #2825: riscv: Enable double operations when using double float abi * #3166: Fix PostgresSQL BLOB extractor * #3237: An error in the documentation for Poco/JSON/Parser.h * #3193: ServerApplication::registerService() unquoted path security vulnerability * #3266: Order of Util::Application::uninitialize() is not in reverse as documented * #3215: XML parser returns item from different element in a array * #3282: Update constant in setContentType documentation * #3089: HTTPSessionFactory does not support HTTPClientSession::ProxyConfig * #2418: SecureServerSocket doesn't work with IpV6 * fix warnings * #3019: ObjectPool wait on borrow condition fix * #3224: Remove SSL23 support from Poco/Crypto * #3191: Fixing a bug in the NetSSL_Win module (Host name verification failed error) * disallow SSLv3 * #3269: Poco::Net::Context initialization with empty certificateFile * #3307: Poco::Crypto::X509Certificate: obtain certificate fingerprint * #3260: Memory leak in EVPPKey::loadKey used with files & wrong password * #3157: fix(openssl): add missing dependency to OpenSSL components * #3066: CMake warning about MYSQL casing * #3135: Poco::Data::SQLite::Utility::fileToMemory unsuccessful if journal exists * #3217: CMake: warning message with -DPOCO_STATIC confusing * #3274: Fix localtime_r for VxWorks 6.9 and later * #2746, #3169: Fix race condition on TCPServerDispatcher stop * #3092: add more detailed error description when LoadLibrary fails| * #3074: Fix sessions may not return back to the pool * #3309: optimize parsing from stream (no copying of entire JSON to memory); limit maximum depth to avoid stack overflow with malicious documents (fuzzing - #3285); code cleanup * JSON Parser performance improvements * #3310: Upgrade bundled SQLite to 3.35.5 * fix UB/bad cast in TCPServerTest.cpp * add comment regarding potential UB in AnyTest::testCastToReference() * support sanitizers in build configs * bump version * fix 'catching polymorphic type by value' warnings * fix 'catching polymorphic type by value' warnings * fix 'catching polymorphic type by value' warnings * remove failing Android build; add sanitizer builds * update postgres version * fix warning * fix warning * add GitHub workflow * fix ci.yml * fix ci.yml * additional ci builds * fix ci.yml for macos and windows * fix(double-conversion): Upgrade bundled double-conversion #3313 * ci fixes * #3314: NetSSL_OpenSSL: any.pem certificate error: ca md too weak * testReuseSession: remove bad checks for session reuse * investigate failing test * investigate failing test * investigate failing test * investigate failing test * ci * remove travis and appveyor * ci, readme * ci fixes * fix ci * fix ci * fix ci * fix memory leak when ignoring test error/failure * fix ci * don't define UNREACHABLE as poco_bugcheck as it triggers 'control reaches end of non-void function' warning * add Linux cross build, build Data libs on macos * fix ci * add MySQL include/lib search paths for Homebrew * ci fixes * ci fixes * ci fixes * ci fixes * fix indluce paths for brew mysql * #3317: Data::MySQL MySQL headers and library search paths * fix ARM-Linux build config * fix MySQL.make * update FindMySQL.cmake * fix(SocketReactor): fix dataCollection test * chore: remove troubleshooting help leftovers * #3302: MSVC: Poco hides warnings (C4996) for the C++14 attribute [[deprecated]] * fix potential crash in testAsyncNotify: don't delete event object while async notification is still in progress * fix(PollSetTest): change connect to blocking * added ActiveRecord library and compiler * added dependencies file * update copyright dates * ActiveRecord: project files and fixes for MSVC * ci: enable ActiveRecord on Windows * fix(PollSetTest): remove poll timing check (fails on msvc ci) * fix ActiveRecord CMake build and configuration * feat(build): add gen directory (for generated sources) and macchina lib link dirs (if needed) * #3318: Data: Support Poco::UUID for data binding * ODBC tests for UUID, updated ActiveRecord projects * ActiveRecord user guide * update ActiveRecord documentation * documentation fixes * #3321: manually merge ODBC text encoding support * CppParser: merge changes from internal repository * updated Makefile * AbstractObserver::accepts() - add optional name parameter * fix SharedPtr::makeSharedArray() [merge from devel] * remove blank line * #2895, #2935: support OCSP stapling * style * clang support (merge from devel) * #3322: remove useless struct * link libmariadb instead of libmysql if headers indicate MariaDB * fix nullptr passed to memcmp/memcpy reported by ubsan * fix nullptr passed to memcmp/memcpy reported by ubsan * fix PageCompiler cross-compile; fix Content-Security-Policy header * remove Data release notes page * style, remove unused var * update docs * improve BLOB handling, clean-up code * fix(ICMPv4Packet): [asan] Undefined behavior in ICMPv4PacketImpl.cpp #3326 * fix(NumericString): Bug in NumericString with decSep != '.' #3159 * fix(HostEntry): DNS HostEntry returns multiple entries #3303 * fix(PollSet): #3248 #3249 * fix(NetworkInterface): Unterminated string possible in NetworkInterfaceImpl::setPhyParams() #3301 * style/whitespace * fix warnings * add version resources to executables * style * whitespace * update changelog * cpproj: also copy testsuite/include if it's there * branch off 1.11.1 * #3335: XML error when build 1.11.0 * #3353: add POCO_NO_FORK_EXEC CMake option * #3381: DNS::hostByAddress not thread-safe * #3400: fix std::localtime not thread safe * #3221: Crash reported on Windows in X509Certificate verification * #3344: [bug] MacOS bundle destination path is not set * #3360: Add POCO_PGSQL_{INCLUDE,LIB} variables * #3363: Fixed compilation error with MongoDB::Connection and Util::Application * #3377: Correct Poco::Path::configHome() and dataHome() documentation for Windows * #2823: error: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 * #3425: Fixed suspend/resumeEvents pair in DirectoryWatcher * #2966: SocketReactor loads one core of CPU up to 100% * #3330: Poco::Data::ODBC::ODBCStatementImpl causes crash * use OpenSSL 1.1.1 on macOS * add missing include search path * upgrade bundled PCRE to 8.45 * upgrade bundled SQLite to 3.36.0 * updated changelog * fix brew OpenSSL version * branch off poco-1.11.2 * #3506: Upgrade bundled expat to 2.4.4 * manually merge #3448, part 1 (Crypto) * manually merge #3448, part 1 (NetSSL) * #3515: NetSSL_OpenSSL Testsuite: testInterop() and testProxy() fail due to changed certificate * #3448: fix version check * #3465: NetSSL_Win: bad error handling when decodeMessage() fails * #3458: encryptString() crash on redhat/centos 8 with FIPS enabled using md5 default digest * #3505: JSON::PrintHandler.value(bool) prints incorrect value * #3527: Upgrade bundled expat to 2.4.5 * #3470: bug in JSON ParseHandler.cpp (RFC 7159 should be valid) * #3507: Reference counting for bound configuration in Util::Option is broken * #3518: Expat version check in #defines incorrect * #3338: NamedMutex does not work on Linux distributions where fs.protected_regular=1 * CI: don't build PageCompiler in ARM cross build * detect ARM64 on Windows * updated README.md * ProGen: support generation of VS 2022 project files * ci: add windows 2022 * fix library name * remove unused CppUnit headers * added VS2022 project files * #3530: Upgrade bundled expat to 2.4.6 * #3538: Upgrade bundled expat to 2.4.7 * Add back NIOS2 double conversion detection to fix compile errors The commit558324f672removed the nios2 support, which was originally added ine7b91e8125This commit add it back. Signed-off-by: Julien Olivain <ju.o@free.fr> * #3466: DefinePlatformSpecific.cmake: handle RelWithDebInfo and MinSizeRel configurations * #3524: remove XML and Util dependencies in Zip/SevenZip * #3483: Adds Windows 11 and Server 2022 to Environment::osDisplayName() * #3495: Array::operator[] should not throw * #3268: Poco redis command set have a bug when you want to set nx ex or expireTime * #3509: fix dst and utcOffset handling for Dublin time zone * #2882: another attempt at fixing it that should also work on other platforms * remove unused method in Timezone_WIN32.cpp * use tm_gmtoff on Linux * Basic support for OpenSSL 3.0.0 (#3448) * updated README.md * Create close-inactive-issues.yml * check return codes of EVP_CIPHER_CTX_new and EVP_CipherInit Especially with OpenSSL 3, it is possible that EVP_CipherInit may fail even when passed a non-null cipher[1]. Without the checking, it will finally get to a segfault. [1] https://github.com/openssl/openssl/issues/16864 * Automatically load default and legacy providers with OpenSSL 3 Without the legacy provider [1], some ciphers are not available. For example, the 'des-ecb' one used by test sutie is missed and the test will fail. [1] OSSL_PROVIDER-LEGACY(7ossl) * Make p12 ca order the same as pem OpenSSL < 3 returns p12 ca order in reversed order. This is fixed in OpenSSL 3. We work around it with old OpenSSL. See: https://github.com/openssl/openssl/issues/16421 https://github.com/openssl/openssl/pull/12641f5eb85eb0f* Implement SSL abort handling on OpenSSL 3 On an unexpected EOF, versions before OpenSSL 3.0 returned SSL_ERROR_SYSCALL, nothing was added to the error stack, and errno was 0. Since OpenSSL 3.0 the returned error is SSL_ERROR_SSL with a meaningful error on the error stack.[1] [1] SSL_GET_ERROR(3ossl) Co-authored-by: Günter Obiltschnig <guenter.obiltschnig@appinf.com> Co-authored-by: Robin Lee <cheeselee@fedoraproject.org> Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com> * fix(Socket): shutdown fixes from pull #3448 * #3500: Sandbox all iFrames in PocoDoc * #3549; replace assert with assertTrue * #3553: Upgrade bundled zlib to 1.2.12 * #3525: Bad management of file in case of OpenSSLException in X509Certificate::readPEM and X509Certificate::writePEM * disable OpenSSL deprecation warnings * chore: cleanup * fix(X509Certificate): add missing string format * #3559: Poco::Data::PostgreSQL - DateTime extraction truncates fractional seconds * feat(EVP): 3.0 support - add EVPCipher - additional EVPPKey constructors - tests - fix and improve openssl-related exceptions Transition towards 3.0 support; deprecating direct EC and RSA interface portions. * fix(openssl): pre 3.0 compile * feat(Envelope): Add envelope to crypto #3561 * fix(Envelope): mac/clang compile * fix(Any): #3297 #3514 * #3562: fixed OpenSSL setup/shutdown * fix exception text * #3563: Remove support for OpenSSL < 1.0 * ci jobs for OpenSSL 1.1 and 3 * updated CHANGELOG * updated .vscode * Refactor/any soo (#3564) * refactor(Any): SOO - encapsulate data holders - add missing gets and ops - eliminate g++ warnings with enable_if's - default enable SOO * refactor(Placeholder): encapsulate SOO memory management and fix leaks; cf. #3297 #3514 * fix(Placeholder): asan errors and add tests cf. #3297 #3514 * fix(SSLManager): Race condition in SSLManager #3558 * remove unused include * updated copyright date * PocoDoc: fix iframe sandboxing * fix(SHA2Engine): cannot use HMACEngine with SHA2Engine #3421 * refactor(Placeholder): ifdef POCO_NO_SOO only in Placeholder and remove it anywhere else (#3566) * refactor(Placeholder): more SOO consolidation and optimization * fix(FPEnvironment): Visual Studio Warning C4244 #3543 * fix(Extractor): move extraction decoding to AbstractExtractor #3396 * Netssl/openssl3 (#3575) * feat(Context): DH init openssl3 port (1/2 hardcoded params) * create poco-1.11.3 branch, bump version * update copyright date * #3567: check legacy provider existence for legacy exception #3567 * fix(Placeholder): comparison for zero value * feat(Context): DH init openssl3 port (2/2 params from file) * test(HTTPSClientSession): try/catch to understand CI failure * chore(cmake): copy the DH parameters file * fix(OpenSSLInitializer): unload provider on uninitialize * chore(HTTPSClientSessionTest): remove try/catch * fix(OpenSSLInitializer): fix provider unloading * feat(CppUnit): make tests exceptions more descriptive * chore(CppUnit): a more descriptive name for callback Co-authored-by: Günter Obiltschnig <guenter.obiltschnig@appinf.com> * fix(Foundation): update VS 2019 platform version * chore(Data): update VS project files (add Transcoder #3396) * fix(Data): Poco::Data::ODBC-dbEncoding property not used for insert/update #3396 * fix(Data): add transcoder to Makefile #3396 * fix(JWT): remove duplicate test functions after merge Co-authored-by: Günter Obiltschnig <guenter.obiltschnig@appinf.com> Co-authored-by: Julien Olivain <ju.o@free.fr> Co-authored-by: Robin Lee <robinlee.sysu@gmail.com> Co-authored-by: Robin Lee <cheeselee@fedoraproject.org> * #2755: Fix MySQL's LONGBLOB/LONGTEXT not allocating enough space (#3474) * Unit test for bug #2755. * Removed condition to set buffer length to 0. * Fixes to unit tests for LONGBLOB/TEXT data type. * Adjusted buffer sizes to accommodate LONGBLOBs. Co-authored-by: Hector Toledo Soto <hsoto@transperfect.com> * fix(Data): MySQL UUID binding temporary string #3587 * feat(CI): add MySQL tests to CI #3588 * fix(CI): remove mysql client dev (using mariadb) #3588 * fix(CI): another shot at mysql * fix(Net/testsuite): add missing include * fix(DatagramSocket): Socket::available does not always return correct value for UDP #3589 * fix(SocketProactor): few improvements (#3357) * fix(ICMPsocketTest): change appinf (doesn't respond to ping) to github * fix(PollSet): windows fixes * fix(PollSet): windows implementation fixes (multi-fd_set select); minor reactor fixes * Extract JSON type as string (#3491) * Declared JSON as string data # Conflicts: # Data/include/Poco/Data/MetaColumn.h # Data/src/RecordSet.cpp # Data/src/StatementImpl.cpp * Added JSON extractor as string * Added unit test * Update comment Co-authored-by: Joerg-Christian Boehme <joerg@chaosdorf.de> Co-authored-by: Günter Obiltschnig <guenter.obiltschnig@appinf.com> Co-authored-by: tbarbier <thomas.barbier@amadeus.com> Co-authored-by: Linquize <linquize@yahoo.com.hk> Co-authored-by: Jan Kevin Dick <fixed-term.jan.dick@de.bosch.com> Co-authored-by: Neelima Patil <neelima.patil@honeywell.com> Co-authored-by: akete <akete@users.noreply.github.com> Co-authored-by: YuriAzathoth <iamkiller@mail.com> Co-authored-by: Jonathan Horvath <byteme@bytedreamer.com> Co-authored-by: Maksim Kita <kitaetoya@gmail.com> Co-authored-by: Alexander Galanin <al@galanin.nnov.ru> Co-authored-by: Thomas Sablik <thomas.sablik@wombytes.de> Co-authored-by: Nikita Migunov <nmigunov@iponweb.net> Co-authored-by: Ben Wolsieffer <benwolsieffer@gmail.com> Co-authored-by: micheleselea <michele.pradella@selea.com> Co-authored-by: Federico Kircheis <federico.kircheis@gmail.com> Co-authored-by: fenghao119 <fenghao119@gmail.com> Co-authored-by: Alex Fabijanic <alex@pocoprojecct.org> Co-authored-by: linquize <linquize2@yahoo.com> Co-authored-by: Julien Olivain <ju.o@free.fr> Co-authored-by: Robin Lee <robinlee.sysu@gmail.com> Co-authored-by: Robin Lee <cheeselee@fedoraproject.org> Co-authored-by: hectots <monkey.instinct@gmail.com> Co-authored-by: Hector Toledo Soto <hsoto@transperfect.com> Co-authored-by: Hernan Martinez <hernan.c.martinez@gmail.com> * merge pg binary extraction support * set version number to 1.12.0 * updated VS project files * merge pg binary extraction support * updated VS project files * add Prometheus library * fix Makefile * CppUnit: add generic assertEquals * Cell: fix wrong condition when checking for font styles * upgrade bundled sqlite to 3.38.5; fixed a warning in SQLiteTest.cpp * fix(IPAddress): IPAddress::isLoopback() returns false for IPv4 mapped in IPv6 #3399 * Fixes from develop experimental (on top of 1.11.2) (#3017) * MongoDB::PooledConnection: Prevent unwanted release by disabling copy semantics. Enabled move semantics for C++11. * Construct MongoDB::Cursor from aggragation cursor. * Added function to get OS-specific numerical thread ID and %J pattern to use numerical OS thread id in pattern formatter. Co-authored-by: Tomaz Beltram <tomaz.beltram@topit.si> * fix(SharedLibrary): SharedLibrary::isLoaded() not thread safe #3175 * fix(Task): Task::postNotification possible leak #3240 * fix(Platform): Poco errors with _DEBUG and NDEBUG #3039 * feat(HTTPClientSession): HTTPClientSession source IP address #2271 * feat(samples): add SetSourceIP #2271 * chore(samples): add/fix VS project/solution files #2271 * fix(HTTPClientSession): broken proxy tests #2271 * fix(JSON): Arbitrary indent of 2 applied to JSON string objects Var conversion #3253 * feat(Data): Add JSONRowFormatter #3602 * #3405 #3482 #3485 * Update minimum GCC version information (#3603) Changed in 1.10.0 Release Content modification based on minimum compiler version upgrade (C++14) * cleanup Data transcode test * Add ARM64 to ProGen for vs170 (#3606) * Updated project properties and templates * Added ARM64 templates * Added ARM64 library suffixes * Fix VS2022 TargetMachine property when targeting ARM64 * Add missing changes from zlib update (#3601) * Add --ldflags configure option (#3545) * updated README.md * Create close-inactive-issues.yml * Add --ldflags configure option Add --ldflags configure option to allow the user to provide additional flags to the linker such as -latomic. This will avoid the following build failure with ActiveRecord on sparc v8: /home/peko/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/10.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: /home/peko/autobuild/instance-1/output-1/build/poco-1.11.1/ActiveRecord/Compiler/obj/Linux/sparc/release_shared/Compiler.o: in function `Poco::RefCountedObject::release() const': Compiler.cpp:(.text._ZNK4Poco16RefCountedObject7releaseEv[_ZNK4Poco16RefCountedObject7releaseEv]+0xc): undefined reference to `__atomic_fetch_sub_4' Fixes: - http://autobuild.buildroot.org/results/b01/b014d6fcb8fdf28984d7ce606db2347b0265bc6a/build-end.log Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Co-authored-by: Günter Obiltschnig <guenter.obiltschnig@appinf.com> Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com> * chore(ci): remove close-inactive-issues.yml * Readded named substring support for regexes (#3569) Original merged PR #952 was merged in 2015, but has gone missing. This is adding it back in. * Use transaction_isolation in MySQL 8+ (#3490) * Use transaction_isolation in MySQL 8+ * Trim buffer before comparison * Added LocalConfigurationView to only search inside the viewed scope (#3529) * chore(testsuite): fix testsuite Makefile * fix(Foundation): remove SDK version from VS 2022 project #3605 * fix(SocketReactor): Poco::Net::SocketConnector unregistering #2513 * devel-release-1.12.0 (#3673) * Fix percent-encoded fragment modification in Poco::URI Before this commit using Poco::URI class to parse specific URIs that had percent-encoded fragment identifier resulted in the loss of information concerning the way the fragment identifier was encoded. There could be the cases when the result of Poco::URI object serialization to string did not match the original URI string Poco::URI object was created from. In this commit we change the internal logic of fragment processing in Poco::URI, so that the fragment is stored inside the class in raw form (the same way as query string). The methods getFragment and setFragment work the old way (with percent-decoded fragment values), new methods getRawFragment and setRawFragment are added to get access to the original fragment representation. * Remove SDK version from VS2022 test projects (#3607) * Remaining changes for Windows on ARM64 support (#3608) * Add ARM64 to Foundation * Changed lib, and bin folders of ARM64 builds * Updated buildwin.cmd * Added missing closing </File> tags (#3610) * feat(Platform): LoongArch support #3460 * fix(PollSet): default enable epoll on linux * default disable new state on move * fix(UDPHandler): data race #3613; clean up all Net tsan warnings * ProGen vs170 projects with Win32,x64,ARM64 (#3612) * fix(TCPServer): #1884 #1965 * fix(LogFile): LogFile_STD (LogFileImpl) fails to recover from getting out of space #2084 * Avoid clang 10 -Wimplicit-int-float-conversion warning/error when converting int into float (#2943) Example of warning (error when using -Werror) we get with clang 10: /remote/intdeliv/components/osp/Poco/Foundation/19-0-0-6/include/Poco/Dynamic/VarHolder.h:444:14: error: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Werror,-Wimplicit-int-float-conversion] if (from > std::numeric_limits<T>::max()) ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /remote/intdeliv/components/osp/Poco/Foundation/19-0-0-6/include/Poco/Dynamic/VarHolder.h:332:4: note: in instantiation of function template specialization 'Poco::Dynamic::VarHolder::checkUpperLimitFloat<float, int>' requested here checkUpperLimitFloat<F,T>(from); ^ /remote/intdeliv/components/osp/Poco/Foundation/19-0-0-6/include/Poco/Dynamic/VarHolder.h:2175:3: note: in instantiation of function template specialization 'Poco::Dynamic::VarHolder::convertToSmaller<float, int>' requested here convertToSmaller(_val, val); ^ * chore(ci): run ci on pull requests * #2569: Added TIMESTAMP data type support on MySQL (#3471) * Unit test for TIMESTAMP data type in MySQL. * Added support for TIMESTAMP data type. Co-authored-by: Hector Toledo Soto <hsoto@transperfect.com> * MongoDB::Array: int --> size_t in get for consistency with size(), new helper functions to add elements to an array. (#3016) * fix(CppUnit): enable_if disarm numeric notEqualsMessage * fix(CppUnit): CppUnit notEqualsMessage causing compile errors #3615 * Syslog: Include Facility to Syslog Message (#3452) * Fixed indentation * Added Facility to Message in RemoteSyslogListener * Net: make MessageHeader limits configurable (#3404) * Add Message::getAll (#3104) * chore(Message): fix formatting for #3104 * Output to stderr in Poco::WindowsConsoleChannel (#3058) - Fixes #3056 * HTTPDigestCredentials added support for RFC7616 algorithms (#3026) * chore(SHA2Engine): fix formatting for #3026 * Added support for SQLite transaction types using Session property (#3018) * chore(SQLite): fix enum names case for #3018 * fix(HTTPResponse): Add 425 / HTTP_TOO_EARLY to HTTPResponse::HTTPStatus #3592 * fix(SQLite): windows build (global var does not link) #3018 * Added missing SocketProactor class to ProGen source (#3616) * Added missing SocketProactor class to ProGen source * ProGen'd VS2022 Net project * chore(Net): regenerate VS 140,150,160 projects #3614 * Handle MariaDB JSON columns since they are stored as `longtext` (#3621) * Also extract BLOBs when reading longtext columns as std::string * Fix error message in unit test * Added unit test to read longtext columns as std::string * Use `tx_isolation` when connected to MariaDB regardless of version (#3622) * Use `tx_isolation` when connected to MariaDB regardless of version * Rename variable * Handle MariaDB server info in the middle of the string * Updated to PCRE version 8.45 (#3623) * Add missing changes from zlib update * Updated to PCRE version 8.45 Build on Win32 and Linux, RegularExpressionTest was successful * Fix/tsan (#3617) * fix(Foundation): tsan warnings fixes * fix(Thread_POSIX): tsan warnings fixes; add tsan.suppress * fix(Util): tsan fixes * fix(netSSL_OpenSSL): tsan fixes * fix(Data): tsan warnings fixes * feat(ci): add tsan job * feat(ci): add tsan job, another attempt * feat(ci): add tsan job, 3rd attempt * fix(Foundation): tsan warnings fixes * fix(Thread_POSIX): tsan warnings fixes; add tsan.suppress * fix(Util): tsan fixes * fix(netSSL_OpenSSL): tsan fixes * fix(Data): tsan warnings fixes * feat(ci): add tsan job * feat(ci): add tsan job, another attempt * feat(ci): add tsan job, 3rd attempt * fix(ResultMetadata): memory leak #3474 * feat(ci): disable ActiveDispatcher tests for tsan runs * feat(ci): try to fix tsan options file detection (again) * chore(TestLibrary: correct spelling * fix(ci): fix tsan run; add -y to apt; disable samples build for some jobs * fix(ci): add mysql ports * feat(ci): add VS asan * feat(double-conversion): Upgrade double-conversion to v3.2.0 #3624 * chore(asan): disable msvc asan build (dll not found) * chore(double-conversion): move NumericString.h before double-conversion includes to prevent min/max collision; reinstate lost loongarch64 * chore(JSON): sync pdjson with upstream * fix(Statement): Poco::Data::Statement becomes unusable after exception #2287 * added facility to SyslogChannel (#3453) * TCPServerDispatcher.h: missing <atomic> (#2961) Fixes: b8af168151fe0147fb06557029002ae226dcc549 Fixes: #1965 * Windows embedded OpenSSL: Fixed bogus warning during compilation (External OpenSSL defined but internal headers used - possible mismatch!) (#3627) * fix(double-conversion): nios2 and riscv defines * fix(double-conversion): riscv defines * fix(cmake): TestLibrary debug postfix * fix(cmake): add WebNotifier to samples #3184 * doc(Crypto): Fix error in find_package example #3088 * fix(Event): Event data race #3629 * fix(AsyncChannel): race condition in AsyncChannel close/log #1039 * fix(Zip): Zip 64-bit extensions not set #2590 (tentative) (#3604) * PocoDoc: fix handling of font-style tags if tag is immediately followed by punctuation * Static code analyzer warnings #2688 * MinGW: fatal error: kernelspecs.h: No such file #2691 * Poco::Data::SessionPool change connection timeout #3241 * Makefile: space(s) following target name will break build (during link) #3062 * json format PrintHandler #2678 * indicate compiler that functions will never return (#3639) * fix warning C4717: 'format<std::vector<std::any,std::allocatorstd::an… (#3640) * fix warning C4717: 'format<std::vector<std::any,std::allocatorstd::any > >': recursive on all control paths, function will cause runtime stack overflow * keep origin format. * fix(format): scope * fix(Crypto): libPocoCrypto.so: undefined reference to pthread_atfork when linking statically with OpenSSL 1.1 #3073 * chore(LocalConfigurationView): fix style #3529 * fix(ConfigurationView): ConfigurationView and JSON is broken for array access #3635 * FifoBuffer.advance method not throw exception when length==0 (#3641) * fifobuffer not throw error when length = 0 * Update FIFOBuffer.h fix indentation Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com> * fix(URI): Decoding URI query parameters ( ::getQueryParameters) incompatible with Spring 5 #2619 * fix(NTPClient): NTPClient ignores second fractions #2614 * chore(JSON): add test for #2612 * fix(Platform): MinGW also defines __GNUC__. #3195 * Fix some clang 10 -Wsign-compare warnings (#2960) In file included from /data/mwrep/res/osp/Poco/JSON/20-0-0-0/include/Poco/JSON/Object.h:22: In file included from /data/mwrep/res/osp/Poco/JSON/20-0-0-0/include/Poco/JSON/Array.h:23: In file included from /data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/Dynamic/Var.h:26: In file included from /data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/Dynamic/VarHolder.h:22: In file included from /data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/NumberFormatter.h:22: /data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/NumericString.h:220:31: error: comparison of integers of different signs: 'unsigned long' and 'char' [-Werror,-Wsign-compare] if ((limitCheck - result) < add) return false; ~~~~~~~~~~~~~~~~~~~ ^ ~~~ /data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/NumericString.h:229:31: error: comparison of integers of different signs: 'unsigned long' and 'char' [-Werror,-Wsign-compare] if ((limitCheck - result) < add) return false; ~~~~~~~~~~~~~~~~~~~ ^ ~~~ /data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/NumericString.h:240:31: error: comparison of integers of different signs: 'unsigned long' and 'char' [-Werror,-Wsign-compare] if ((limitCheck - result) < add) return false; ~~~~~~~~~~~~~~~~~~~ ^ ~~~ /data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/NumericString.h:249:31: error: comparison of integers of different signs: 'unsigned long' and 'char' [-Werror,-Wsign-compare] if ((limitCheck - result) < add) return false; ~~~~~~~~~~~~~~~~~~~ ^ ~~~ 4 errors generated. * chore(README): Add vcpkg installation instructions #2940 * fix(SQLite): SQLite::Connector::open() crashes on db file with non existing directory #2285 * fix(MailMessage): read hangs on missing final multipart boundary #2401 * fix(NumberParser): Rounds very large negative numbers to the incorrect values #3580 * fix(JSON::Stringifier): JSON Serializing NAN #3251 * feat(Timespan): Add std::chrono support #2576 #2623 * fix(strToInt): overflows #3580 * fix(strToInt): thousand separator regression #3580 * fix(MySQL::Extractor): MySQL Extractor #2521 * feat(FTPClientSession): activeDataConnection 1.11.0 cannot set specific data port #3372 * feat(Cipher): No access to padding in Cipher #3374 * feat(TypeHandler): DB into() does not compile for more than 20 members in a tuple #3342 * fix(NumberFormatter): Negative precision in NumberFormatter::format() #2511 * Make ParallelSocketReactor thread namable (#3642) make ParallelSocketReactor thread namable * fix(Redis): Poco::Redis after executing auth command next command always return OK #2457 * chore(NumberParserTest): add test for #2441 * avoid clang tidy warning (#3646) * Revert "avoid clang tidy warning (#3646)" (#3648) This reverts commitb23488d6fe. * fix(VarHolder): limits check * As of C++11, std::swap is noexcept. #2386 (#3645) * As of C++11, std::swap is noexcept. #2386 * fix(Any): remove throw on swap * fix(Any): As of C++11, std::swap is noexcept. #2386 * fix(Any): make size const #2386 * fix(SimpleRowFormatter): clang won't compile noexcept #2386 * a couple of arm fixes * fix(Any): As of C++11, std::swap is noexcept. #2386 * fix(AnyTest): local() for POCO_NO_SOO# 2386 * test(RSACipher): RSA encryption without private key #2367 * chore(RSACipherTest): delete ciphers #2367 * add separate accessors and mutators for connect, send and receive tim… (#3476) * add separate accessors and mutators for connect, send and receive timeouts * implement timeout methods outside of class declaration to conform to existing code structure * Update HTTPSession.h Co-authored-by: bfoster <bfoster@malwarebytes.com> Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com> * Make poll set interruptable (#3644) * Make poll set interruptable * open test for poll set * fix poll set wake up test * fix build error * feat(SecureSocketImpl): how to set the socket of SecureSocketImpl to no-blocking? #2352 * better socket reactor wake up (#3647) * better socket reactor wake up * Remove documentation comment from source file Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com> * test(MailMesage): MailMessage::read() chokes on Content-disposition #3650 * chore(Net/samples): tcpserver missing from Net/samples/CMakeLists.txt #3651 * fix(CMake): Linking with Foundation on Android gives error #3652 #3653 * #2821: Poco::Buffer: full on creation? - add documentation describing the behavior. * add note regarding receiveFrame with Poco::Buffer * merge changes from 1.11.3 * #3633: Redis: Support Authentication * #3658: Support for chunked transfer encoding trailer * formatHex with lower case (#3657) * feat(Socket): add lastErrorDesc() * fix(Socket): Socket::select EPOLL implementation returns socket in exceptList when empty list is given #3655; mark select as deprecated #1459 * Fix/poll set race (#3630) * fix(PollSet): PollSet data race #3628 * fix(SocketConnector): SocketConnector test #2875 * fix(PollSet): optimize the amount of locked code; fix and simplify wakeUp logic * fix(SocketConnectorTest): fix test memleak (data not flowing, handlers not deleted) #2875 * fix(PollSet): clear() and tests * fix(PollSet): #1459 #3628 #3655 #3661 * fix(PollSet): Integrate windows epoll #2091, #3649 * chore(ProGen): MSVC does not properly recognize std version #3665 * fix(PollSet): eventfd call arg; add wepoll to CMakelists.txt * fix(PollSet): CMakelists.txt * fix(cmake): MSVC does not properly recognize std version #3665 * chore(vscode): add mac config * fix(PollSet): PollSet::add()/update() semantics #3661 * Feat/pcre2 (#3663) * upgrade to pcre2 * use pcre2_*_8 names * fix pcre2 lib name for unbundled build * CMake changes for PCRE2 * add missing macro for unbundled build * add PCRE2_STATIC * updated VS project files for pcre2 Co-authored-by: Günter Obiltschnig <guenter.obiltschnig@appinf.com> * Revert "formatHex with lower case (#3657)" (#3670) This reverts commitb1823b61c0. * Always set thread names on POSIX platforms (#3384) * chore: gitignore vim .swp files * feat(POSIX): Always set thread names. I'm not sure about the original intent to hide it under a DEBUG macro. Naming the threads in release mode makes it easier to see runtime application and know which thread pool uses how many threads and what their names are. Firefox, Chromium and many other apps do this on Linux. * Remove trailing whitespace (#3668) * doc: update CHANGLEOG Co-authored-by: Daniil Zotkin <zotkin@rutoken.ru> Co-authored-by: Hernan Martinez <hernan.c.martinez@gmail.com> Co-authored-by: Romain Geissler @ Amadeus <romain.geissler@amadeus.com> Co-authored-by: hectots <monkey.instinct@gmail.com> Co-authored-by: Hector Toledo Soto <hsoto@transperfect.com> Co-authored-by: Matej Kenda <matejken@gmail.com> Co-authored-by: BeBinder <93721965+BeBinder@users.noreply.github.com> Co-authored-by: Tavi Cacina <tavi-cacina@users.noreply.github.com> Co-authored-by: Mathieu Stefani <m.stefani@abc-arbitrage.com> Co-authored-by: Fritz Elfert <fritz@fritz-elfert.de> Co-authored-by: Maksim Kita <kitaetoya@gmail.com> Co-authored-by: Spaky <Spaky@users.noreply.github.com> Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com> Co-authored-by: Matej Kenda <matej.kenda@topit.si> Co-authored-by: Günter Obiltschnig <guenter.obiltschnig@appinf.com> Co-authored-by: Guillermo Frontera <gfrontera86@gmail.com> Co-authored-by: junwufan <shelllet.com@gmail.com> Co-authored-by: JackyWoo <wuchienchao@qq.com> Co-authored-by: Ben Foster <bfoster7593@gmail.com> Co-authored-by: bfoster <bfoster@malwarebytes.com> Co-authored-by: Arun Chandrasekaran <arun@paravision.ai> Co-authored-by: John Vandenberg <jayvdb@gmail.com> Co-authored-by: Günter Obiltschnig <guenter.obiltschnig@appinf.com> Co-authored-by: tbarbier <thomas.barbier@amadeus.com> Co-authored-by: Linquize <linquize@yahoo.com.hk> Co-authored-by: Jan Kevin Dick <fixed-term.jan.dick@de.bosch.com> Co-authored-by: Neelima Patil <neelima.patil@honeywell.com> Co-authored-by: akete <akete@users.noreply.github.com> Co-authored-by: YuriAzathoth <iamkiller@mail.com> Co-authored-by: Jonathan Horvath <byteme@bytedreamer.com> Co-authored-by: Maksim Kita <kitaetoya@gmail.com> Co-authored-by: Alexander Galanin <al@galanin.nnov.ru> Co-authored-by: Thomas Sablik <thomas.sablik@wombytes.de> Co-authored-by: Nikita Migunov <nmigunov@iponweb.net> Co-authored-by: Ben Wolsieffer <benwolsieffer@gmail.com> Co-authored-by: micheleselea <michele.pradella@selea.com> Co-authored-by: Federico Kircheis <federico.kircheis@gmail.com> Co-authored-by: fenghao119 <fenghao119@gmail.com> Co-authored-by: Alex Fabijanic <alex@pocoprojecct.org> Co-authored-by: linquize <linquize2@yahoo.com> Co-authored-by: Robin Lee <robinlee.sysu@gmail.com> Co-authored-by: Robin Lee <cheeselee@fedoraproject.org> Co-authored-by: Julien Olivain <ju.o@free.fr> Co-authored-by: hectots <monkey.instinct@gmail.com> Co-authored-by: Hector Toledo Soto <hsoto@transperfect.com> Co-authored-by: Hernan Martinez <hernan.c.martinez@gmail.com> Co-authored-by: Joerg-Christian Boehme <joerg@chaosdorf.de> Co-authored-by: Matej Kenda <matej.kenda@topit.si> Co-authored-by: Tomaz Beltram <tomaz.beltram@topit.si> Co-authored-by: Byungjun Lee <40881444+OneTop4458@users.noreply.github.com> Co-authored-by: Spaky <Spaky@users.noreply.github.com> Co-authored-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Co-authored-by: cesar <cesar@machinemode.com> Co-authored-by: Kevin Dick <kevin@mjkd.de> Co-authored-by: Daniil Zotkin <zotkin@rutoken.ru> Co-authored-by: Romain Geissler @ Amadeus <romain.geissler@amadeus.com> Co-authored-by: Matej Kenda <matejken@gmail.com> Co-authored-by: BeBinder <93721965+BeBinder@users.noreply.github.com> Co-authored-by: Tavi Cacina <tavi-cacina@users.noreply.github.com> Co-authored-by: Mathieu Stefani <m.stefani@abc-arbitrage.com> Co-authored-by: Fritz Elfert <fritz@fritz-elfert.de> Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com> Co-authored-by: Guillermo Frontera <gfrontera86@gmail.com> Co-authored-by: junwufan <shelllet.com@gmail.com> Co-authored-by: JackyWoo <wuchienchao@qq.com> Co-authored-by: Ben Foster <bfoster7593@gmail.com> Co-authored-by: bfoster <bfoster@malwarebytes.com> Co-authored-by: Arun Chandrasekaran <arun@paravision.ai> Co-authored-by: John Vandenberg <jayvdb@gmail.com>
644 lines
28 KiB
Plaintext
644 lines
28 KiB
Plaintext
Getting Started With The POCO C++ Libraries
|
||
AAAIntroduction
|
||
|
||
!!!Welcome
|
||
|
||
Thank you for downloading the POCO C++ Libraries and welcome to the growing community of POCO C++ Libraries
|
||
users. This document will help you in getting a smooth ride while installing and setting up the
|
||
POCO C++ Libraries and going the first steps with the software.
|
||
|
||
|
||
!!!Setting Up The POCO C++ Libraries
|
||
|
||
The POCO C++ Libraries are delivered in full source code only. Due to the
|
||
large number of possible build configurations, no binary releases are provided
|
||
from the project maintainers.
|
||
This means that you have to build the libraries and tools before you can use them the first time.
|
||
|
||
<*Note: There are binary releases available as installation packages for
|
||
various operating systems (e.g., Debian Linux, Ubuntu Linux, OpenBSD,
|
||
OpenWRT, etc.). However, these packages are not maintained by the core
|
||
team and may not always be up to date.*>
|
||
|
||
Up-to-date [[https://conan.io Conan]] packages are available via
|
||
[[https://bintray.com/pocoproject/conan/Poco%3Apocoproject Bintray]].
|
||
|
||
<%
|
||
<?-PocoDoc.adContent?>
|
||
%>
|
||
|
||
!!Source Code Distribution Format
|
||
|
||
The source code for the POCO C++ Libraries is delivered in a ZIP file
|
||
for Windows users and/or in a compressed TAR file (.tar.gz or .tar.bz2)
|
||
for Unix/Linux users. Both archives contain the same files, the only
|
||
difference is that all text files in the ZIP files have line endings
|
||
suitable for Windows (CR-LF), while the text files in the TAR file have
|
||
line endings suitable for Unix/Linux (LF only).
|
||
All libraries and tools follow a common convention for the directory
|
||
layout. This directory layout is shown below.
|
||
|
||
build/ the build system for Unix and additional utility scripts
|
||
config/ build configurations for various Unix platforms
|
||
rules/ common build rules for all platforms
|
||
scripts/ build and utility scripts
|
||
vxconfig/ VxWorks build configurations
|
||
|
||
cmake/ Support files for CMake
|
||
|
||
bin/ all executables (dynamic link libraries on Windows)
|
||
bin64/ all 64-bit executables (and DLLs)
|
||
|
||
doc/ additional documentation
|
||
|
||
lib/ all libraries (import libraries on Windows)
|
||
lib64/ all 64-bit libraries
|
||
|
||
CppUnit/ project and make/build files for the CppUnit unit testing framework
|
||
doc/ additional documentation
|
||
include/
|
||
CppUnit/ header files for CppUnit
|
||
src/ source files for CppUnit
|
||
WinTestRunner/ Windows GUI for CppUnit
|
||
|
||
Foundation/ project and make/build files for the Foundation library
|
||
include/
|
||
Poco/ header files for the Foundation library
|
||
src/ source files for the Foundation library
|
||
testsuite/ project and make/build files for the Foundation testsuite
|
||
src/ source files for the Foundation testsuite
|
||
bin/ test suite executables
|
||
samples/ sample applications for the Foundation library
|
||
|
||
XML/ project and make/build files for the XML library
|
||
include/
|
||
Poco/
|
||
XML/ header files for the core XML library
|
||
SAX/ header files for SAX support
|
||
DOM/ header files for DOM support
|
||
src/ source files for the XML library
|
||
testsuite/ project and make/build files for the XML testsuite
|
||
src/ source files for the XML testsuite
|
||
bin/ test suite executables
|
||
samples/ sample applications for the XML library
|
||
|
||
Net/ project and make/build files for the Net library
|
||
include/
|
||
Poco/
|
||
Net/ header files for the Net library
|
||
src/ source files for the Net library
|
||
testsuite/ project and make/build files for the Net testsuite
|
||
src/ source files for the Net testsuite
|
||
bin/ test suite executables
|
||
samples/ sample applications for the Net library
|
||
----
|
||
|
||
Depending on what package you have downloaded (Basic or Complete
|
||
Edition), there may be other libraries as well (such as Data, Crypto,
|
||
NetSSL_OpenSSL and Zip).
|
||
|
||
|
||
!!External Dependencies
|
||
|
||
The following libraries require third-party software (header files and
|
||
libraries) being installed to build properly:
|
||
|
||
- NetSSL_OpenSSL and Crypt require OpenSSL.
|
||
- Data/ODBC requires ODBC
|
||
(Microsoft ODBC on Windows, unixODBC or iODBC on Unix/Linux)
|
||
- Data/MySQL requires the MySQL client.
|
||
|
||
|
||
!OpenSSL
|
||
|
||
<*Unix/Linux*>
|
||
|
||
Most Unix/Linux systems already have OpenSSL
|
||
preinstalled, or OpenSSL can be easily installed using the system’s
|
||
package management facility. For example, on Ubuntu (or other
|
||
Debian-based Linux distributions) you can type
|
||
|
||
$ sudo apt-get install openssl libssl-dev
|
||
----
|
||
|
||
to install the necessary packages.
|
||
If your system does not have OpenSSL, please get it from
|
||
http://www.openssl.org/ or another source. You do not have to build
|
||
OpenSSL yourself -- a binary distribution is fine.
|
||
|
||
On macOS, it's recommended to install OpenSSL via Homebrew.
|
||
|
||
$ brew install openssl
|
||
----
|
||
|
||
|
||
<*Windows*>
|
||
|
||
On Windows, there are three options:
|
||
|
||
- Use POCO pre-built OpenSSL binaries (simplest and recommended)
|
||
- Build OpenSSL using scripts from POCO distribution package
|
||
- Use a third-party pre-built OpenSSL
|
||
|
||
|
||
<*POCO pre-built OpenSSL binaries*>
|
||
|
||
OpenSSL binaries (version 1.1.0) built with Visual Studio 2013 are available for
|
||
[[https://github.com/pocoproject/openssl/tree/master/build download]].
|
||
|
||
In case you are using pre-built binaries, please make sure to copy the
|
||
entire directory to <*C:\%POCO_BASE%\openssl\*>.
|
||
|
||
Or, %POCO_BASE%\openssl directory can be deleted (if existing) and POCO openssl
|
||
github repository cloned into it:
|
||
|
||
$ cd %POCO_BASE%
|
||
$ rmdir /s /q openssl
|
||
$ git clone https://github.com/pocoproject/openssl
|
||
|
||
All libraries are located in their proper folders (eg. <*win64/bin/debug/*>),
|
||
and all are named accordingly (<*libcrypto[mt[d]]*> and <*libssl[mt[d]]*>).
|
||
|
||
|
||
<*Build OpenSSL using scripts from POCO distribution package*>
|
||
|
||
Alternatively, if you choose to build your own OpenSSL, POCO C++ Libraries
|
||
distribution package comes with scripts to build OpenSSL on Windows operating
|
||
system. This requires Windows PowerShell.
|
||
|
||
Usage:
|
||
|
||
C:\%POCO_BASE%\openssl\build.ps1 [-openssl_release 1.0.0 | 1.1.0]
|
||
[-vs_version 150 | 140 | 120 | 110 | 100 | 90]
|
||
[-config release | debug | both]
|
||
[-platform Win32 | x64]
|
||
[-library shared | static]
|
||
----
|
||
|
||
Example: Building OpenSSL 1.1.0, DLL release build for x64 with Visual Studio 2015:
|
||
|
||
C:\%POCO_BASE%\openssl\build.ps1 -openssl_release 1.1.0 -vs_version 140 -config release -platform x64 -library shared
|
||
----
|
||
|
||
The above command will download all the necessary packages (perl, nasm, etc)
|
||
and build OpenSSL in <*C:\%POCO_BASE%\openssl\build*> directory; the built OpenSSL
|
||
binaries can be linked from EXEs and DLLs built with Visual Studio 2015 to 2019.
|
||
|
||
Pre-generated POCO Visual Studio projects are configured to use headers and
|
||
libraries from <*C:\%POCO_BASE%\openssl\build*> directory.
|
||
|
||
<*Use a third-party pre-built OpenSSL*>
|
||
|
||
Yet another way to install OpenSSL on Windows is to use a binary
|
||
(prebuild) release, for example the one from Shining Light
|
||
Productions that comes with a Windows installer
|
||
(http://www.slproweb.com/products/Win32OpenSSL.html).
|
||
Depending on where you have installed the OpenSSL libraries,
|
||
you might have to edit the build script (buildwin.cmd), or add the
|
||
necessary paths to the INCLUDE and LIB environment variables. You might also
|
||
have to edit the project settings if the names of the OpenSSL libraries
|
||
from your build differ from the names used in the project files.
|
||
|
||
|
||
!ODBC
|
||
|
||
The Data library requires ODBC support on your system if you want to
|
||
build the ODBC connector (which is the default). On Windows platforms,
|
||
ODBC should be readily available if you have the Windows SDK installed.
|
||
On Unix/Linux platforms, you can use [[http://www.iodbc.org/ iODBC]]
|
||
or [[http://www.unixodbc.org/ unixODBC]. On
|
||
Linux, use your distribution's package management system to install the
|
||
necessary libraries and header files. For example, on Ubuntu, type
|
||
|
||
$ sudo apt-get install libiodbc2 libiodbc2-dev
|
||
----
|
||
|
||
to install the iODBC library and header files.
|
||
|
||
The Data/ODBC and Data/MySQL Makefiles will search for the ODBC and
|
||
MySQL headers and libraries in various places. Nevertheless, the
|
||
Makefiles may not be able to find the headers and libraries. In this
|
||
case, please edit the Makefile in Data/ODBC and/or Data/MySQL
|
||
accordingly.
|
||
|
||
|
||
!MySQL Client
|
||
|
||
The Data library requires the [[http://dev.mysql.com MySQL]] client
|
||
libraries and header files if you want to build the MySQL connector
|
||
(which is the default). On Windows platforms, use the MySQL client
|
||
installer to install the necessary files. On Unix/Linux platforms, use
|
||
the package management system of your choice to install the necessary
|
||
files. Alternatively, you can of course build MySQL yourself from
|
||
source.
|
||
|
||
|
||
!!Building using CMake
|
||
|
||
As an alternative to the platform specific Makefiles and Solutions, CMake can be used
|
||
to do build POCO C++ Libraries on any platform with any compiler. CMake is a meta build system and it
|
||
generate native makefiles and workspaces that can be used in the compiler environment of
|
||
your choice. For a quick overview see http://cgold.readthedocs.io/en/latest/overview/cmake-can.html
|
||
|
||
POCO C++ Libraries requires CMake 3.2 or higher. Static binaries for many platforms can be downloaded from http://www.cmake.org/
|
||
|
||
CMake supports out of source builds and this is the recommended way to build POCO C++ Libraries using CMake.
|
||
|
||
Assuming the POCO C++ Libraries source is located in /path/to/poco directory and you like to build POCO C++ Libraries just type the
|
||
following commands (Command parameters are all the same on any platform).
|
||
|
||
$ cmake -H/path/to/poco -B/path/to/poco-build
|
||
$ cmake --build /path/to/poco-build
|
||
|
||
This will build POCO C++ Libraries in a subdirectory <*poco-build*>. All files produced during build are located in this directory.
|
||
|
||
|
||
!!!Some cmake basic parameters:
|
||
|
||
For Makefile (default on Unix systems) and Ninja based build system (and all other single-configuration generators), there exists following build types:
|
||
* Debug
|
||
* Release
|
||
* RelWithDebInfo (Release build with Debug infos)
|
||
* MinSizeRel (Release build with size optimisation)
|
||
|
||
As default, POCO is build RelWithDebInfo. See cmake output like:
|
||
|
||
...
|
||
-- [cmake] Build type: RelWithDebInfo
|
||
...
|
||
|
||
You can change this with following parameter: <*CMAKE_BUILD_TYPE=....*>
|
||
|
||
For example to build with debug symbols:
|
||
|
||
$ cmake -H/path/to/poco -B/path/to/poco-build -DCMAKE_BUILD_TYPE=Debug
|
||
$ cmake --build /path/to/poco-build
|
||
|
||
For more infos see https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||
|
||
For multi-configuration generators, (like Visual Studio and Xcode), CMAKE_BUILD_TYPE is ignored!
|
||
|
||
For these you should set build type at build time:
|
||
|
||
For example to build with debug symbols:
|
||
|
||
$ cmake -H/path/to/poco -B/path/to/poco-build
|
||
$ cmake --build /path/to/poco-build --config Debug
|
||
|
||
|
||
Installation path of Poco is as defaults to /usr/local on UNIX and c:/Program Files/Poco on Windows.
|
||
|
||
You can change the path with following parameter: <*CMAKE_INSTALL_PREFIX=....*>
|
||
|
||
For example to install in /usr:
|
||
|
||
$ cmake -H/path/to/poco -B/path/to/poco-build -DCMAKE_INSTALL_PREFIX=/usr
|
||
$ cmake --build /path/to/poco-build --install
|
||
|
||
This will install the poco libs in /usr/lib and the binaries in /usr/bin etc.
|
||
|
||
See also cmake output like:
|
||
|
||
....
|
||
-- [cmake] Installation target path: /usr/local
|
||
....
|
||
|
||
For more infos see https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html?highlight=cmake_install_prefix
|
||
|
||
|
||
To set libraries type, you can use following parameter: <*BUILD_SHARED_LIBS=[ON/OFF]*>
|
||
|
||
$ cmake -H/path/to/poco -B/path/to/poco-build -DBUILD_SHARED_LIBS=OFF
|
||
$ cmake --build /path/to/poco-build
|
||
|
||
As default, Poco build dynamic libraries, see cmake output like:
|
||
...
|
||
-- Building dynamic libraries
|
||
...
|
||
|
||
|
||
To set some additional compiler flags, you can use following parameters:
|
||
|
||
* CMAKE_C_FLAGS For C compiler
|
||
* CMAKE_CXX_FLAGS For C++ compiler
|
||
|
||
For example:
|
||
|
||
$ cmake -H/path/to/poco -B/path/to/poco-build -DCMAKE_CXX_FLAGS=-fstack-protector
|
||
$ cmake --build /path/to/poco-build
|
||
|
||
For default compile flags, see cmake output like:
|
||
...
|
||
-- [cmake] Build with cxx flags: -O2 -g -DNDEBUG
|
||
-- [cmake] Build with c flags: -O2 -g -DNDEBUG
|
||
...
|
||
|
||
For more infos see https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS.html#variable:CMAKE_%3CLANG%3E_FLAGS
|
||
|
||
|
||
To use the compiler of your choice, you can use following paramters:
|
||
|
||
* CMAKE_C_COMPILER C compiler
|
||
* CMAKE_CXX_COMPILER C++ compiler
|
||
|
||
For example to use the clang compiler, execute following cmake command:
|
||
|
||
$ cmake -H/path/to/poco -B/path/to/poco-build -DCMAKE_C_COMPILER=/path/to/clang -DCMAKE_CXX_COMPILER=/path/to/clang++
|
||
$ cmake --build /path/to/poco-build
|
||
|
||
To cross compile POCO C++ Libraries for another architecture/device you should have a <*cmake toolchain file*> and execute following command:
|
||
|
||
$ cmake -H/path/to/poco -B/path/to/poco-build -DCMAKE_TOOLCHAIN_FILE=/path/to/toolchainfile
|
||
$ cmake --build /path/to/poco-build
|
||
|
||
See https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html for more information.
|
||
|
||
|
||
!!!Poco special build parameters:
|
||
|
||
POCO C++ Libraries allows you to set some build time options. As an example: to disable the SevenZip support
|
||
type the following command:
|
||
|
||
$ cmake -H/path/to/poco -B/path/to/poco-build -DENABLE_SEVENZIP=OFF
|
||
$ cmake --build /path/to/poco-build
|
||
|
||
Here an overview of POCO build options:
|
||
|
||
* ENABLE_XML Set to OFF|ON (default is ON) to build XML support library
|
||
* ENABLE_JSON Set to OFF|ON (default is ON) to build JSON support library
|
||
* ENABLE_NET Set to OFF|ON (default is ON) to build Net support library
|
||
* ENABLE_NETSSL Set to OFF|ON (default is ON) to build NetSSL support library (Need installed openssl libraries)
|
||
* ENABLE_CRYPTO Set to OFF|ON (default is ON) to build Crypto support library (Need installed openssl libraries)
|
||
* ENABLE_JWT Set to OFF|ON (default is ON, if OpenSSL is present) to build JWT (JSON Web Token) library
|
||
* ENABLE_DATA Set to OFF|ON (default is ON) to build Data support library
|
||
* ENABLE_DATA_SQLITE Set to OFF|ON (default is ON) to build Data SQlite support library
|
||
* ENABLE_DATA_MYSQL Set to OFF|ON (default is ON) to build Data MySQL or MariaDB support library (Need installed MySQL or MariaDB client libraries)
|
||
* ENABLE_DATA_POSTGRESQL Set to OFF|ON (default is ON) to build SQL PosgreSQL support library (Need installed PostgreSQL client libraries)
|
||
* ENABLE_DATA_ODBC Set to OFF|ON (default is ON) to build Data ODBC support library (Need installed ODBC libraries)
|
||
* ENABLE_MONGODB Set to OFF|ON (default is ON) to build MongoDB support library
|
||
* ENABLE_REDIS Set to OFF|ON (default is ON) to build Redis support library
|
||
* ENABLE_PDF Set to OFF|ON (default is OFF) to build PDF support library
|
||
* ENABLE_UTIL Set to OFF|ON (default is ON) to build Util support library
|
||
* ENABLE_ZIP Set to OFF|ON (default is ON) to build Zip support library
|
||
* ENABLE_SEVENZIP Set to OFF|ON (default is OFF) to build SevenZip support library
|
||
* ENABLE_APACHECONNECTOR Set to OFF|ON (default is ON) to build ApacheConnector support library (Need installed apache and apr libraries)
|
||
* ENABLE_CPPPARSER Set to OFF|ON (default is OFF) to build C++ parser library
|
||
* ENABLE_ENCODINGS Set to OFF|ON (default is ON) to build Encodings library
|
||
* ENABLE_ENCODINGS_COMPILER Set to OFF|ON (default is OFF) to build Encodings Compiler
|
||
* ENABLE_PAGECOMPILER Set to OFF|ON (default is ON) to build PageCompiler
|
||
* ENABLE_PAGECOMPILER_FILE2PAGE Set to OFF|ON (default is ON) to build File2Page
|
||
* ENABLE_POCODOC Set to OFF|ON (default is OFF) to build Poco Documentation Generator
|
||
* ENABLE_TESTS Set to OFF|ON (default is OFF) to build Unit tests
|
||
* ENABLE_LONG_RUNNING_TESTS Set to OFF|ON (default is ON) to use long running test
|
||
* POCO_UNBUNDLED Set to OFF|ON (default is OFF) to control linking dependencies as external
|
||
|
||
Windows only parameter:
|
||
|
||
* POCO_MT Set to OFF|ON (default is OFF) to control build of POCO as /MT instead of /MD
|
||
* ENABLE_MSVC_MP Set to OFF|ON (default is OFF) to control parallel build of POCO with MSVC
|
||
* ENABLE_NETSSL_WIN Set to OFF|ON (default is OFF) to build NetSSL support library(Need installed openssl libraries For Windows only)
|
||
|
||
You can also see and enable or disable available options execute following command:
|
||
|
||
$ cmake-gui /path/to/poco-build
|
||
|
||
or for console only:
|
||
|
||
$ ccmake /path/to/poco-build
|
||
|
||
POCO C++ Libraries options are prefixed with <*ENABLE_*>. (This will be changed in POCO 2.x.x to <*POCO_*>)
|
||
|
||
!!!Third-party library location
|
||
|
||
If a third-party library is not installed in a default location, cmake will fail to run.
|
||
There exists following parameters to set additional search paths for cmake to find third-party libraries:
|
||
|
||
To find PostgreSQL:
|
||
* PostgreSQL_ROOT_DIR - Set root installation path where to find include path and libraries of PostgreSQL
|
||
or
|
||
* PostgreSQL_ROOT_INCLUDE_DIRS - Set include paths where to find PostgreSQL headers
|
||
* PostgreSQL_ROOT_LIBRARY_DIRS - Set library paths where to find PostgreSQL libraries
|
||
|
||
To find ODBC:
|
||
* ODBC_ROOT_DIR - Set root installation path where to find include path and libraries of ODBC
|
||
or
|
||
* ODBC_ROOT_INCLUDE_DIRS - Set include paths where to find ODBC headers
|
||
* ODBC_ROOT_LIBRARY_DIRS - Set library paths where to find ODBC libraries
|
||
|
||
To find MySQL or MariaDB:
|
||
* MYSQL_ROOT_DIR - Set root installation path where to find include path and libraries of MySQL or MariaDB
|
||
or
|
||
* MYSQL_ROOT_INCLUDE_DIRS - Set include paths where to find MySQL or MariaDB headers
|
||
* MYSQL_ROOT_LIBRARY_DIRS - Set library paths where to find MySQL or MariaDB libraries
|
||
|
||
* APRUTIL_ROOT_DIR - Set root installation path where to find include path and libraries of apr util
|
||
or
|
||
* APRUTIL_ROOT_INCLUDE_DIRS - Set include paths where to find apr util headers
|
||
* APRUTIL_ROOT_LIBRARY_DIRS - Set library paths where to find apr util libraries
|
||
|
||
* APR_ROOT_DIR - Set root installation path where to find include path and libraries of apr
|
||
or
|
||
* APR_ROOT_INCLUDE_DIRS - Set include paths where to find apr headers
|
||
* APR_ROOT_LIBRARY_DIRS - Set library paths where to find apr libraries
|
||
|
||
* APACHE2_ROOT_DIR - Set root installation path where to find include path and libraries of apache2
|
||
or
|
||
* APACHE2_ROOT_INCLUDE_DIRS - Set include paths where to find apache2 headers
|
||
|
||
|
||
For example set installation path of MySQL:
|
||
|
||
$ cmake -H/path/to/poco -B/path/to/poco-build -DMYSQL_ROOT_DIR=/usr/local/mysql
|
||
$ cmake --build /path/to/poco-build
|
||
or
|
||
$ cmake -H/path/to/poco -B/path/to/poco-build -DMYSQL_ROOT_INCLUDE_DIRS=/usr/local/mysql/include/mysql -DMYSQL_ROOT_LIBRARY_DIRS=/usr/local/lib/mysql
|
||
$ cmake --build /path/to/poco-build
|
||
|
||
|
||
|
||
|
||
!!!How to use POCO in your cmake project:
|
||
|
||
To use POCO C++ Libraries in your cmake project, add following line in your project for example to use crypto:
|
||
|
||
find_package(Poco REQUIRED Crypto)
|
||
....
|
||
target_link_libraries(yourTargetName ... Poco::Crypto)
|
||
|
||
If you get an error like 'By not providing "FindPoco.cmake"', then you should set CMAKE_PREFIX_PATH to the installation directory of your POCO C++ Libraries. For example:
|
||
|
||
$ cmake -H/path/to/yourProject -B/path/to/yourProject-build -DCMAKE_PREFIX_PATH=/path/to/installationOf/poco
|
||
|
||
!!!Some other Hints:
|
||
|
||
For a faster build, use ninja as build system. See https://ninja-build.org/
|
||
For example on Ubuntu execute following commands:
|
||
|
||
$ sudo apt-get install ninja-build
|
||
|
||
This install <*ninja*> command. To use ninja-build execute following cmake commands:
|
||
|
||
$ cmake -H/path/to/poco -B/path/to/poco-build -GNinja
|
||
$ cmake --build /path/to/poco-build --target all
|
||
|
||
See https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html for other generators.
|
||
|
||
To enable verbose output from Makefile builds, execute following cmake commands:
|
||
|
||
$ cmake -H/path/to/poco -B/path/to/poco-build -DCMAKE_VERBOSE_MAKEFILE=ON
|
||
$ cmake --build /path/to/poco-build --target all
|
||
|
||
|
||
Some more infos about cmake see:
|
||
|
||
$ cmake --help-full
|
||
https://cmake.org/cmake/help/latest/
|
||
http://cgold.readthedocs.io/en/latest/index.html
|
||
|
||
|
||
!!Building On Windows
|
||
|
||
Microsoft Visual Studio 2015 or newer is required to build the
|
||
POCO C++ Libraries on Windows platforms.
|
||
Solution and project files for all versions are included.
|
||
64-bit (x64) builds are supported as well.
|
||
You can either build from within Visual Studio (<*Build->Batch
|
||
Build->Select All;Rebuild*>) or from the command line. To build from the
|
||
command line, start the Visual Studio 2015 (or 2017, 2019, etc.) Command
|
||
Prompt and go (<[cd]>) to the directory where you have extracted the POCO
|
||
C++ Libraries sources. Then, simply start the <*buildwin.cmd*> script and
|
||
pass as argument the version of Visual Studio (140, 150, 160). You
|
||
can customize what is being built by <*buildwin.cmd*> by passing appropriate
|
||
command line arguments to it. Call <*buildwin.cmd*> without arguments to see
|
||
what is available. Build environment is set up by the buildwin.cmd; to avoid
|
||
build problems, it is recommended to start the build in a clean command
|
||
prompt console, i.e. not in the one provided by Visual Studio for 32/64-bit
|
||
builds (although those will work fine if used appropriately for the right
|
||
32/64-bit build type).
|
||
|
||
To disable certain components (e.g., NetSSL_OpenSSL or Data/MySQL) from
|
||
the build, edit the text file named <*components*> in the distribution
|
||
root directory and remove or comment the respective lines.
|
||
|
||
Certain libraries, like NetSSL_OpenSSL, Crypto or Data/MySQL have
|
||
dependencies to other libraries. Since the build script does not know where to
|
||
find the necessary header files and import libraries, you have to either add
|
||
the header file paths to the <[INCLUDE]> environment variable and the
|
||
library path to the <[LIB]> environment variable, or you'll have to edit the
|
||
buildwin.cmd script, where these environment variables can be set as
|
||
well.
|
||
|
||
In order to run the test suite and the samples, the top-most bin
|
||
directory containing the resulting shared libraries must be in the PATH
|
||
environment variable.
|
||
|
||
|
||
!!Building On Unix/Linux/macOS
|
||
|
||
For building on Unix platforms, the POCO C++ Libraries come with their
|
||
own build system. The build system is based on GNU Make 3.80 (or newer),
|
||
with the help from a few shell scripts. If you do not have GNU Make 3.80
|
||
(or newer) installed on your machine, you will need to download it from
|
||
http://directory.fsf.org/devel/build/make.html and
|
||
build and install it prior to building the POCO C++ Libraries.
|
||
|
||
You can check the version of GNU Make installed on your system with
|
||
|
||
$ gmake --version
|
||
----
|
||
|
||
or
|
||
|
||
$ make --version
|
||
----
|
||
|
||
Once you have GNU Make up and running, the rest is quite simple.
|
||
To extract the sources and build all libraries, testsuites and samples, simply
|
||
|
||
$ gunzip poco-X.Y.tar.gz
|
||
$ tar -xf poco-X.Y.tar
|
||
$ cd poco-X.Y
|
||
$ ./configure
|
||
$ gmake -s
|
||
----
|
||
|
||
For help, either invoke
|
||
|
||
$ ./configure --help
|
||
----
|
||
|
||
Alternatively, you can read the configure script source for a list of possible options.
|
||
For starters, we recommend <[--no-tests]> and <[--no-samples]>, to reduce build times.
|
||
On a multicore or multiprocessor machine, use parallel makes to speed up
|
||
the build (<[make -j4]>).
|
||
|
||
Once you have successfully built POCO, you can install it
|
||
to <*/usr/local*> (or another directory specified as parameter
|
||
to configure <[--prefix=<path>]>):
|
||
|
||
$ sudo gmake -s install
|
||
----
|
||
|
||
You can omit certain components from the build. For example, you might
|
||
want to omit Data/ODBC or Data/MySQL if you do not have the corresponding
|
||
third-party libraries (iodbc or unixodbc, mysqlclient) installed
|
||
on your system. To do this, use the <[--omit]> argument to configure:
|
||
|
||
$ ./configure --omit=Data/ODBC,Data/MySQL
|
||
----
|
||
|
||
<*IMPORTANT: Make sure that the path to the build directory does not
|
||
contain symbolic links. Furthermore, on macOS (or other systems
|
||
with case insensitive filesystems), make sure that the characters in
|
||
the path have the correct case. Otherwise you'll get an error saying
|
||
"Current working directory not under $PROJECT_BASE.".*>
|
||
|
||
|
||
!!Building On QNX Neutrino
|
||
|
||
For QNX Neutrino, the Unix build system (see the instructions above) is used.
|
||
You can use the build system to cross-compile for a target platform on a
|
||
Solaris or Linux host. Unfortunately, the Cygwin-based Windows host
|
||
environment has some major quirks that prevent the build system from
|
||
working there. You can also use the build system on a self-hosted QNX
|
||
system. The default build configuration for QNX (found in
|
||
build/config/QNX) is for a self-hosted x86 platform. To specify another
|
||
target, edit the CCVER setting in the build configuration file. For
|
||
example, to compile for a PowerPC target, specify
|
||
CCVER=3.3.1,gcc_ntoppcbe.
|
||
|
||
Service Pack 1 for QNX Neutrino 6.3 must be installed, otherwise compiling the
|
||
Foundation library will fail due to a problem with the <*<list>*> header in the
|
||
default (Dinkumware) C++ standard library.
|
||
|
||
When building on QNX, you might want to disable NetSSL_OpenSSL, Crypto and
|
||
some Data connectors, unless you have the necessary third party components
|
||
available:
|
||
|
||
$ ./configure --omit=NetSSL_OpenSSL,Crypto,Data/ODBC,Data/MySQL
|
||
----
|
||
|
||
!!!Tutorials And Sample Code
|
||
|
||
Introductory documentation consisting of various documents and tutorials
|
||
in the form of slide decks can be found at the
|
||
[[http://pocoproject.org/documentation/ POCO C++ Libraries Documentation]] page.
|
||
|
||
Sample applications demonstrating the various features of the POCO C++
|
||
Libraries are delivered with the source code. Every library's source
|
||
code directory
|
||
has a <*samples*> directory containing various sample applications.
|
||
|
||
When building the sample applications on platforms using the gmake-based
|
||
build system, please make sure that the environment variable
|
||
<[POCO_BASE]> contains
|
||
the path to the POCO C++ Libraries source tree root directory.
|
||
|
||
|
||
!!!Creating Your Own POCO-based Applications
|
||
|
||
The best way to create your first POCO-based application is by copying
|
||
one of the sample projects and making the desired changes. Examine the
|
||
project files and Makefiles to see what compiler options must be set for
|
||
your specific platform.
|