Sign in Join

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

Mailing lists / lazarus / 2014-01

Compile works, building DEB package fails

6 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Petr Hlozek

Hello,

I'm developing my app in Lazarus for Linux. Now using version 0.9.30 because it's part of Ubuntu 12.04 repositories.

I've created makefile for the project
(https://github.com/ok2cqr/cqrlog/blob/master/Makefile) and it has been working for long time without any problem.
Unfortunately, recent version of Ubuntu and Debian unstable building fails. What is interesting, it happens only when it's building debian package. Ordinary make in project directory works.

This is what I get from pbuilder-dist:

...
gline2.pas(707,9) Note: Local variable "z" not used gline2.pas(707,11) Note: Local variable "x" not used 800 179.416/188.992 Kb Used
900 179.852/188.992 Kb Used
gline2.pas(896,6) Note: Local variable "z" not used Fatal: Can't find unit typ used by spe
ERROR: failed compiling of project /tmp/buildd/cqrlog-1.7.0/src/cqrlog.lpi make[1]: *** [cqrlog] Error 2
make[1]: Leaving directory `/tmp/buildd/cqrlog-1.7.0' dh_auto_build: make -j1 returned exit code 2
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2 E: Failed autobuilding of package
I: unmounting /var/cache/pbuilder/ccache filesystem I: unmounting dev/pts filesystem
..

The gline.pas is here:
https://github.com/ok2cqr/cqrlog/blob/master/src/gline2.pas

It works when I use make or compile project directly in Lazarus. Only when I try to build package, compilation fails. I also tried to install dependencies that are in control file and it worked :(. Debian unstable has Lazarus 1.0.10 and fpc-2.6.2-7.

Could you help me please? I can't release new version of my app because of this.

Thanks a lot!

Petr

Reply by email

Marco van de Voort
to Petr Hlozek
Petr Hlozek wrote
800 179.416/188.992 Kb Used 900 179.852/188.992 Kb Used gline2.pas(896,6) Note: Local variable "z" not used Fatal: Can't find unit typ used by spe

This sounds like you miss FPC package numlib. If and how debian packs it, I don't know, but I suggest checking the FPC unitpath to see if a directory numlib is there.

It should have approximately the following units.

det dsl eig eigh1 eigh2 int inv iom ipf
mdt ode omv roo sle spe spl typ

Lazarus Tchart had (has?) an own version of SPE for a while, that might also be related (Free Pascal can thrown "not found" errors when it encounters two versions of the same unit)

Reply by email

Mattias Gaertner
to Petr Hlozek: I'm developing my app in Lazarus for Linux. Now using version 0.9.30 because it's part of…
Petr Hlozek hat am 15. Januar 2014 um 10:30 geschrieben: [...] I'm developing my app in Lazarus for Linux. Now using version 0.9.30 because it's part of Ubuntu 12.04 repositories.

Hint: The Lazarus 1.0.14 deb package for Ubuntu can be found on sourceforge. It is easy to install.

I've created makefile for the project (https://github.com/ok2cqr/cqrlog/blob/master/Makefile) and it has been working for long time without any problem.

If I understand the file correct, then it compiles your project using: lazbuild --ws=gtk2 src/cqrlog.lpi

Show quoted text 13 lines
Unfortunately, recent version of Ubuntu and Debian unstable building fails. What is interesting, it happens only when it's building debian package. Ordinary make in project directory works. This is what I get from pbuilder-dist: ... gline2.pas(707,9) Note: Local variable "z" not used gline2.pas(707,11) Note: Local variable "x" not used 800 179.416/188.992 Kb Used 900 179.852/188.992 Kb Used gline2.pas(896,6) Note: Local variable "z" not used Fatal: Can't find unit typ used by spe

For more verbosity add -vut to your project (lpi). Then run the script again.

Show quoted text 17 lines
ERROR: failed compiling of project /tmp/buildd/cqrlog-1.7.0/src/cqrlog.lpi make[1]: *** [cqrlog] Error 2 make[1]: Leaving directory `/tmp/buildd/cqrlog-1.7.0' dh_auto_build: make -j1 returned exit code 2 make: *** [build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 E: Failed autobuilding of package I: unmounting /var/cache/pbuilder/ccache filesystem I: unmounting dev/pts filesystem .. The gline.pas is here: https://github.com/ok2cqr/cqrlog/blob/master/src/gline2.pas It works when I use make or compile project directly in Lazarus. Only when I try to build package, compilation fails. I also tried to install dependencies that are in control file and it worked :(.

What dependencies did you install?

Debian unstable has Lazarus 1.0.10 and fpc-2.6.2-7.

Mattias

Reply by email

Petr Hlozek
to Marco van de Voort: This sounds like you miss FPC package numlib. If and how debian packs it, I don't know,…

2014/1/15 Marco van de Voort :

Show quoted text 11 lines
On Wed, Jan 15, 2014 at 10:30:58AM +0100, Petr Hlozek wrote: > 800 179.416/188.992 Kb Used > 900 179.852/188.992 Kb Used > gline2.pas(896,6) Note: Local variable "z" not used > Fatal: Can't find unit typ used by spe This sounds like you miss FPC package numlib. If and how debian packs it, I don't know, but I suggest checking the FPC unitpath to see if a directory numlib is there.

I tried to install to clean system all dependecies from debian control file and it worked when I compile it in Lazarus IDE :(. I thought the problem won't be in dependencies. I'm sorry, I don't know how to check if the package is there, because it happens only in build chroot. I'll find out which fpc package includes the numlib and add it to dependencies.

Thank you for your help!

Reply by email

Petr Hlozek
to Mattias Gaertner: Hint: The Lazarus 1.0.14 deb package for Ubuntu can be found on sourceforge. It is easy…

2014/1/15 Mattias Gaertner :

Show quoted text 9 lines
> Petr Hlozek hat am 15. Januar 2014 um 10:30 geschrieben: > [...] > I'm developing my app in Lazarus for Linux. Now using version 0.9.30 > because it's part of Ubuntu 12.04 repositories. Hint: The Lazarus 1.0.14 deb package for Ubuntu can be found on sourceforge. It is easy to install.

Yes, they are but I can't use it to build package in Debian unstable or Ubuntu. I have to use what they heve in their repo.

Show quoted text 8 lines
> gline2.pas(707,9) Note: Local variable "z" not used > gline2.pas(707,11) Note: Local variable "x" not used > 800 179.416/188.992 Kb Used > 900 179.852/188.992 Kb Used > gline2.pas(896,6) Note: Local variable "z" not used > Fatal: Can't find unit typ used by spe For more verbosity add -vut to your project (lpi). Then run the script again.

I'll try, thank you!

What dependencies did you install?

I installed debhelper, lazarus, lcl, fp-utils, fp-units-misc, fp-units-gfx, fp-units-gtk, fp-units-db, libhamlib-dev

with apt-get install debhelper lazarus lcl fp-utils fp-units-misc fp-units-gfx fp-units-gtk fp-units-db libhamlib-dev

Strange is, that happens only in Debian unstable and Ubuntu 13.10/14.04. Older versions don't have this problem.

Thank you for help!

Petr

Reply by email

Petr Hlozek
to Marco van de Voort: This sounds like you miss FPC package numlib. If and how debian packs it, I don't know,…

It works! I added fp-units-math to package dependencies and it works! That's great, I can release new version. Thank you for your help!

Petr

2014/1/15 Marco van de Voort :

Show quoted text 16 lines
On Wed, Jan 15, 2014 at 10:30:58AM +0100, Petr Hlozek wrote: > 800 179.416/188.992 Kb Used > 900 179.852/188.992 Kb Used > gline2.pas(896,6) Note: Local variable "z" not used > Fatal: Can't find unit typ used by spe This sounds like you miss FPC package numlib. If and how debian packs it, I don't know, but I suggest checking the FPC unitpath to see if a directory numlib is there. It should have approximately the following units. det dsl eig eigh1 eigh2 int inv iom ipf mdt ode omv roo sle spe spl typ

Reply by email