Printer4Lazarus package cannot be set as project dependency in Project Inspector
Original Reporter info from Mantis: trev @trevoz
-
Reporter name: Trevor Roydhouse
Original Reporter info from Mantis: trev @trevoz
- Reporter name: Trevor Roydhouse
Description:
It is wrongly shown as "online" package.
Confirmed in Lazarus 2.0.6 + FPC 3.0.4; and Lazarus trunk r63272 + FPC trunk r45525.
Error message when compiling otherwise blank project after adding printer4lazarus to uses clause of project source:
"Compile Project, Target: project1: Exit code 1, Errors: 1
project1.lpr(10,10) Fatal: Cannot find printer4lazarus used by project1. Check if package Printer4Lazarus is in the dependencies of the Project Inspector."
Attachment 1 - shows Printer4Lazarus is installed
Attachment 2 - shows Printer4Lazarus as "online" and not installed
Attachment 3 - shows attempt to Install from Project Inspector
Directory listing of /Library/Lazarus/components/printers/lib/x86_64-darwin/cocoa showing printer4lazarus:
-rw-r--r-- 1 root wheel 546 6 Nov 2019 Printer4Lazarus.compiled
-rw-r--r-- 1 root wheel 265188 5 Nov 2019 cocoaprndelegate.o
-rw-r--r-- 1 root wheel 9920 5 Nov 2019 cocoaprndelegate.ppu
-rw-r--r-- 1 root wheel 201220 5 Nov 2019 osprinters.o
-rw-r--r-- 1 root wheel 30780 5 Nov 2019 osprinters.ppu
-rw-r--r-- 1 root wheel 1776 6 Nov 2019 printer4lazarus.o
-rw-r--r-- 1 root wheel 1456 6 Nov 2019 printer4lazarus.ppu
-rw-r--r-- 1 root wheel 11836 5 Nov 2019 printer4lazstrconst.o
-rw-r--r-- 1 root wheel 8182 5 Nov 2019 printer4lazstrconst.ppu
-rw-r--r-- 1 root wheel 4345 5 Nov 2019 printer4lazstrconst.rsj
-rw-r--r-- 1 root wheel 270012 5 Nov 2019 printersdlgs.o
-rw-r--r-- 1 root wheel 12179 5 Nov 2019 printersdlgs.ppu
-rw-r--r-- 1 root wheel 9505 5 Nov 2019 printersdlgs.res
The workaround was to manually add it to the project.lpi file changing:
<RequiredPackages Count="1">
<Item1>
<PackageName Value="LCL"/>
</Item1>
</RequiredPackages>
to:
<RequiredPackages Count="2">
<Item1>
<PackageName Value="Printer4Lazarus"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
Steps to reproduce:
Add printer4lazarus to uses clause of otherwise default GUI application project source and compile.
Additional information:
* Happens with Lazarus 2.0.10 (compiled as a 64 bit Cocoa application with FPC 3.2.0) in macOS 10.11 & 10.14.
* Happens with Lazarus 2.0.10 (compiled as a 64 bit Cocoa application with FPC 3.0.4) in macOS 10.11 & 10.14.
* Does not happen with Lazarus 2.0.8 (compiled as a 32 bit Carbon application with FPC 3.0.4) in macOS 10.11.
* Does not happen in FreeBSD or Ubuntu Lazarus trunk using GTK2 widget set.