[Therion] Packaging therion 5.3 doe Debian/ubuntu

Wookey wookey at wookware.org
Tue Jun 1 20:54:56 CEST 2010


+++ Wookey [2010-05-30 23:37 +0100]:
> OK. I'm updating the Debian (anfd thus ubuntu) Therion package to the
> currently released 5.3.
> 
> I'm getting a build problem in loch:
> c++ -o  -D_GNU_SOURCE -DLOCH -DLXLINUX
> -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6
> -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
> -DNO_GCC_PRAGMA   -Wno-deprecated -fno-strict-aliasing
> -I/usr/include/freetype2 -I/usr/include/vtk-5.4 -O2 -o lxAboutDlg.o
> lxAboutDlg.cxx
> lxAboutDlg.cxx: In constructor ‘lxAboutDlg::lxAboutDlg(wxWindow*)’:
> lxAboutDlg.cxx:80: error: ‘LTHVERSION’ was not declared in this scope
> 
> The code says:
>   wxString lxVer;
>   lxVer = _T("Version: ");
>   lxVer += _T(THVERSION);
>   
> So can someone explain where the 'LTHVERSION' being complained about
> comes from? The 'THVERSION' in the code _is_ declared. Is this
> something to do with the _T function/macro?

OK. I can make it build by changing the code to:
>   lxVer += _T("5.3");  (i.e. substitute the variable myself)

If I just remove the _T:
lxVer += THVERSION;
I get
lxAboutDlg.cxx:80: error: ambiguous overload for ‘operator+=’ in ‘lxVer += "5.3"’
/usr/include/wx-2.6/wx/string.h:902: note: candidates are: void wxString::operator+=(const wxWCharBuffer&) <near match>
/usr/include/wx-2.6/wx/string.h:1284: note:                wxString& wxString::operator+=(const wxString&) <near match>
/usr/include/wx-2.6/wx/string.h:1290: note:                wxString& wxString::operator+=(wxChar) <near match>

changing it to:
 lxVer += (const wxWCharBuffer&) THVERSION;
 or
 lxVer += (const wxString&) THVERSION;
compiles but segfaults if you try to open the about dialog. 

So it does seem that the original error is something to do with the
_T() thing as removing it gets me differnt complaints.

So, can anyone explain why THVERSION is happily in scope so long as
the code is wrong, but as soon as we use the _T() fn/macro a complaint
about a variable that doesn;t exist is produced? 

I think this is c++ magic, which I admit to not understanding so I
need a bit of help.

Gcc version is 4.4.4

For the time being I am just using "5.3" instead of the variable, but
that's not a very satisfactory solution. I do now have some 5.3
packages but they need a bit of work to be uploadable. I'll put up
links for people to try as soon as they look like they work OK.

Wookey
-- 
Principal hats:  Emdebian, Wookware, Balloonboard
http://wookware.org/



More information about the Therion mailing list