Recent

Author Topic: SQLite+Linux+64bit  (Read 7277 times)

pfranchuk

  • New Member
  • *
  • Posts: 19
SQLite+Linux+64bit
« on: February 17, 2006, 01:06:05 am »
I downloaded the x86_64 snapshot Tues and again today. I know the snapshots aren't supposed to work, etc. However, when I try to install the sqlite3 (or the sqlite) components, the compiler complains about casting between enumerated and TObject in the component editor unit. Evidently, a TStringList is being used with the object taking the role of storing the datatype. Is this a new compiler restraint, tightened check, or bug? Can it be fixed? It appears to be the same code that is used in 0.9.12 (32bit) and there it works.

Thank you for any assistance or direction for getting this corrected.

Peter

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 458
RE: SQLite+Linux+64bit
« Reply #1 on: February 24, 2006, 12:50:05 am »
I would call a bad programing practice, although should not cause problems in this case. Problems would occur if the value used to typecast to TObject exceeds the 32bit range.
So, you can ignore the warnings and use the component.
ASAP I'll take a look at more elegant solution.

Luiz

pfranchuk

  • New Member
  • *
  • Posts: 19
RE: SQLite+Linux+64bit
« Reply #2 on: February 24, 2006, 01:29:06 am »
Thank you for answering my post.

BUT this enumeration to TObject conversion problem is not a warning. It is a compile stopper.
So, the component is not usable since it won't compile.

Peter

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 458
RE: SQLite+Linux+64bit
« Reply #3 on: February 24, 2006, 02:14:16 am »
Ok. I don't know if is a compiler bug or really a bugfix ;-). Can you ask in the fpc maillist (fpc-devel@lists.freepascal.org) using a generic example? (I don't have fpc 64 here). Anyway it's necessary to redo with a more elegant/compliant code. I'll keep you informed of new versions of the package.

Luiz

pfranchuk

  • New Member
  • *
  • Posts: 19
RE: SQLite+Linux+64bit
« Reply #4 on: March 10, 2006, 04:14:25 pm »
I have modified the code to use dynamic arrays of TFieldType to store the listbox and combobox info. It now compiles, but, using the current snapshot of the 64 bit I cannot add any components. The typecasting problem seems to be a problem not just in your code but even the examples will not compile on rebuild of IDE. The listbox example uses typecast between TObject and Integer which also fails.

I am not sure who to complain to on either of these problems. Hint on this would be welcome.

Peter

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 458
RE: SQLite+Linux+64bit
« Reply #5 on: March 10, 2006, 08:47:44 pm »
Are you saying that none of the default Lazarus components (TButton, TLabel) are working? If so it's clear that the problem is in the compiler. You could ask in fpc-pascal list if is know issue and if not add a bug report in the fpc bugtracker.

Regarding the sqlite component issue, i have two hints:
1) Try to reproduce the bug (TypeCast from a enum to a TObject) in a small vanilla fpc program and ask in the fpc-devel list if is considered a bug or not. If is a bug add in the bug tracker.
2) The code the compiler complains is only to the in design table editor which is not necessary to the sqlite component. You can comment all the code inside the tableeditorform.pas unit and still will work.

Luiz

pfranchuk

  • New Member
  • *
  • Posts: 19
RE: SQLite+Linux+64bit
« Reply #6 on: March 11, 2006, 12:27:52 am »
No, I mean that the rebuild lazarus will not rebuild if the options include examples because the ONE example (listbox) has the problem typecasting between TObject and Integer.

The other problem is that the current snapshot will not add any components (a listindex out of bounds at the point of linking in the component pallette.

The devel team has an example of the typecast problem in the listbox example.

I realized that just ommitting the tableeditor will complie, infact just commenting out the two bad lines in the source file allowed me to install the component before (of course with a broken editor), but I would like to use it. It looks like x86_64 isn't quite ready.

Peter

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: RE: SQLite+Linux+64bit
« Reply #7 on: March 13, 2006, 08:59:29 am »
Quote from: "pfranchuk"
No, I mean that the rebuild lazarus will not rebuild if the options include examples because the ONE example (listbox) has the problem typecasting between TObject and Integer.


I must admit, then I seldomly compile the examples. I fixed this, so the examples now compile on amd64.

Quote
The other problem is that the current snapshot will not add any components (a listindex out of bounds at the point of linking in the component pallette.

I realized that just ommitting the tableeditor will complie, infact just commenting out the two bad lines in the source file allowed me to install the component before (of course with a broken editor), but I would like to use it.


Can you sibmit a bug report (with little more information, e.g. what are the bad lines)?

Quote
It looks like x86_64 isn't quite ready.

There aren't many Lazarus developers with an x86_64 system yet, so we need good feedback from Lazarus users with such systems.

pfranchuk

  • New Member
  • *
  • Posts: 19
Re: RE: SQLite+Linux+64bit
« Reply #8 on: August 07, 2006, 03:08:00 am »
Quote from: "Vincent"

Can you sibmit a bug report (with little more information, e.g. what are the bad lines)?

Quote
It looks like x86_64 isn't quite ready.

There aren't many Lazarus developers with an x86_64 system yet, so we need good feedback from Lazarus users with such systems.


It looks like that with FPC2.0.4 snapshot the problems with adding components and with the access violation opening dialogs is fixed.

There remains a problem with conversion between TObject and enum.eration type is creating errors. I am confused by this since one such conversion at Luis' line 179 in componecteditor creates a problem, yet a few lines later the conversion takes place without a problem. The errors appear to be related to doing an addobject to a listbox while doing addobject for combobox is pulled off without a problem