View Issue Details

IDProjectCategoryView StatusLast Update
0021571LazarusIDEpublic2012-03-27 10:08
ReporterGennadiy Assigned ToMattias Gaertner  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Platformwin64OSWindows 
Product Version0.9.31 (SVN) 
Summary0021571: Lazbuild syntax error in compileroptions.pp
DescriptionC:/Dev/FPC/2.7.1/bin/x86_64-win64/ppcx64.exe -gl -dlclnogui -Fu../lcl/units/x86_64-win64 -Fu../lcl/units/x86_64-win64/nogui -Fu../components/codetools/units/x86_64-win64 -Fu../components/lazutils/lib/x86_64-win64 -Fu../components/synedit/units/x86_64-win64/nogui -Fu../components/lazcontrols/lib/x86_64-win64/nogui -Fu../components/custom -Fu../ideintf/units/x86_64-win64/nogui -Fu../designer -Fu../debugger -Fu../debugger/frames -Fu../converter -Fu../packager -Fu../packager/frames -Fu../packager/units/x86_64-win64 -Fu../units/x86_64-win64/nogui -Fuframes -Fu. -Fiinclude -Fiinclude/win64 -Fi../images -FE.. -FU../units/x86_64-win64/nogui -dx86_64 lazbuild.lpr
compileroptions.pp(2233,14) Error: Illegal expression
compileroptions.pp(2233,15) Error: Illegal expression
compileroptions.pp(2233,15) Fatal: Syntax error, ";" expected but "const char" found
Fatal: Compilation aborted
make[2]: *** [lazbuild.exe] Error 1
make[2]: Leaving directory `C:/Dev/Lazarus/Sources/trunk/ide'
make[1]: *** [lazbuilder] Error 2
make[1]: Leaving directory `C:/Dev/Lazarus/Sources/trunk/ide'
make: *** [lazbuild] Error 2
Steps To Reproducemake distclean
make all
Additional InformationIt complains to the changes introduced by svn revs 36314 - 36317
TagsNo tags attached.
Fixed in Revision36376
LazTarget-
WidgetsetWin32/Win64
Attached Files

Relationships

related to 0021578 closedMattias Gaertner Patches [Patch] Microsoft SQL Server and Sybase ASE connectors 
related to 0021588 resolvedJuha Manninen Lazarus Error when trying to install packages 

Activities

Juha Manninen

2012-03-26 19:58

developer   ~0058074

Please test with latest trunk version. It compiles well here.

Gennadiy

2012-03-26 20:03

reporter   ~0058075

Just tried with rev 36347, same error.
May it be caused by the using latest 2.7.1 trunk fpc ?

Juha Manninen

2012-03-26 20:56

developer   ~0058077

The message :
  compileroptions.pp(2233,15) Fatal: Syntax error, ";" expected but "const char" found
does not make sense. These are the lines 2230 - 2235 of compileroptions.pp:

  if CurCustomOptions<>'' then
  begin
    if Result<>'' then
      Result+=' ';
    Result+=CurCustomOptions;
  end;


There is no "const char" anywhere near those lines.
You must have local changes in that file. Please get a clean copy of the SVN.

Mattias Gaertner

2012-03-26 21:53

manager   ~0058083

lazbuild compiles with fpc 2.7.1 from trunk 20636.

Gennadiy

2012-03-27 07:15

reporter   ~0058093

It actually makes sense and here's why. I did not make any changes to any of fpc/lazarus trunks. I also tested this on my friend's machine with same results. If that helps, Lazarus svn rev 36126 compiles well on both our machines.
Here now, I took the latest fpc trunk (svn rev 20636) and ran it on the latest lazarus trunk (svn rev 36366) and got the same error again!

When I commented out these lines in compileroptions.pp it complained about lines 457 in lazbuild.lpr . The specifics of both snippets of code are their use of "C style operators" namely "+=" -- for some reason fpc does not expect them there. When I specified -Sc to enable them, everything compiled well.

I don't know if there's any compiler directive concerning C style operators or it is that makefile may be amended. Are they assumed to be enabled by default?

