[Pkg-pascal-devel] Bug#813718: mricron: FTBFS: dialogsx.pas(77, 14) Error: (4054) Illegal type conversion: "TMsgDlgButtons" to "TMsgDlgButtons"

Paul Gevers elbrus at debian.org
Fri Feb 5 17:12:01 UTC 2016


Hi

On 05-02-16 04:38, Paul Gevers wrote:
> control: retitle -1 removal of gtk1 causes mricron to FTBFS with 3.0.0

Not sure anymore that this is the correct title.

> In 2.6.4+dfsg-7 I removed¹ the gtk1 related units from fpc as the
> underlaying library was removed in Debian more than five years ago. With
> 2.6.4, the build doesn't fail on the missing code, which is weird of
> course. Apparently fpc got stricter in its checks, which is good I
> think. I am not sure if the current issue points out that mricron is
> trying to do something that is not working in Debian for the last five
> years, or if there are pieces of the gtk1 part of fpc that still have
> its usefulness, even without the gtk1 library. Any help to investigate
> that is welcome.
> 
> At least I expect mricron in testing to be broken, in so far that if you
> would rebuild it NOW in testing, it can't be working as it should. If it
> can, you apparently can just remove this piece of code from mricron and
> build without it.

My previous analysis was not (completely?) correct. I thought the issue
was that TMsgDlgButtons was removed from fpc when we removed gtk1 code.
But now I actually got a copy of the mricron code, I notice that it has
its own code (smells like a copy) to generate that. It is a set of
TMsgDlBtn and that is also defined by itself:
TMsgDlgBtn = (mbYes, mbNo, mbOK, mbCancel, mbAbort, mbRetry, mbIgnore,
mbAll, mbNoToAll, mbYesToAll, mbHelp);

I have no clue what could be wrong with the following code (my Pascal is
not that great) but maybe someone here sees it:
"""
function MsgDlg(const Msg: string; DlgType: TMsgDlgType; Buttons:
TMsgDlgButtons; HelpCtx: Longint): Word;
{$IFDEF GUI}
var
   lDlgType : Dialogs.TMsgDlgType;
   lButtons: Dialogs.TMsgDlgButtons;

begin
  lDlgType :=  Dialogs.TMsgDlgType(DlgType);
  lButtons:= Dialogs.TMsgDlgButtons(Buttons);
  result := MessageDlg(Msg, lDlgType, lButtons,HelpCtx);
{$ELSE}
"""

I can't see where the dialogs unit is getting the TMsgDlgButtons method
or function or procedure or whatever it is called in Pascal from.

Paul

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-pascal-devel/attachments/20160205/d36d65c3/attachment.sig>


More information about the Pkg-pascal-devel mailing list