* * *

Author Topic: lazbuild can't call the resource compiler  (Read 284 times)

ertank

  • Jr. Member
  • **
  • Posts: 88
lazbuild can't call the resource compiler
« on: March 04, 2017, 02:39:08 pm »
Hi,

I am using lazarus on Raspberry Pi 3 Raspbian Jessie with sources from trunk. To be able to build a service application I wanted to install lazdeamon package. I have failed to compile both under GUI or from command line to compile. Error details are as follows:
Code: [Select]
make[2]: Entering directory '/home/pi/lazarus/source/ide'
/home/pi/fpc-3.1/bin/fpc -gl -vbqewnhi -Sci -dlclgtk2 -Fu../designer -Fu../debugger -Fu../debugger/frames -Fu../converter -Fu../packager -Fu../packager/frames -Fu../components/custom -Fuframes -Fu. -Fiinclude -Fiinclude/linux -Fi../images -FE.. -FU../units/arm-linux/gtk2 -Fl/usr/lib/gcc/arm-linux-gnueabihf/4.9 -Flinclude -Fl/etc/ld.so.conf.d/*.conf @/root/.lazarus/idemake.cfg -darm lazarus.pp
Hint: (11030) Start of reading config file /root/.fpc.cfg
Hint: (11031) End of reading config file /root/.fpc.cfg
Hint: (11030) Start of reading config file /root/.lazarus/idemake.cfg
Hint: (11031) End of reading config file /root/.lazarus/idemake.cfg
Free Pascal Compiler version 3.1.1 [2017/02/22] for arm
Copyright (c) 1993-2017 by Florian Klaempfl and others
(1002) Target OS: Linux for ARMHF
(3104) Compiling lazarus.pp
(9022) Compiling resource /home/pi/lazarus/source/units/arm-linux/gtk2/lazarus.or
/home/pi/lazarus/source/ide/lazarus.pp(159,1) Error: (9030) Can't call the resource compiler "/home/pi/fpc-3.1/bin/fpcres", switching to external mode
/home/pi/lazarus/source/ide/lazarus.pp(159,1) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
make[2]: *** [lazarus] Error 1
make[1]: *** [idepkg] Error 2
make: *** [idepkg] Error 2
Error: /home/pi/fpc-3.1/bin/ppcarm returned an error exitcode
Makefile:3961: recipe for target 'lazarus' failed
make[2]: Leaving directory '/home/pi/lazarus/source/ide'
Makefile:4383: recipe for target 'idepkg' failed
make[1]: Leaving directory '/home/pi/lazarus/source/ide'
Makefile:3160: recipe for target 'idepkg' failed
make: Leaving directory '/home/pi/lazarus/source'
Error: (lazarus) Build IDE: stopped with exit code 512
Error: (lazarus) Building IDE: Building IDE failed.
root@raspberrypi:/home/pi/lazarus/source# /home/pi/fpc-3.1/bin/fpcres
fpcres - resource file converter, version 2.0 [2017/02/22], FPC 3.1.1
Host platform: Linux - arm
Copyright (c) 2008 by Giulio Bernardi.
Syntax: fpcres [options] <inputfile> [<inputfile>...] [-o <outputfile>]

Options:
  --help, -h, -?       Show this screen.
  --version, -V        Show program version.
  --verbose, -v        Be verbose.
  --input, -i <x>      Ignored for compatibility.
  --output, -o <x>     Set the output file name.
  -of <format>         Set the output file format. Supported formats:
                         res, elf, coff, mach-o, external
  --arch, -a <name>    Set object file architecture. Supported architectures:
                         i386, x86_64, arm (coff)
                         i386, x86_64, powerpc, powerpc64, arm, armeb, m68k,
                         sparc, alpha, ia64, mips, mipsel (elf)
                         i386, x86_64, powerpc, powerpc64, arm, aarch64 (mach-o)
                         bigendian, littleendian (external)
  --subarch, -s <name> Set object file sub-architecture. Supported values:
                         arm: all, v4t, v6, v5tej, xscale, v7
                         other architectures: all
  @<file>              Read more options from file <file>
Default output target: arm - elf-all
root@raspberrypi:/home/pi/lazarus/source#

As you can see in the last part, fpcres is perfectly in the search path and can be executed.

I could not understand the main reason behind and appreciate any help.

Thanks.

Thaddy

  • Hero Member
  • *****
  • Posts: 3053
Re: lazbuild can't call the resource compiler
« Reply #1 on: March 04, 2017, 02:44:06 pm »
1. Create a 512 swap partition
2. When you are compiling Lazarus, close all other programs.

It is simply running out of memory.
If you do the above, Lazarus compiles fine on the Raspberry Pi 3

ertank

  • Jr. Member
  • **
  • Posts: 88
Re: lazbuild can't call the resource compiler
« Reply #2 on: March 04, 2017, 02:56:15 pm »
Hi Thaddy,

I am just too new for Raspberry Pi.

I used a 1GB swap file when compiling fpc and lazarus from trunk sources. After compilation, I am suggested to revert back swap file to 100MB in that article I have read.

So, should I keep is 500MB for good? Or, revert back to 100MB as other article suggested?

Thanks.

Thaddy

  • Hero Member
  • *****
  • Posts: 3053
Re: lazbuild can't call the resource compiler
« Reply #3 on: March 04, 2017, 03:12:39 pm »
To compile Lazarus on the RPi 3 by itself, you simply need the swapfile. That prevents resource compiler and linker errors.
Is that article you've read a recent one? I'd like to read it.

ertank

  • Jr. Member
  • **
  • Posts: 88
Re: lazbuild can't call the resource compiler
« Reply #4 on: March 04, 2017, 03:26:50 pm »
I changed my swap file to 1000M.
Started IDE and made adjustments in there.
Started and completed compilation fine.

I am keeping it as it is now.

Article is about 8 months old. Covering fpc 3.0 and lazarus 1.7.

http://duinorasp.hansotten.com/freepascal-and-lazarus-installation-on-rpi/

Thaddy

  • Hero Member
  • *****
  • Posts: 3053
Re: lazbuild can't call the resource compiler
« Reply #5 on: March 04, 2017, 03:59:46 pm »
Well. As long as your SD card is fast and 32GB, you can leave the swap in. If it is small 8GB than I would set it back.
Also, if you still run into trouble report back: make bigide may still fail.. I have a different solution: do a make install and install just the packages that are useful on the RPi, but I have to provide a script for you to do that easily..

ertank

  • Jr. Member
  • **
  • Posts: 88
Re: lazbuild can't call the resource compiler
« Reply #6 on: March 05, 2017, 09:16:58 pm »
I am using a samsung class 10 microsd card. Size is 32gb. As this my planned to be development device I am going to keep 1000MB swap file as it is.

Thanks.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus