Recent

Author Topic: TProcess  (Read 757 times)

bagdale

  • New member
  • *
  • Posts: 8
TProcess
« on: July 17, 2022, 07:29:00 pm »
Lazarus IDE 2.2.2 + FPC 3.2.2 + Opensuse Tumbleweed and/or Mint 20.3

When I try

procedure TForm1.Button1Click(Sender: TObject);
var
  p : TProcess;
begin
  p := TProcess.Create(nil); //this is line main.pas(38,1) as referred to below
  p.Executable:= 'kate';
  p.Execute;
end;

I get ...

process.lpr(24,1) Warning: "crtbeginS.o" not found, this will probably cause a linking failure
process.lpr(24,1) Warning: "crtendS.o" not found, this will probably cause a linking failure
Warning: linker: /usr/bin/ld: /home/Lazarus/TProcess/lib/x86_64-linux/process.o:(.data.n_INITFINAL+0x2e0): undefined reference to `INIT$_$PROCESS'
Warning: linker: /usr/bin/ld: /home/Lazarus/TProcess/lib/x86_64-linux/process.o:(.data.n_INITFINAL+0x2e8): undefined reference to `FINALIZE$_$PROCESS'
Warning: linker: /usr/bin/ld: /home/Lazarus/TProcess/lib/x86_64-linux/process.o:(.data.n_FPC_RESOURCESTRINGTABLES+0xc8): undefined reference to `RESSTR_$PROCESS_$$_START$indirect'
Warning: linker: /usr/bin/ld: /home/Lazarus/TProcess/lib/x86_64-linux/process.o:(.data.n_FPC_RESOURCESTRINGTABLES+0xd0): undefined reference to `RESSTR_$PROCESS_$$_END$indirect'
Warning: linker: /usr/bin/ld: /home/Lazarus/TProcess/lib/x86_64-linux/main.o: in function `BUTTON1CLICK':
Error: /home/Lazarus/TProcess//main.pas:38: undefined reference to `VMT_$PROCESS_$$_TPROCESS'
main.pas(38,1) Error: undefined reference to `VMT_$PROCESS_$$_TPROCESS'
Warning: linker: /usr/bin/ld: /usr/lib64/lazarus/components/lazutils/lib/x86_64-linux/utf8process.o: in function `RUNCMDFROMPATH':
Error: /home/abuild/rpmbuild/BUILD/lazarus/components/lazutils//utf8process.pp:184: undefined reference to `PROCESS$_$TPROCESS_$__$$_SETCOMMANDLINE$ANSISTRING'
utf8process.pp(186,1) Error: undefined reference to `PROCESS$_$TPROCESS_$__$$_SETCOMMANDLINE$ANSISTRING'
Warning: linker: /usr/bin/ld: /usr/lib64/lazarus/components/lazutils/lib/x86_64-linux/utf8process.o:(.data.n_VMT_$UTF8PROCESS_$$_TPROCESSUTF8+0x10): undefined reference to `VMT_$PROCESS_$$_TPROCESS$indirect'
Warning: linker: /usr/bin/ld: /usr/lib64/lazarus/components/lazutils/lib/x86_64-linux/utf8process.o:(.data.n_VMT_$UTF8PROCESS_$$_TPROCESSUTF8+0x60): undefined reference to `PROCESS$_$TPROCESS_$__$$_DESTROY'
Warning: linker: /usr/bin/ld: /usr/lib64/lazarus/components/lazutils/lib/x86_64-linux/utf8process.o:(.data.n_VMT_$UTF8PROCESS_$$_TPROCESSUTF8+0x108): undefined reference to `PROCESS$_$TPROCESS_$__$$_LOADED'
Warning: linker: /usr/bin/ld: /usr/lib64/lazarus/components/lazutils/lib/x86_64-linux/utf8process.o:(.data.n_VMT_$UTF8PROCESS_$$_TPROCESSUTF8+0x188): undefined reference to `PROCESS$_$TPROCESS_$__$$_CREATE$TCOMPONENT$$TPROCESS'
Warning: linker: /usr/bin/ld: /usr/lib64/lazarus/components/lazutils/lib/x86_64-linux/utf8process.o:(.data.n_VMT_$UTF8PROCESS_$$_TPROCESSUTF8+0x1b0): undefined reference to `PROCESS$_$TPROCESS_$__$$_CLOSEPROCESSHANDLES'
Warning: linker: /usr/bin/ld: /usr/lib64/lazarus/components/lazutils/lib/x86_64-linux/utf8process.o:(.data.n_VMT_$UTF8PROCESS_$$_TPROCESSUTF8+0x1b8): undefined reference to `PROCESS$_$TPROCESS_$__$$_CREATESTREAMS$LONGINT$LONGINT$LONGINT'
Warning: linker: /usr/bin/ld: /usr/lib64/lazarus/components/lazutils/lib/x86_64-linux/utf8process.o:(.data.n_VMT_$UTF8PROCESS_$$_TPROCESSUTF8+0x1c0): undefined reference to `PROCESS$_$TPROCESS_$__$$_EXECUTE'
Warning: linker: /usr/bin/ld: /usr/lib64/lazarus/components/lazutils/lib/x86_64-linux/utf8process.o:(.data.n_VMT_$UTF8PROCESS_$$_TPROCESSUTF8+0x1c8): undefined reference to `PROCESS$_$TPROCESS_$__$$_CLOSEINPUT'
Warning: linker: /usr/bin/ld: /usr/lib64/lazarus/components/lazutils/lib/x86_64-linux/utf8process.o:(.data.n_VMT_$UTF8PROCESS_$$_TPROCESSUTF8+0x1d0): undefined reference to `PROCESS$_$TPROCESS_$__$$_CLOSEOUTPUT'
Warning: linker: /usr/bin/ld: /usr/lib64/lazarus/components/lazutils/lib/x86_64-linux/utf8process.o:(.data.n_VMT_$UTF8PROCESS_$$_TPROCESSUTF8+0x1d8): undefined reference to `PROCESS$_$TPROCESS_$__$$_CLOSESTDERR'
Warning: linker: /usr/bin/ld: /usr/lib64/lazarus/components/lazutils/lib/x86_64-linux/utf8process.o:(.data.n_VMT_$UTF8PROCESS_$$_TPROCESSUTF8+0x1e0): undefined reference to `PROCESS$_$TPROCESS_$__$$_RESUME$$LONGINT'
Warning: linker: /usr/bin/ld: /usr/lib64/lazarus/components/lazutils/lib/x86_64-linux/utf8process.o:(.data.n_VMT_$UTF8PROCESS_$$_TPROCESSUTF8+0x1e8): undefined reference to `PROCESS$_$TPROCESS_$__$$_SUSPEND$$LONGINT'
Warning: linker: /usr/bin/ld: /usr/lib64/lazarus/components/lazutils/lib/x86_64-linux/utf8process.o:(.data.n_VMT_$UTF8PROCESS_$$_TPROCESSUTF8+0x1f0): undefined reference to `PROCESS$_$TPROCESS_$__$$_TERMINATE$LONGINT$$BOOLEAN'
Warning: linker: /usr/bin/ld: /usr/lib64/lazarus/components/lazutils/lib/x86_64-linux/utf8process.o:(.data.n_VMT_$UTF8PROCESS_$$_TPROCESSUTF8+0x1f8): undefined reference to `PROCESS$_$TPROCESS_$__$$_READINPUTSTREAM$crc0BAE91C9'
Warning: linker: /usr/bin/ld: /usr/lib64/lazarus/components/lazutils/lib/x86_64-linux/utf8process.o:(.data.n_VMT_$UTF8PROCESS_$$_TPROCESSUTF8+0x200): undefined reference to `PROCESS$_$TPROCESS_$__$$_READINPUTSTREAM$TINPUTPIPESTREAM$TSTREAM$LONGINT$$BOOLEAN'
Warning: linker: /usr/bin/ld: /usr/lib64/lazarus/components/lazutils/lib/x86_64-linux/utf8process.o:(.data.n_VMT_$UTF8PROCESS_$$_TPROCESSUTF8+0x208): undefined reference to `PROCESS$_$TPROCESS_$__$$_RUNCOMMANDLOOP$ANSISTRING$ANSISTRING$LONGINT$$LONGINT'
Warning: linker: /usr/bin/ld: /usr/lib64/lazarus/components/lazutils/lib/x86_64-linux/utf8process.o:(.data.n_RTTI_$UTF8PROCESS_$$_TPROCESSUTF8+0x16): undefined reference to `RTTI_$PROCESS_$$_TPROCESS$indirect'
process.lpr(24,1) Error: Error while linking

