Description of problem: Hi, I am packaging spectrum Jabber gateway (bug 578480) which uses poco. I would love to get spectrum to EPEL-5 as well, and so I would need poco in EPEL-5 as well. Would you do it, or should I take over maintainership of poco in EPEL-5? Thank you
Silly me, of course poco already is at EPEL-5. Well, actually ... http://cvs.fedoraproject.org/viewvc/rpms/poco/EL-5/ is there but it seems to be kind of empty. What's going on here?
Hallo! A very simple thing is going on here: insufficient dependencies. First, POCO requires newer version of sqlite (last time I checked it was at 3.3.6 here which POCO refused to compile against); second, iodbc is missing. iodbc may be added to EPEL, but sqlite has to be updated at the "RHEL" level.
(In reply to comment #2) > second, iodbc is missing. So just to make sure iodbc is not an issue http://koji.fedoraproject.org/koji/taskinfo?taskID=2090916 Now I have to think about that sqlite
OK, so just to document my (non-)progress: ** Compiling src/SessionImpl.cpp (debug, shared) g++ -I/usr/include/libiodbc -Iinclude -I/usr/src/redhat/BUILD/poco-1.3.5-all/CppUnit/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Foundation/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/XML/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Util/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Net/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Crypto/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/NetSSL_OpenSSL/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Data/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Data/SQLite/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Data/ODBC/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Data/MySQL/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Zip/include -Wall -Wno-sign-compare -DPOCO_BUILD_HOST=tikanga.ceplovi.cz -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_XOPEN_SOURCE=500 -D_REENTRANT -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DSQLITE_THREADSAFE=1 -DSQLITE_DISABLE_LFS -DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_COMPLETE -DSQLITE_OMIT_TCL_VARIABLE -DSQLITE_OMIT_DEPRECATED -g -D_DEBUG -fPIC -c src/SessionImpl.cpp -o /usr/src/redhat/BUILD/poco-1.3.5-all/Data/SQLite/obj/Linux/i686/debug_shared/SessionImpl.o src/SessionImpl.cpp: In member function 'void Poco::Data::SQLite::SessionImpl::open()': src/SessionImpl.cpp:118: error: 'sqlite3_extended_result_codes' was not declared in this scope make[1]: *** [/usr/src/redhat/BUILD/poco-1.3.5-all/Data/SQLite/obj/Linux/i686/debug_shared/SessionImpl.o] Error 1 make[1]: Leaving directory `/usr/src/redhat/BUILD/poco-1.3.5-all/Data/SQLite' make: *** [Data/SQLite-libexec] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.28060 (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.28060 (%build) [matej@tikanga rpmbuild]$
(BTW, upstream should fix their autofoo to declare correctly which version of sqlite they want, but that's another point)
If unavailable "sqlite3_extended_result_codes" function is the only problem, then I think we're fine. From a quick look at the source poco does not seem to take the extended error codes into account anyway (ie. it does handle any of the codes SQLITE_IOERR_* specifically, it only knows the basic SQLITE_IOERR). I'd say you can safely comment out the call. More info here: http://www.sqlite.org/c3ref/c_ioerr_access.html
(In reply to comment #6) > (ie. it does handle any of the codes SQLITE_IOERR_* specifically Should have said: It does NOT handle any ...
[matej@tikanga poco-1.3.5-all]$ cat TODO_Fedora + grep -ri sqlite3_extended_result_code . ./Data/SQLite/src/SessionImpl.cpp: sqlite3_extended_result_codes(_pDB, 1); + grep -r SQLITE_IOERR . ./Data/SQLite/src/Utility.cpp: case SQLITE_IOERR: + grep -r SQLITE_L . ./Data/SQLite/src/SQLiteStatementImpl.cpp: // When we get SQLITE_LOCKED, we must reset the statement before trying ./Data/SQLite/src/SQLiteStatementImpl.cpp: // again. SQLITE_LOCKED is only returned for the first call to sqlite3_step, ./Data/SQLite/src/SQLiteStatementImpl.cpp: case SQLITE_LOCKED: ./Data/SQLite/src/SQLiteStatementImpl.cpp: case SQLITE_LOCKED_SHAREDCACHE: ./Data/SQLite/src/Utility.cpp: case SQLITE_LOCKED: ./Data/SQLite/src/Utility.cpp: case SQLITE_LOCKED_SHAREDCACHE: [matej@tikanga poco-1.3.5-all]$
Alright, SQLITE_LOCKED_SHAREDCACHE is also one of the extended error codes, but poco always handles it identically to SQLITE_LOCKED.
OK, so we have progressed: ** Compiling src/SQLiteStatementImpl.cpp (debug, shared) g++ -I/usr/include/libiodbc -Iinclude -I/usr/src/redhat/BUILD/poco-1.3.5-all/CppUnit/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Foundation/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/XML/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Util/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Net/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Crypto/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/NetSSL_OpenSSL/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Data/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Data/SQLite/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Data/ODBC/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Data/MySQL/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Zip/include -Wall -Wno-sign-compare -DPOCO_BUILD_HOST=tikanga.ceplovi.cz -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_XOPEN_SOURCE=500 -D_REENTRANT -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DSQLITE_THREADSAFE=1 -DSQLITE_DISABLE_LFS -DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_COMPLETE -DSQLITE_OMIT_TCL_VARIABLE -DSQLITE_OMIT_DEPRECATED -g -D_DEBUG -fPIC -c src/SQLiteStatementImpl.cpp -o /usr/src/redhat/BUILD/poco-1.3.5-all/Data/SQLite/obj/Linux/i686/debug_shared/SQLiteStatementImpl.o src/SQLiteStatementImpl.cpp: In member function 'void Poco::Data::SQLite::SQLiteStatementImpl::compileImplImpl()': src/SQLiteStatementImpl.cpp:106: error: 'sqlite3_prepare_v2' was not declared in this scope src/SQLiteStatementImpl.cpp: In member function 'virtual void Poco::Data::SQLite::SQLiteStatementImpl::bindImpl()': src/SQLiteStatementImpl.cpp:173: warning: comparison between signed and unsigned integer expressions src/SQLiteStatementImpl.cpp: In member function 'virtual bool Poco::Data::SQLite::SQLiteStatementImpl::hasNext()': src/SQLiteStatementImpl.cpp:225: error: 'SQLITE_LOCKED_SHAREDCACHE' was not declared in this scope src/SQLiteStatementImpl.cpp: In member function 'virtual void Poco::Data::SQLite::SQLiteStatementImpl::next()': src/SQLiteStatementImpl.cpp:254: warning: comparison between signed and unsigned integer expressions make[1]: *** [/usr/src/redhat/BUILD/poco-1.3.5-all/Data/SQLite/obj/Linux/i686/debug_shared/SQLiteStatementImpl.o] Error 1 make[1]: Leaving directory `/usr/src/redhat/BUILD/poco-1.3.5-all/Data/SQLite' make: *** [Data/SQLite-libexec] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.47776 (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.47776 (%build) [matej@tikanga rpmbuild]$
sqlite3_prepare_v2 can be replaced by sqlite3_prepare, but more care is needed, because it changes the semantics of subsequent calls slightly.
Created attachment 404290 [details] current state of the patch ** Compiling src/SQLiteStatementImpl.cpp (debug, shared) g++ -I/usr/include/libiodbc -Iinclude -I/usr/src/redhat/BUILD/poco-1.3.5-all/CppUnit/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Foundation/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/XML/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Util/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Net/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Crypto/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/NetSSL_OpenSSL/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Data/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Data/SQLite/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Data/ODBC/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Data/MySQL/include -I/usr/src/redhat/BUILD/poco-1.3.5-all/Zip/include -Wall -Wno-sign-compare -DPOCO_BUILD_HOST=tikanga.ceplovi.cz -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_XOPEN_SOURCE=500 -D_REENTRANT -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DSQLITE_THREADSAFE=1 -DSQLITE_DISABLE_LFS -DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_COMPLETE -DSQLITE_OMIT_TCL_VARIABLE -DSQLITE_OMIT_DEPRECATED -g -D_DEBUG -fPIC -c src/SQLiteStatementImpl.cpp -o /usr/src/redhat/BUILD/poco-1.3.5-all/Data/SQLite/obj/Linux/i686/debug_shared/SQLiteStatementImpl.o src/SQLiteStatementImpl.cpp: In member function 'void Poco::Data::SQLite::SQLiteStatementImpl::compileImplImpl()': src/SQLiteStatementImpl.cpp:104: error: 'SQLITE_CONFIG_MEMSTATUS' was not declared in this scope src/SQLiteStatementImpl.cpp:104: error: 'sqlite3_config' was not declared in this scope src/SQLiteStatementImpl.cpp: In member function 'virtual void Poco::Data::SQLite::SQLiteStatementImpl::bindImpl()': src/SQLiteStatementImpl.cpp:175: warning: comparison between signed and unsigned integer expressions src/SQLiteStatementImpl.cpp: In member function 'virtual void Poco::Data::SQLite::SQLiteStatementImpl::next()': src/SQLiteStatementImpl.cpp:256: warning: comparison between signed and unsigned integer expressions make[1]: *** [/usr/src/redhat/BUILD/poco-1.3.5-all/Data/SQLite/obj/Linux/i686/debug_shared/SQLiteStatementImpl.o] Error 1 make[1]: Leaving directory `/usr/src/redhat/BUILD/poco-1.3.5-all/Data/SQLite' make: *** [Data/SQLite-libexec] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.42529 (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.42529 (%build) [matej@tikanga build]$
Taking the bug, no-one should be punished for this obsession.
Package as is in http://koji.fedoraproject.org/koji/taskinfo?taskID=2097187 (and patch commited to CVS should theoretically build; it does locally), but for missing libiodbc in EPEL-5 (see bug 579763 for that).
A couple of notes about the current poco-1.3.5-RH-old-SQLite.patch: +// Attempt to make this build compatible with more recent versions of SQLite +// API. +#ifndef SQLITE_LOCKED_SHAREDCACHE + #define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8) ) +#endif There are two reasons you're guaranteed never to receive this error code: - It does not exist in sqlite-3.3.6 (the version in RHEL-5). - You keep SQlite extended result codes disabled and this is one of them. So I find removing the two occurrences of "SQLITE_LOCKED_SHAREDCACHE" from poco source code cleaner than defining the macro. But it's not really wrong either way, so whatever. - rc = sqlite3_prepare_v2(_pDB, pSql, -1, &pStmt, &pLeftover); + rc = sqlite3_prepare(_pDB, pSql, -1, &pStmt, &pLeftover); Yeah, as I said before, this change needs to be handled with care. It changes the way sqlite3_step() reports errors and I don't see SQLiteStatementImpl::hasNext() changed appropriately. It won't be a big change, but it must be tested in error situations.
poco-1.3.5-8.el5 has been submitted as an update for Fedora EPEL 5. http://admin.fedoraproject.org/updates/poco-1.3.5-8.el5
I am aware of this comment, and I will address it in the separate bug 582147 now when we have the package in.
poco-1.3.5-8.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report.