View Issue Details

IDProjectCategoryView StatusLast Update
0012681LazarusIDEpublic2009-06-13 12:10
ReporterPere Casanovas Assigned ToMattias Gaertner  
Status closedResolutionfixed 
Product Version0.9.26 
Target Version0.9.26.2Fixed in Version0.9.26.2 
Summary0012681: Can't rebuild Lazarus (Codetools' BeautifyStatement generate invalid source)
Description1.- If I build a single application with a Tform and a Tbutton it builds correctly, but if the application includes some SQLdb componets it show:

Write Error: Unable to create file

If I try build the SQLDB application from root, then show this error.

/usr/lib/lazarus/components/sqldb/sqldblaz.pas(5,1) Fatal: String exceeds line

Attached sqldblaz.pas created by Lazarus.

2.- When I try to rebuild lazarus, with or without new packages it shows the same error with the first package to compile:

/usr/lib/lazarus/lcl/translations.pas(864,3) Note: Local variable "p" not used
"LCL" completed
"SynEdit" completed
"CodeTools" completed
"Package Registration" completed
"IDE Interface" completed
"JIT Form" completed
"Examples" completed
/usr/lib/lazarus/components/tachart/tachartlazaruspkg.pas(5,1) Fatal: String exceeds line

The error is the same of an attached sqldblaz.pas and it repeats when I try to compile any package.

Additional InformationI'd had Lazarus 0.9.22 from .rpm on Debian etch working fine. (Pentium III, 256 MB ram)

Then I updated Debian etch to lenny, uninstalled fpc and Lazarus, deleted all fpc, lazarus and .lazarus directories and installed fpc and Lazarus 0.9.26 (.deb) by synaptic from: lazarus-stable universe

It had been installed without any problem, but I can't rebuild Lazarus and install packages. I tried to build with GTK and GTK2 with same results.

I don't know if it is a bug, but I don't know how solve it.

Sorry for my bad English
TagsNo tags attached.
Fixed in Revision18405
Attached Files


2008-11-21 12:02


sqldblaz.pas (427 bytes)   
{ Aquest fitxer l'ha creat automàticament el Lazarus. No l'editeu!
  Aquesta font només s'utilitza per compilar i instal·lar el paquet.

    +'unit SQLDBLaz;


registersqldb, sqldb, SQLStringsPropertyEditorDlg, LazarusPackageIntf;


procedure Register; 
  RegisterUnit('registersqldb', @registersqldb.Register); 

  RegisterPackage('SQLDBLaz', @Register); 
sqldblaz.pas (427 bytes)   

Vincent Snijders

2008-11-23 10:23

manager   ~0023503

I wonder if the packaged sqldblaz.pas in the deb also contains the ' .

Pere Casanovas

2008-11-25 12:12

reporter   ~0023548

After install Lazarus the lines 5 and 6 of /usr/lib/lazarus/components/sqldb/sqldblaz.pas contained:
unit SQLDBLaz;
After compile package or rebuild Lazarus the two lines changed to:
    +'unit SQLDBLaz;
This change apears on many (perhaps not all) packages when i try to compile them.

Paul Ishenin

2009-01-09 18:57

manager   ~0024322

1. Try to change your ide language to english, fix error in sqldblaz and rebuild lazarus
2. Try to install svn version of lazarus and check whether this problem exists there.

I have a fealing that it can be related with translation you are using but I am not sure.

Pere Casanovas

2009-01-10 17:08

reporter   ~0024346

!!!It works¡¡¡
Debian Lenny with fpc2.2.2-8 and lazarus 0.9.26-4 from Debian sid repositories.
I changed the ide language from Automatic to English and it build without problem.
Thank you very much,


Vincent Snijders

2009-01-10 21:13

manager   ~0024350

What is your 'automatic' language?

Vincent Snijders

2009-01-13 16:38

manager   ~0024421

I tried with Catalan.

The call in line +/- 3321 of lazarus\packager\packagesystem.pas
breaks the source code (ignore the encoding, I added some debugln and copied from a windows console).

Before beautifying
{ Aquest fitxer l'ha creat automàticament el Lazarus. No l'editeu!
  Aquesta font nom├®s s'utilitza per compilar i instal┬Àlar el paquet.

unit BllMath;


After beautifying
{ Aquest fitxer l'ha creat automàticament el Lazarus. No l'editeu!
  Aquesta font nom├®s s'utilitza per compilar i instal┬Àlar el paquet.

    +'unit BllMath;


The beautifier seems to think that the ' in the comment start a string constant can must be broken into multiple line, I think.

Vincent Snijders

2009-01-23 13:29

manager   ~0024663

As a workaround one can set the language to English.

Issue History

Date Modified Username Field Change
2008-11-21 12:02 Pere Casanovas New Issue
2008-11-21 12:02 Pere Casanovas File Added: sqldblaz.pas
2008-11-21 12:02 Pere Casanovas Widgetset => GTK
2008-11-23 10:23 Vincent Snijders LazTarget => 0.9.28
2008-11-23 10:23 Vincent Snijders Note Added: 0023503
2008-11-23 10:23 Vincent Snijders Status new => acknowledged
2008-11-23 10:23 Vincent Snijders Target Version => 0.9.28
2008-11-25 12:12 Pere Casanovas Note Added: 0023548
2009-01-09 18:57 Paul Ishenin Note Added: 0024322
2009-01-09 18:57 Paul Ishenin Status acknowledged => feedback
2009-01-10 17:08 Pere Casanovas Note Added: 0024346
2009-01-10 21:13 Vincent Snijders Note Added: 0024350
2009-01-13 16:38 Vincent Snijders Note Added: 0024421
2009-01-13 16:38 Vincent Snijders Assigned To => Mattias Gaertner
2009-01-13 16:38 Vincent Snijders Status feedback => assigned
2009-01-23 10:08 Vincent Snijders Target Version 0.9.28 =>
2009-01-23 10:10 Vincent Snijders Category - => IDE
2009-01-23 10:10 Vincent Snijders Summary Can't rebuild Lazarus => Can't rebuild Lazarus (Codetools' BeautifyStatement generate invalid source)
2009-01-23 13:29 Vincent Snijders Note Added: 0024663
2009-01-24 12:17 Mattias Gaertner Fixed in Revision => 18405
2009-01-24 12:17 Mattias Gaertner Status assigned => resolved
2009-01-24 12:17 Mattias Gaertner Resolution open => fixed
2009-03-20 10:52 Vincent Snijders Fixed in Version =>
2009-06-13 12:10 Marc Weustink Status resolved => closed