Does anyone know where I am going wrong? Same result with RunCommand and ExecuteProcess

Thanks

Julian

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 10399
  • FPC developer.
Re: TProcess
« Reply #1 on: July 17, 2022, 10:07:26 pm »
The first two warnings (crtbeginS/crtendS.o) might indicate a system not set up for development (add build-essentials, or some package like that).

The others are probably due to a mismatch between FPC and Lazarus build.

bagdale

  • New member
  • *
  • Posts: 8
Re: TProcess
« Reply #2 on: July 17, 2022, 10:42:26 pm »
Thanks Marcov

Mint install for FPC and Lazarus taken from Sourceforge two days ago and Tumbleweed updated from main repository Friday. Is there something central that needs tweaking do you think?

Julian

bagdale

  • New member
  • *
  • Posts: 8
Re: TProcess
« Reply #3 on: July 17, 2022, 10:46:20 pm »
Just to add I will try a full delete and reinstall of FPC and Lazarus and see whether that helps.

Julian

bagdale

  • New member
  • *
  • Posts: 8
Re: TProcess
« Reply #4 on: July 17, 2022, 11:05:10 pm »
Tumbleweed reinstalled versions are FPC 3.2.2-3.4-x86_64 and Lazarus 2.2.2-1.2x86_64

No improvement unfortunately

Julian

winni

  • Hero Member
  • *****
  • Posts: 3165
Re: TProcess
« Reply #5 on: July 18, 2022, 12:44:11 am »
Hi!

I work since years with Tumbleweed and the packages from the distro.
It works fine with no poblems - which is seldom with distro packages for fpc/Lazarus. The trouble with the Debian packages caused a lot of discussion.

The  crtbegin/ crtend trouble was discussed here:

https://forum.lazarus.freepascal.org/index.php/topic,56114.msg417150.html#msg417150



Winni

bagdale

  • New member
  • *
  • Posts: 8
Re: TProcess
« Reply #6 on: July 21, 2022, 10:37:48 pm »
Not working on new Windows 11 install from Sourceforge either. I will await the next version to see whether fixed then. I do not how you escalate these things but all three are not solely down to my incompetence.

Julian

bagdale

  • New member
  • *
  • Posts: 8
Re: TProcess
« Reply #7 on: July 31, 2022, 11:36:02 am »
I was wrong. Numpty pre-school error. Don't call your application "process"

 

TinyPortal © 2005-2018