My question is: Is there a way to compile Lazarus so I don't have to put the files from db into project directory? Sorry if I misunderstood something.
As the issue is with fpc code, the answer is no. No simple rebuild of Lazarus will solve the problem. Reineir's workaround of putting files into the project folder was so your project would use those files instead of the fpc files. It's a workaround only.
Can someone explain me how to compile laz 1.2.4 with 2.6.4 to solve this. I read the bug report but I don't know how to get db.o and db.ppu which is bambamns talking about.
EDIT: I tried to add fields.inc (whic has one line changed) and rebuild lazarus and it's the same.
Well... the below steps are what I would do...
The tool I use is fpcup
http://wiki.lazarus.freepascal.org/fpcuphttps://bitbucket.org/reiniero/fpcup* Configure and use that to get yourself Lazarus 1.2.4 / fpc 2.6.4 (this means you'll have two copies on your system - the one you installed originally, and a new instance built by fpcup - the configuration step is important as out of the box fpcup will get you Lazarus Trunk/fpc Trunk)
* Apply the patch from the bugtracker to the new fpc sources.
* Configure fpcup as per the steps here:
http://forum.lazarus.freepascal.org/index.php/topic,25027.msg151310.html#msg151310* Re-run fpcup with -buildall.
Or... Do you have to use Lazarus 1.2.4/fpc2.6.4? If you don't mind using trunk (where apparently this issue has been resolved) you can simplify all the above to:
* Download and run fpcup.
If you go down either of these paths, please google/forum search rebuilding fpc. Problems are likely to be encountered, and chances are good you won't be the first to have the problem you encounter. I'd hate for you to ask a question that's been asked a million times before :-)