Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2019-07

Running using lazbuild

8 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ryan Joseph

Can the “lazbuild” tool be used to run a project exactly like if I press the run button in Lazarus? I have project which runs in Lazarus but doing “lazbuild project.lpi” gives me errors suggesting it didn’t do exactly the same thing.

Regards,
Ryan Joseph

Reply by email

Juha Manninen
to Ryan Joseph
PM Ryan Joseph wrote
Can the “lazbuild” tool be used to run a project exactly like if I press the run button in Lazarus? I have project which runs in Lazarus but doing “lazbuild project.lpi” gives me errors suggesting it didn’t do exactly the same thing.

LazBuild does not run a project but it should build it the same way that Lazarus IDE does.
What kind of errors did you get?

Juha

Reply by email

Ryan Joseph
to Juha Manninen
Show quoted text 10 lines
On Aug 11, 2019, at 11:48 AM, Juha Manninen via lazarus wrote: On Wed, Jul 24, 2019 at 7:33 PM Ryan Joseph via lazarus wrote: > Can the “lazbuild” tool be used to run a project exactly like if I press the run button in Lazarus? > I have project which runs in Lazarus but doing “lazbuild project.lpi” gives me errors suggesting it didn’t do exactly the same thing. LazBuild does not run a project but it should build it the same way that Lazarus IDE does. What kind of errors did you get?

Thanks for replying. Here’s the output I get. Pressing build in Lazarus doesn’t give this error. I think the wrong widget set is being used but I shouldn’t need to setting anything because all the information in the project is already set in the project file I thought.

You can test with the git project: https://github.com/neurolabusc/MRIcroGL

========================

Ryans-MacBook-Pro-2:MRIcroGL12 ryanjoseph$ lazbuild MRIcroGL.lpr Hint: (lazarus) Last compile was incomplete for LCL 2.1 State file="/Users/ryanjoseph/Desktop/laz_tests/lazarus/lcl/units/x86_64-darwin/carbon/LCL.compiled" Hint: (lazarus) Missing state file of LazOpenGLContext 0.0.1: /Users/ryanjoseph/Desktop/laz_tests/lazarus/components/opengl/lib/x86_64-darwin/carbon/LazOpenGLContext.compiled Hint: (lazarus) Missing state file of python4lazarus_package 1.0: /Users/ryanjoseph/Desktop/laz_tests/Python-for-Lazarus/python4lazarus/lib/x86_64-darwin/python4lazarus_package.compiled Hint: (11030) Start of reading config file /etc/fpc.cfg Hint: (11031) End of reading config file /etc/fpc.cfg Free Pascal Compiler version 3.0.4 [2018/09/30] for x86_64 Copyright (c) 1993-2017 by Florian Klaempfl and others (1002) Target OS: Darwin for x86_64
(3104) Compiling lcl.pas
(3104) Compiling ./carbon/alllclintfunits.pas
(3104) Compiling ./carbon/carbonbars.pp
/Users/ryanjoseph/Desktop/laz_tests/lazarus/lcl/interfaces/./carbon/carbonbars.pp(16,2) Error: (2023) User defined: only cpu i386 is supported (3104) Compiling ./carbon/carbonprivate.pp
(3104) Compiling ./carbon/carbondef.pp
/Users/ryanjoseph/Desktop/laz_tests/lazarus/lcl/interfaces/./carbon/carbondef.pp(187,1) Fatal: (10026) There were 1 errors compiling module, stopping Fatal: (1018) Compilation aborted
Error: /usr/local/bin/ppcx64 returned an error exitcode Error: (lazarus) Compile package LCL 2.1: stopped with exit code 1 Error: (lazarus) [TLazPackageGraph.CompileRequiredPackages] "Exit code 1" Error: (lazbuild) Project dependencies of /Users/ryanjoseph/Desktop/Work/MRIcroGL12/MRIcroGL.lpi Ryans-MacBook-Pro-2:MRIcroGL12 ryanjoseph$

Regards,
Ryan Joseph

Reply by email

Martin Frb
to Ryan Joseph
Ryan Joseph wrote 13 lines
Hint: (lazarus) Missing state file of python4lazarus_package 1.0: /Users/ryanjoseph/Desktop/laz_tests/Python-for-Lazarus/python4lazarus/lib/x86_64-darwin/python4lazarus_package.compiled Hint: (11030) Start of reading config file /etc/fpc.cfg Hint: (11031) End of reading config file /etc/fpc.cfg Free Pascal Compiler version 3.0.4 [2018/09/30] for x86_64 Copyright (c) 1993-2017 by Florian Klaempfl and others (1002) Target OS: Darwin for x86_64 (3104) Compiling lcl.pas (3104) Compiling ./carbon/alllclintfunits.pas (3104) Compiling ./carbon/carbonbars.pp /Users/ryanjoseph/Desktop/laz_tests/lazarus/lcl/interfaces/./carbon/carbonbars.pp(16,2) Error: (2023) User defined: only cpu i386 is supported

Looks like it did not pick up the widgetset. But it did pick up cpu=64bit.

So it attempts carbon for 64 bit, which gives the error.

Reply by email

Ryan Joseph
to Martin Frb
Show quoted text 5 lines
On Aug 11, 2019, at 2:09 PM, Martin Frb via lazarus wrote: Looks like it did not pick up the widgetset. But it did pick up cpu=64bit. So it attempts carbon for 64 bit, which gives the error.

Is this a lazbuild bug that could be fixed? I wanted to integrate lazbuild into my editor but this is a deal breaker for me.

Regards,
Ryan Joseph

Reply by email

Mattias Gaertner
to Ryan Joseph
Show quoted text 10 lines
> On Aug 11, 2019, at 2:09 PM, Martin Frb via lazarus > wrote: > > Looks like it did not pick up the widgetset. But it did pick up > cpu=64bit. > > So it attempts carbon for 64 bit, which gives the error. Is this a lazbuild bug that could be fixed? I wanted to integrate lazbuild into my editor but this is a deal breaker for me.

Try building with
lazbuild --widgetset=cocoa

Mattias

Reply by email

Ryan Joseph
to Mattias Gaertner
On Aug 11, 2019, at 2:40 PM, Mattias Gaertner via lazarus wrote: Try building with lazbuild --widgetset=cocoa

Great, that worked. Why didn’t lazbuild do this automatically? As I said I wanted to integrate into my editor but if I need to add extra flags that greatly complicates things for me.

Regards,
Ryan Joseph

Reply by email

Ryan Joseph
to Ryan Joseph
On Aug 11, 2019, at 2:44 PM, Ryan Joseph wrote: Great, that worked. Why didn’t lazbuild do this automatically? As I said I wanted to integrate into my editor but if I need to add extra flags that greatly complicates things for me.

Btw, here is the widget set option in the .lpi file. Lazbuild doesn’t seem to respect it for some reason though. I’m happy to file a bug report if need be.

<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
<SharedMatrixOptions Count="1">
<Item1 ID="111936818895" Type="IDEMacro" MacroName="LCLWidgetType" Value="cocoa"/> </SharedMatrixOptions>
</BuildModes>

Regards,
Ryan Joseph

Reply by email