Sign in Join

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

Mailing lists / lazarus / 2012-03

Launching process from ServiceDaemon fails under Ubuntu x64 11.10+

6 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Andrew Brunner

Up until a few days ago I was using my service daemon app (X) to launch a console application (Y) worked flawlessly. The service daemon monitors for crashes and scale and can create did a trunk update to both FPC and Lazarus and App Y got a bunch of linker errors (see below) so I included interfaces unit and (Y) builds just fine.

If terminal execution with parameters (Y) enters the program loop :-) if executed from a Desktop App TProcess (Y) enters the program loop. :-) If executed (X) inside a Service Daemon TProcess (Y) zombies and never enters the program loop :-(

The service daemon is mission critical to my project and this is a pretty serious issue.

Errors when I try to build Process app without Interfaces unit :

Options changed, recompiling clean with -B
/usr/bin/ld: warning: link.res contains output sections; did you forget -T? /Developer/Lazarus/lcl/units/x86_64-linux/wsimglist.o: In function `REGISTERCUSTOMIMAGELIST':
/Developer/Lazarus/lcl//widgetset/wsimglist.pp:266: undefined reference to `WSRegisterCustomImageList'
/Developer/Lazarus/lcl/units/x86_64-linux/wsmenus.o: In function `REGISTERMENUITEM':
/Developer/Lazarus/lcl//widgetset/wsmenus.pp:201: undefined reference to `WSRegisterMenuItem'
/Developer/Lazarus/lcl/units/x86_64-linux/wsmenus.o: In function `REGISTERMENU':
/Developer/Lazarus/lcl//widgetset/wsmenus.pp:212: undefined reference to `WSRegisterMenu'
/Developer/Lazarus/lcl/units/x86_64-linux/wsmenus.o: In function `REGISTERMAINMENU':
/Developer/Lazarus/lcl//widgetset/wsmenus.pp:223: undefined reference to `WSRegisterMainMenu'
/Developer/Lazarus/lcl/units/x86_64-linux/wsmenus.o: In function `REGISTERPOPUPMENU':
/Developer/Lazarus/lcl//widgetset/wsmenus.pp:234: undefined reference to `WSRegisterPopupMenu'
/Developer/Lazarus/lcl/units/x86_64-linux/wscontrols.o: In function `REGISTERDRAGIMAGELIST':
/Developer/Lazarus/lcl//widgetset/wscontrols.pp:430: undefined reference to `WSRegisterDragImageList'
/Developer/Lazarus/lcl/units/x86_64-linux/wscontrols.o: In function `REGISTERLAZACCESSIBLEOBJECT':
/Developer/Lazarus/lcl//widgetset/wscontrols.pp:440: undefined reference to `WSRegisterLazAccessibleObject'
/Developer/Lazarus/lcl/units/x86_64-linux/wscontrols.o: In function `REGISTERCONTROL':
/Developer/Lazarus/lcl//widgetset/wscontrols.pp:450: undefined reference to `WSRegisterControl'
/Developer/Lazarus/lcl/units/x86_64-linux/wscontrols.o: In function `REGISTERWINCONTROL':
/Developer/Lazarus/lcl//widgetset/wscontrols.pp:460: undefined reference to `WSRegisterWinControl'
/Developer/Lazarus/lcl/units/x86_64-linux/wscontrols.o: In function `REGISTERGRAPHICCONTROL':
/Developer/Lazarus/lcl//widgetset/wscontrols.pp:470: undefined reference to `WSRegisterGraphicControl'
/Developer/Lazarus/lcl/units/x86_64-linux/wscontrols.o: In function `REGISTERCUSTOMCONTROL':
/Developer/Lazarus/lcl//widgetset/wscontrols.pp:481: undefined reference to `WSRegisterCustomControl'
/Developer/Lazarus/lcl/units/x86_64-linux/wsforms.o: In function `REGISTERSCROLLINGWINCONTROL':
/Developer/Lazarus/lcl//widgetset/wsforms.pp:269: undefined reference to `WSRegisterScrollingWinControl'
/Developer/Lazarus/lcl/units/x86_64-linux/wsforms.o: In function `REGISTERSCROLLBOX':
/Developer/Lazarus/lcl//widgetset/wsforms.pp:280: undefined reference to `WSRegisterScrollBox'
/Developer/Lazarus/lcl/units/x86_64-linux/wsforms.o: In function `REGISTERCUSTOMFRAME':
/Developer/Lazarus/lcl//widgetset/wsforms.pp:291: undefined reference to `WSRegisterCustomFrame'
/Developer/Lazarus/lcl/units/x86_64-linux/wsforms.o: In function `REGISTERCUSTOMFORM':
/Developer/Lazarus/lcl//widgetset/wsforms.pp:302: undefined reference to `WSRegisterCustomForm'
/Developer/Lazarus/lcl/units/x86_64-linux/wsforms.o: In function `REGISTERHINTWINDOW':
/Developer/Lazarus/lcl//widgetset/wsforms.pp:313: undefined reference to `WSRegisterHintWindow'
/Developer/Lazarus/lcl/units/x86_64-linux/wsstdctrls.o: In function `REGISTERCUSTOMSCROLLBAR':
/Developer/Lazarus/lcl//widgetset/wsstdctrls.pp:654: undefined reference to `WSRegisterCustomScrollBar'
/Developer/Lazarus/lcl/units/x86_64-linux/wsstdctrls.o: In function `REGISTERCUSTOMGROUPBOX':
/Developer/Lazarus/lcl//widgetset/wsstdctrls.pp:665: undefined reference to `WSRegisterCustomGroupBox'
/Developer/Lazarus/lcl/units/x86_64-linux/wsstdctrls.o: In function `REGISTERCUSTOMCOMBOBOX':
/Developer/Lazarus/lcl//widgetset/wsstdctrls.pp:676: undefined reference to `WSRegisterCustomComboBox'
/Developer/Lazarus/lcl/units/x86_64-linux/wsstdctrls.o: In function `REGISTERCUSTOMLISTBOX':
/Developer/Lazarus/lcl//widgetset/wsstdctrls.pp:687: undefined reference to `WSRegisterCustomListBox'
/Developer/Lazarus/lcl/units/x86_64-linux/wsstdctrls.o: In function `REGISTERCUSTOMEDIT':
/Developer/Lazarus/lcl//widgetset/wsstdctrls.pp:698: undefined reference to `WSRegisterCustomEdit'
/Developer/Lazarus/lcl/units/x86_64-linux/wsstdctrls.o: In function `REGISTERCUSTOMMEMO':
/Developer/Lazarus/lcl//widgetset/wsstdctrls.pp:709: undefined reference to `WSRegisterCustomMemo'
/Developer/Lazarus/lcl/units/x86_64-linux/wsstdctrls.o: In function `REGISTERBUTTONCONTROL':
/Developer/Lazarus/lcl//widgetset/wsstdctrls.pp:725: undefined reference to `WSRegisterButtonControl'
/Developer/Lazarus/lcl/units/x86_64-linux/wsstdctrls.o: In function `REGISTERCUSTOMBUTTON':
/Developer/Lazarus/lcl//widgetset/wsstdctrls.pp:739: undefined reference to `WSRegisterCustomButton'
/Developer/Lazarus/lcl/units/x86_64-linux/wsstdctrls.o: In function `REGISTERCUSTOMCHECKBOX':
/Developer/Lazarus/lcl//widgetset/wsstdctrls.pp:750: undefined reference to `WSRegisterCustomCheckBox'
/Developer/Lazarus/lcl/units/x86_64-linux/wsstdctrls.o: In function `REGISTERTOGGLEBOX':
/Developer/Lazarus/lcl//widgetset/wsstdctrls.pp:763: undefined reference to `WSRegisterToggleBox'
/Developer/Lazarus/lcl/units/x86_64-linux/wsstdctrls.o: In function `REGISTERRADIOBUTTON':
/Developer/Lazarus/lcl//widgetset/wsstdctrls.pp:774: undefined reference to `WSRegisterRadioButton'
/Developer/Lazarus/lcl/units/x86_64-linux/wsstdctrls.o: In function `REGISTERCUSTOMSTATICTEXT':
/Developer/Lazarus/lcl//widgetset/wsstdctrls.pp:787: undefined reference to `WSRegisterCustomStaticText'
/Developer/Lazarus/lcl/units/x86_64-linux/wsstdctrls.o: In function `REGISTERCUSTOMLABEL':
/Developer/Lazarus/lcl//widgetset/wsstdctrls.pp:798: undefined reference to `WSRegisterCustomLabel'
/Developer/Lazarus/lcl/units/x86_64-linux/wsbuttons.o: In function `REGISTERCUSTOMBITBTN':
/Developer/Lazarus/lcl//widgetset/wsbuttons.pp:113: undefined reference to `WSRegisterCustomBitBtn'
/Developer/Lazarus/lcl/units/x86_64-linux/wsbuttons.o: In function `REGISTERCUSTOMSPEEDBUTTON':
/Developer/Lazarus/lcl//widgetset/wsbuttons.pp:125: undefined reference to `WSRegisterCustomSpeedButton'
/Developer/Lazarus/lcl/units/x86_64-linux/wsextctrls.o: In function `REGISTERSHAPE':
/Developer/Lazarus/lcl//widgetset/wsextctrls.pp:228: undefined reference to `WSRegisterShape'
/Developer/Lazarus/lcl/units/x86_64-linux/wsextctrls.o: In function `REGISTERCUSTOMSPLITTER':
/Developer/Lazarus/lcl//widgetset/wsextctrls.pp:239: undefined reference to `WSRegisterCustomSplitter'
/Developer/Lazarus/lcl/units/x86_64-linux/wsextctrls.o: In function `REGISTERPAINTBOX':
/Developer/Lazarus/lcl//widgetset/wsextctrls.pp:250: undefined reference to `WSRegisterPaintBox'
/Developer/Lazarus/lcl/units/x86_64-linux/wsextctrls.o: In function `REGISTERCUSTOMIMAGE':
/Developer/Lazarus/lcl//widgetset/wsextctrls.pp:261: undefined reference to `WSRegisterCustomImage'
/Developer/Lazarus/lcl/units/x86_64-linux/wsextctrls.o: In function `REGISTERBEVEL':
/Developer/Lazarus/lcl//widgetset/wsextctrls.pp:272: undefined reference to `WSRegisterBevel'
/Developer/Lazarus/lcl/units/x86_64-linux/wsextctrls.o: In function `REGISTERCUSTOMRADIOGROUP':
/Developer/Lazarus/lcl//widgetset/wsextctrls.pp:283: undefined reference to `WSRegisterCustomRadioGroup'
/Developer/Lazarus/lcl/units/x86_64-linux/wsextctrls.o: In function `REGISTERCUSTOMCHECKGROUP':
/Developer/Lazarus/lcl//widgetset/wsextctrls.pp:294: undefined reference to `WSRegisterCustomCheckGroup'
/Developer/Lazarus/lcl/units/x86_64-linux/wsextctrls.o: In function `REGISTERCUSTOMLABELEDEDIT':
/Developer/Lazarus/lcl//widgetset/wsextctrls.pp:305: undefined reference to `WSRegisterCustomLabeledEdit'
/Developer/Lazarus/lcl/units/x86_64-linux/wsextctrls.o: In function `REGISTERCUSTOMPANEL':
/Developer/Lazarus/lcl//widgetset/wsextctrls.pp:316: undefined reference to `WSRegisterCustomPanel'
/Developer/Lazarus/lcl/units/x86_64-linux/wsextctrls.o: In function `REGISTERCUSTOMTRAYICON':
/Developer/Lazarus/lcl//widgetset/wsextctrls.pp:333: undefined reference to `WSRegisterCustomTrayIcon'
/Developer/Lazarus/lcl/units/x86_64-linux/wsdialogs.o: In function `REGISTERCOMMONDIALOG':
/Developer/Lazarus/lcl//widgetset/wsdialogs.pp:140: undefined reference to `WSRegisterCommonDialog'
/Developer/Lazarus/lcl/units/x86_64-linux/wsdialogs.o: In function `REGISTERFILEDIALOG':
/Developer/Lazarus/lcl//widgetset/wsdialogs.pp:151: undefined reference to `WSRegisterFileDialog'
/Developer/Lazarus/lcl/units/x86_64-linux/wsdialogs.o: In function `REGISTEROPENDIALOG':
/Developer/Lazarus/lcl//widgetset/wsdialogs.pp:162: undefined reference to `WSRegisterOpenDialog'
/Developer/Lazarus/lcl/units/x86_64-linux/wsdialogs.o: In function `REGISTERSAVEDIALOG':
/Developer/Lazarus/lcl//widgetset/wsdialogs.pp:173: undefined reference to `WSRegisterSaveDialog'
/Developer/Lazarus/lcl/units/x86_64-linux/wsdialogs.o: In function `REGISTERSELECTDIRECTORYDIALOG':
/Developer/Lazarus/lcl//widgetset/wsdialogs.pp:184: undefined reference to `WSRegisterSelectDirectoryDialog'
/Developer/Lazarus/lcl/units/x86_64-linux/wsdialogs.o: In function `REGISTERCOLORDIALOG':
/Developer/Lazarus/lcl//widgetset/wsdialogs.pp:195: undefined reference to `WSRegisterColorDialog'
/Developer/Lazarus/lcl/units/x86_64-linux/wsdialogs.o: In function `REGISTERCOLORBUTTON':
/Developer/Lazarus/lcl//widgetset/wsdialogs.pp:206: undefined reference to `WSRegisterColorButton'
/Developer/Lazarus/lcl/units/x86_64-linux/wsdialogs.o: In function `REGISTERFONTDIALOG':
/Developer/Lazarus/lcl//widgetset/wsdialogs.pp:217: undefined reference to `WSRegisterFontDialog'
auProcess.lpr(397,1) Error: Error while linking
auProcess.lpr(397,1) Fatal: There were 1 errors compiling module, stopping -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120306/c3286f1e/attachment-0001.html>

Reply by email

Unknown author
to Andrew Brunner
Andrew Brunner wrote 7 lines
Up until a few days ago I was using my service daemon app (X) to launch a console application (Y) worked flawlessly. The service daemon monitors for crashes and scale and can create instances at runtime. I did a trunk update to both FPC and Lazarus and App Y got a bunch of linker errors (see below) so I included interfaces unit and (Y) builds just fine.

You should not include this unit. That's an error.

Show quoted text 8 lines
if executed from a Desktop App TProcess (Y) enters the program loop. :-) If executed (X) inside a Service Daemon TProcess (Y) zombies and never enters the program loop :-( The service daemon is mission critical to my project and this is a pretty serious issue. Errors when I try to build Process app without Interfaces unit :

It means you have a LCL component somewhere in your app, that's what's causing this.

Michael.

Reply by email

Mattias Gaertner
to Unknown author
Show quoted text 25 lines
On Tue, 6 Mar 2012, Andrew Brunner wrote: > Up until a few days ago I was using my service daemon app (X) to launch a > console application (Y) worked flawlessly. The service daemon monitors for > crashes and scale and can create instances at runtime. > > I did a trunk update to both FPC and Lazarus and App Y got a bunch of > linker errors (see below) so I included interfaces unit and (Y) builds just > fine. You should not include this unit. That's an error. > if executed from a Desktop App TProcess (Y) enters the program loop. :-) > If executed (X) inside a Service Daemon TProcess (Y) zombies and never > enters the program loop :-( > > The service daemon is mission critical to my project and this is a pretty > serious issue. > > Errors when I try to build Process app without Interfaces unit : It means you have a LCL component somewhere in your app, that's what's causing this.

Yes.

The widgetset independent parts have been moved to a package of its own: LazUtils.
Open the project inspector and replace the dependency LCL with LazUtils. Do the same for any of your packages that works without gui.

Mattias

Reply by email

Andrew Brunner
to Mattias Gaertner
> You should not include this unit. That's an error.

Ok.

It means you have a LCL component somewhere in your app, that's what's causing this.

Ok. But everything was completely fine until the latest svn update. While there is no widget components created some obscure unit may tap into an LCL type or constant. Which most likely should have been removed during optimization.

Show quoted text 5 lines
The widgetset independent parts have been moved to a package of its own: LazUtils. Open the project inspector and replace the dependency LCL with LazUtils. Do the same for any of your packages that works without gui.

Ok, I just replaced LCL dependency with LazUtils and it compiled and works just like before! Thanks. I recommend that you make sure that when a new project is created it uses LazUtils as a dependency for console apps - otherwise other people may run into this problem and not understand why their console apps behave strangely.

Thanks guys!!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120307/a0acf77a/attachment.html>

Reply by email

Sven Barth
to Andrew Brunner
Andrew Brunner wrote 10 lines
The widgetset independent parts have been moved to a package of its own: LazUtils. Open the project inspector and replace the dependency LCL with LazUtils. Do the same for any of your packages that works without gui. Ok, I just replaced LCL dependency with LazUtils and it compiled and works just like before! Thanks. I recommend that you make sure that when a new project is created it uses LazUtils as a dependency for console apps - otherwise other people may run into this problem and not understand why their console apps behave strangely.

No, console applications don't need LazUtils. Dependencies should only be added when needed.

Regards,
Sven

Reply by email

Mattias Gaertner
to Andrew Brunner: Ok. Ok. But everything was completely fine until the latest svn update. While there is…

Andrew Brunner hat am 7. M?rz 2012 um 15:12
geschrieben:

Show quoted text 7 lines
> [...] Ok, I just replaced LCL dependency with LazUtils and it compiled and works just like before! Thanks. I recommend that you make sure that when a new project is created it uses LazUtils as a dependency for console apps - otherwise other people may run into this problem and not understand why their console apps behave strangely.

Strange.
I would have expected that you get a compilation error about some LCL unit can not be found.
The LCL only adds -dLCL and -dLCLwidgetset. And under OS X some linker options.
Maybe you use these defines somewhere?

When you create a console project, the LCL is not added. This was always so.

Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120307/679a001f/attachment.html>

Reply by email