Recent

Author Topic: Fatal cannot find SysUtil used by Project1[solved]  (Read 3037 times)

daivid

  • Newbie
  • Posts: 5
Fatal cannot find SysUtil used by Project1[solved]
« on: October 26, 2016, 11:02:43 pm »
I have just switched to a new version of Lazarus and my current project compiles without a problem but when I added a unit I got the above error.  Older units use the SysUtil unit without creating problems. The version of freepascal is 3.0.  I assume that I need to set a path somewhere but what?

I am using Lazarus under Fedora Linux.

When I run Lazarus from a terminal this is the output when I try to compile:


(lazarus:19802): Gtk-CRITICAL **: IA__gtk_window_set_focus: assertion 'gtk_widget_get_can_focus (focus)' failed
Hint: (lazarus) Project needs building: SrcFile outdated Project
[TCompiler.Compile] CmdLine="/usr/bin/fpc  -MObjFPC -Scghi -Cg -O1 -g -gl -l -vewnhibq -Fi/home/osujetiti/tmp/lib/x86_64-linux -Fl/opt/gnome/lib -Fu/usr/lib64/lazarus/lcl/units/x86_64-linux/gtk2 -Fu/usr/lib64/lazarus/lcl/units/x86_64-linux -Fu/usr/lib64/lazarus/components/lazutils/lib/x86_64-linux -Fu/usr/lib64/lazarus/packager/units/x86_64-linux -FU/home/osujetiti/tmp/lib/x86_64-linux/ -FE/home/osujetiti/tmp/ -dLCL -dLCLgtk2 /home/osujetiti/tmp/project1.lpr"
Info: (lazarus) Execute Title="Compile Project, Target: /home/osujetiti/tmp/project1"
Info: (lazarus) Working Directory="/home/osujetiti/tmp/"
Info: (lazarus) Executable="/usr/bin/fpc"
Info: (lazarus) Param[0]="-MObjFPC"
Info: (lazarus) Param[1]="-Scghi"
Info: (lazarus) Param[2]="-Cg"
Info: (lazarus) Param[3]="-O1"
Info: (lazarus) Param[4]="-g"
Info: (lazarus) Param[5]="-gl"
Info: (lazarus) Param[6]="-l"
Info: (lazarus) Param[7]="-vewnhibq"
Info: (lazarus) Param[8]="-Fi/home/osujetiti/tmp/lib/x86_64-linux"
Info: (lazarus) Param[9]="-Fl/opt/gnome/lib"
Info: (lazarus) Param[10]="-Fu/usr/lib64/lazarus/lcl/units/x86_64-linux/gtk2"
Info: (lazarus) Param[11]="-Fu/usr/lib64/lazarus/lcl/units/x86_64-linux"
Info: (lazarus) Param[12]="-Fu/usr/lib64/lazarus/components/lazutils/lib/x86_64-linux"
Info: (lazarus) Param[13]="-Fu/usr/lib64/lazarus/packager/units/x86_64-linux"
Info: (lazarus) Param[14]="-FU/home/osujetiti/tmp/lib/x86_64-linux/"
Info: (lazarus) Param[15]="-FE/home/osujetiti/tmp/"
Info: (lazarus) Param[16]="-dLCL"
Info: (lazarus) Param[17]="-dLCLgtk2"
Info: (lazarus) Param[18]="/home/osujetiti/tmp/project1.lpr"
NOTE: Window with stalled focus found!, faking focus-out event
NOTE: Window with stalled focus found!, faking focus-out event
[TCompiler.Compile] end
TMainIDE.DoBuildProject compiler time in s: 3,66300002206117
TMainIDE.DoBuildProject Compile failed

« Last Edit: October 27, 2016, 12:42:02 pm by daivid »

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Fatal cannot find SysUtil used by Project1
« Reply #1 on: October 26, 2016, 11:17:01 pm »
From the error message it seems more likely that you try to set focus on one of your controls before its containing form has become active.
Or perhaps the offending control's parent has not been set when you try to set the focus to it.

daivid

  • Newbie
  • Posts: 5
Re: Fatal cannot find SysUtil used by Project1
« Reply #2 on: October 26, 2016, 11:43:27 pm »
After failing to get the new unit to run I tried starting a new project from scratch which had no controls at all.  It I include SysUtil in the uses line it fails to compile.  If I remove SysUtil it compiles.

(It was the command line output from the new trial project that I posted above - I should have made that clear - sorry)

Thanks for the quick reply but I still don't understand the problem to see a way to a solution.

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Fatal cannot find SysUtil used by Project1
« Reply #3 on: October 27, 2016, 01:58:32 am »
Do you mean the SysUtils unit (it is plural, with an 's' at the end)?
Anyway if an empty project does not compile with a uses clause containing only valid RTL units, then something is wrong with your installation.
You may need to uninstall and start over.
"...fails to compile" - do you see an error message?

daivid

  • Newbie
  • Posts: 5
Re: Fatal cannot find SysUtil used by Project1
« Reply #4 on: October 27, 2016, 12:41:12 pm »
The problem was the missing s.   :-[
I must have made a mistake when I copied and pasted.

When the old units still complied but the new one didn't it should have occurred to me to check to see whether they were really the same.

Thank you very much for sorting out my problem.

 

TinyPortal © 2005-2018