dev-db/unixODBC-2.2.14 changed SQLLEN and SQLULEN from #define to typedef. wx/db.h does this: #ifndef SQLLEN #define SQLLEN SQLINTEGER #endif #ifndef SQLULEN #define SQLULEN SQLUINTEGER #endif This causes a lot of errors, mostly like this: db.cpp:1636: error: cannot convert ‘SQLINTEGER*’ to ‘SQLLEN*’ for argument ‘6’ to ‘SQLRETURN SQLGetData(void*, SQLUSMALLINT, SQLSMALLINT, void*, SQLLEN, SQLLEN*)’ ... dbtable.cpp:592: error: cannot convert ‘SQLUINTEGER*’ to ‘SQLULEN*’ for argument ‘4’ to ‘SQLRETURN SQLExtendedFetch(void*, SQLUSMALLINT, SQLLEN, SQLULEN*, SQLUSMALLINT*)’ FYI: Just fixed a similar issue in kde-sunset dev-db/qt-unixODBC: http://git.overlays.gentoo.org/gitweb/?p=proj/kde-sunset.git;a=commitdiff;h=1c5a49baeab71f81be251fc980434eebdfc79488 There I did revbump, but I guess there should be no need to do so.
Created attachment 224895 [details, diff] Proposed patch This patch simply drops the whole macro definition block. It therefore causes the resulting code to rely on unixODBC versions recent enough to provide SQLLEN, and will work with dev-db/unixODBC-2.2.14.
x11-libs/wxGTK-2.8.10.1-r5 is affected as well as the x11-libs/wxGTK-2.6.4.0-r6 for which I originally reported this bug. Patch applies cleanly with some offset.
thanks for researching this. i'd rather not force us to depend on any particular version if it can be avoided. i forwarded this upstream to see if they have a better idea.
Upstream you indicated that the patch was forcing us to use >=unixODBC-2.2.14. This is wrong. SQLLEN was introduced in revision 1.4 of sqltypes.h back in 2001: http://unixodbc.cvs.sourceforge.net/viewvc/unixodbc/unixODBC/include/sqltypes.h?view=diff&r1=1.3&r2=1.4 So that's what "versions recent enough to provide SQLLEN" from my comment #1 boils down to upon further investigation. Since the beginning it would be defined either as a #define or as a typedef. The only thing that recently changed seems to be that the preprocessor now chooses the typedef over the #define at least on my system. Without the patch, the wxGTK code works with the #define but fails with the typedef. With my patch applied, the code works with either one, and fails if SQLLEN isn't specified in either way. As the earliest unixODBC package present in the portage tree is 2.2.12, which according to the ChangeLog was added in 2007, I'd consider it safe to assume that it does provide SQLLEN. Checking the sources does confirm this: SQLLEN is present in the 2.2.12 sqltypes.h. I don't know if anyone out there might conceivably have a unixODBC version from 2001 around. If so, then depending on >=2.2.12 would simply force such people to update to what portage provides these days, without imposing any severe restriction. You might as well skip this dependency, though, as anyone not updating for so long deserves having to deal with some errors caused by hopelessly outdated packages. Up to you, either one seems sane to me.
yeah, i misread that. i'll apply this next time i get a chance.
Will you also update the upstream report?
Fixed in 2.6.4.0-r6 and 2.8.10.1-r5.