Unable to build an applicationwith Lazarus in Ubuntu 13.04 lazarus / 1-Linux ---------------------------------------------------------------------- jblain · 2013-08-14 19:40 I have installed Lazarus in Ubuntu 13.04 If I create a command line application it compiles and works perfectly well If I create a new application and try to build it, it fails with the following message : Compiling resource lib/x86_64-linux/project1.or project1.lpr(20,1) Error: Error while compiling resources. Compile with -vd for more details. Check for duplicates. project1.lpr(20,1) Fatal: There were 1 errors compiling module, stopping There seems to be some sort of problem compiling resources ? I get the same thing on all of my old projects that compiled fine on a previous machine. On this Ubuntu machine they all fail in the same way ? Any suggestions ? ---------------------------------------------------------------------- Leledumbo · 2013-08-15 13:33 Where do you save the project (full path)? ---------------------------------------------------------------------- BigChimp · 2013-08-15 13:48 If you are using FPC/Windows-style resources (as opposed to .LRS lazarus resources), please make sure that you have windres installed. Apparently the FPC packagers do not want to include a reference to that package in the installer (either the required or the recommended list). http://wiki.lazarus.freepascal.org/Lazarus_Resources Don't know if that fixes the problem though. ---------------------------------------------------------------------- jblain · 2013-08-16 00:32 Leledumbo I store the project in the following path ~/Development/Lazarus/projects/AScanToNK3Laz/ ---------------------------------------------------------------------- jblain · 2013-08-16 00:42 BigChimp The resources are in a binairy .res file. How would I tell lazarus to use Lazarus Style resources ? I followed the instructions in your link On Linux/OSX, you might need to make sure you have the windres resource compiler, which is provided by the mingw32 tools. E.g. on Debian you could run: aptitude install mingw32-binutils # this installs e.g. /usr/bin/i586-mingw32msvc-windres # but FPC expects just windres, so: ln -s /usr/bin/i586-mingw32msvc-windres /usr/bin/windres # alternatively (and probably more "official") use -FCi586-mingw32msvc-windres in your calls to fpc or # add -FCi586-mingw32msvc-windres to your fpc.cfg But it did not change anything. I still have the exact same error message ??!! ---------------------------------------------------------------------- taazz · 2013-08-16 00:47 i had the same problem on windows with a binary resource it seems that one of the resources was named 1 and I couldn't located or change its name it kept failing I had to break the resources in individual files and build an .rc file that was compiled as needed in order to overcome the problem. ---------------------------------------------------------------------- jblain · 2013-08-16 00:53 In my case it never works on any projects. Even those which I could compile on my old PC. Whatever i do I cannot build a single working project... ---------------------------------------------------------------------- Rails · 2013-08-16 02:36 How did you install Lazarus? Debs from an Ubuntu repository? Debs from Lazarus via sourceforg? Or some other means? Personally, I have had a lot of problems getting any of the Lazarus Debs working properly on my Debian systems. I get the best results by installing FPC from the Debian repository, but I install Lazarus by way of a Lazarus built RPM package, instead of a Deb. I use Alien to install the RPM. It's available for both Debian and Ubuntu.Might be something to look into. ---------------------------------------------------------------------- Leledumbo · 2013-08-16 06:31 Could you post the .lpr content? ---------------------------------------------------------------------- jblain · 2013-08-16 13:58 Ok, So here is all the info OS Linux Ubuntu 13.04 64 bit FPC version 2.7.1 installed from SVN trunk source Lazarus version 1.1 installed from SVN trunk source I had done the same thing on a Ubuntu 10.04 and everything worked so it is not intrisic to the FPC or Lazarus trunk code Attached are an example of a super simple project that fails in the same way as all other attemps. Here is what the command line displays when I try to build : jblain@jblain-M11x:~$ /home/jblain/share/Lazarus-FPC/LazarusSrc/trunk bash: /home/jblain/share/Lazarus-FPC/LazarusSrc/trunk: No such file or directory jblain@jblain-M11x:~$ UBUNTU_MENUPROXY= /home/jblain/InstalledFromSource/lazarus/trunk/lazarus TMainIDE.ParseCmdLineOptions:   PrimaryConfigPath="/home/jblain/.lazarus"   SecondaryConfigPath="/etc/lazarus" TMainIDEBase.BeginCodeTool no source editor TProject.DoLoadStateFile Statefile not found: /home/jblain/Development /Lazarus/projects/bimbo/lib/x86_64-linux/project1.compiled TBuildManager.CheckIfPackageNeedsCompilation  No state file for Project TCompiler.Compile WorkingDir="/home/jblain/Development/Lazarus/projects/bimbo/" CompilerFilename="/usr/bin/fpc" CompilerParams=" -MObjFPC -Scghi -CX -Os3 -OoUNCERTAIN -OoREGVAR -Tlinux -Px86_64 -XX -vewnhi -Fi/home/jblain/Development/Lazarus/projects/bimbo/lib/x86_64-linux -Fl/opt/gnome/lib -Fu/home/jblain/InstalledFromSource/lazarus/trunk/lc l/units/x86_64-linux/gtk2 -Fu/home/jblain/InstalledFromSource/lazarus/ trunk/lcl/units/x86_64-linux -Fu/home/jblain/InstalledFromSource/lazar us/trunk/components/lazutils/lib/x86_64-linux -Fu/home/jblain/Installe dFromSource/lazarus/trunk/packager/units/x86_64-linux -Fu/home/jblain/Development/Lazarus/projects/bimbo/ -FU/home/jblain/Development/Lazarus/projects/bimbo/lib/x86_64-linux/ -l -dLCL -dLCLgtk2 project1.lpr" [TCompiler.Compile] CmdLine="/usr/bin/fpc -B  -MObjFPC -Scghi -CX -Os3 -OoUNCERTAIN -OoREGVAR -Tlinux -Px86_64 -XX -vewnhi -Fi/home/jblain/Development/Lazarus/projects/bimbo/lib/x86_64-linux -Fl/opt/gnome/lib -Fu/home/jblain/InstalledFromSource/lazarus/trunk/lc l/units/x86_64-linux/gtk2 -Fu/home/jblain/InstalledFromSource/lazarus/ trunk/lcl/units/x86_64-linux -Fu/home/jblain/InstalledFromSource/lazar us/trunk/components/lazutils/lib/x86_64-linux -Fu/home/jblain/Installe dFromSource/lazarus/trunk/packager/units/x86_64-linux -Fu/home/jblain/Development/Lazarus/projects/bimbo/ -FU/home/jblain/Development/Lazarus/projects/bimbo/lib/x86_64-linux/ -l -dLCL -dLCLgtk2 project1.lpr" Hint: Start of reading config file /etc/fpc.cfg Hint: End of reading config file /etc/fpc.cfg Free Pascal Compiler version 2.6.0-9 [2013/04/16] for x86_64 Copyright (c) 1993-2011 by Florian Klaempfl and others Target OS: Linux for x86-64 Compiling project1.lpr Compiling unit1.pas unit1.pas(16,28) Hint: Parameter "Sender" not used Compiling resource /home/jblain/Development/Lazarus/projects/bimbo/lib /x86_64-linux/project1.or project1.lpr(20,1) Error: Error while compiling resources project1.lpr(20,1) Fatal: There were 1 errors compiling module, stopping TMessagesView.CollectLineParts WARNING: 10<>8 SrcLine=project1.lpr(20,1) Fatal: There were 1 errors compiling module, stopping TLazSourceFileManager.OpenEditorFile Fixing file name: /home/jblain/Development/Lazarus/projects/bimbo/ -> /home/jblain/Development/Lazarus/projects/bimbo TLazSourceFileManager.OpenEditorFile skipping directory /home/jblain/Development/Lazarus/projects/bimbo TMainIDE.DoBuildProject Compile failed Here is what i displayed in the Messages window Options changed, recompiling clean with -B Compiling resource /home/jblain/Development/Lazarus/projects/bimbo/lib /x86_64-linux/project1.or project1.lpr(20,1) Error: Error while compiling resources. Compile with -vd for more details. Check for duplicates. project1.lpr(20,1) Fatal: There were 1 errors compiling module, stopping I hope this can help zero in on what is wrong here. There is obviously something broken with the resource compiler... ---------------------------------------------------------------------- jblain · 2013-08-20 15:11 Has anyone got a clue about this problem ? Do I need to send more info ? ---------------------------------------------------------------------- Leledumbo · 2013-08-20 16:25 No idea, the project compiles fine on my machine. Anyway: QuoteFPC version 2.7.1 installed from SVN trunk sourcebut QuoteFree Pascal Compiler version 2.6.0-9 [2013/04/16] for x86_64 Copyright (c) 1993-2011 by Florian Klaempfl and others