Gennadiy

2012-03-27 07:33

reporter   ~0058094

As a temporary workaround, I changed ide\Makefile.fpc as follows:

Index: Makefile.fpc
===================================================================
--- Makefile.fpc (revision 36366)
+++ Makefile.fpc (working copy)
@@ -14,7 +14,7 @@
 programs=lazarus startlazarus lazbuild
 
 [compiler]
-options=-gl -dlcl$(LCL_PLATFORM)
+options=-Sc -gl -dlcl$(LCL_PLATFORM)
 unittargetdir=../units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
 unitdir=../lcl/units/$(CPU_TARGET)-$(OS_TARGET) \
         ../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) \

This made everything to compile well.

Juha Manninen

2012-03-27 07:44

developer   ~0058095

> When I commented out these lines in compileroptions.pp ...

Which lines? Did you have "const char" there? It means your sources are corrupted somehow.
lazbuild.lpr has C style operators but it compiles fine for everybody else.
Only you and your friend are having this problem.
Please try getting a clean copy of everything.

Gennadiy

2012-03-27 07:50

reporter   ~0058096

Last edited: 2012-03-27 08:05

> Which lines?

These lines:

  if CurCustomOptions<>'' then
  begin
// if Result<>'' then
// Result+=' ';
// Result+=CurCustomOptions;
  end;

This way it works. "Const char" is referring to the "+" symbol after "Result", not the explicit literal declaration of "const char".

And I DID GET CLEAN copy of everything, I don't know how it can ever be cleaner. I'm no newbie to the subversion.

My question is -- where in the Lazbuild compilation process it is specified that FPC enables C style operators? I want to check what goes wrong on our machines in this place.

Juha Manninen

2012-03-27 09:27

developer   ~0058101

Ok, it is a FPC config issue then, indeed. I don't know the details of it unfortunately.

Gennadiy

2012-03-27 09:48

reporter   ~0058102

Last edited: 2012-03-27 10:06

For now, I solved this issue by locally stuffing "-Sc" in my fpc.cfg
Nonetheless, this bug is legitimate in the sense that introducing C-style operators in Lazarus since r36126 does rely on implicit defaults, which may not be the case.
I humbly request modifying makefile (as the patch above suggests) to make building process concrete.

upd. Thank you, mattias :)

Issue History

Date Modified Username Field Change
2012-03-26 19:08 Gennadiy New Issue
2012-03-26 19:08 Gennadiy Widgetset => Win32/Win64
2012-03-26 19:58 Juha Manninen LazTarget => -
2012-03-26 19:58 Juha Manninen Note Added: 0058074
2012-03-26 19:58 Juha Manninen Status new => feedback
2012-03-26 20:03 Gennadiy Note Added: 0058075
2012-03-26 20:56 Juha Manninen Note Added: 0058077
2012-03-26 21:53 Mattias Gaertner Note Added: 0058083
2012-03-27 07:15 Gennadiy Note Added: 0058093
2012-03-27 07:33 Gennadiy Note Added: 0058094
2012-03-27 07:44 Juha Manninen Note Added: 0058095
2012-03-27 07:50 Gennadiy Note Added: 0058096
2012-03-27 08:02 Gennadiy Note Edited: 0058096
2012-03-27 08:02 Gennadiy Note Edited: 0058096
2012-03-27 08:05 Gennadiy Note Edited: 0058096
2012-03-27 09:27 Juha Manninen Note Added: 0058101
2012-03-27 09:48 Gennadiy Note Added: 0058102
2012-03-27 10:06 Gennadiy Note Edited: 0058102
2012-03-27 10:08 Mattias Gaertner Fixed in Revision => 36376
2012-03-27 10:08 Mattias Gaertner Assigned To => Mattias Gaertner
2012-03-27 10:08 Mattias Gaertner Status feedback => resolved
2012-03-27 10:08 Mattias Gaertner Resolution open => fixed
2012-03-28 17:30 Juha Manninen Relationship added related to 0021578
2012-04-05 23:07 Juha Manninen Relationship added related to 0021588