Installation => macOS / Mac OS X => Topic started by: d2klein on March 21, 2018, 08:31:45 am
Title: Trouble on mac / FV
Post by: d2klein on March 21, 2018, 08:31:45 am
Hi together,
i just installed lazarus on my mac which i guess worked fine (well no debugging yet but...). Setting up a sample gui application compiles and starts. But as soon as i try to create a fv application following http://www.lazarusforum.de/viewtopic.php?f=22&t=11063
compiling ends with a message about duplicate PPU for menus and dialogs. One ppu belongs to fv, the second one to a cocoa wrapper or something like that.
Any idea how to solve the problem?
Title: Re: Trouble on mac / FV
Post by: Thaddy on March 21, 2018, 09:49:24 am
hmm then i'll try the compiler directive as soon as i'm at home. On a windows box it's not needed.
That is not true: on a Windows box it IS needed. On a Linux box it is not needed. It may be that a Default Laz configuration assumes a GUI, though, but the compiler needs to know. Either through {$apptype GUI} or through passing -WG (on windows) You are on a Mac: use {$apptype GUI} in your project file. (lpr not lpi)
Title: Re: Trouble on mac / FV
Post by: d2klein on March 21, 2018, 07:35:05 pm
Well still no luck.
Compiling message:
Projekt kompilieren, Ziel: /Users/xxx/tmp/project1: Exit code 256, Fehler: 1, Warnungen: 2 project1.lpr(2,4) Warning: APPTYPE is not supported by the target OS Warning: Recompiling App, checksum changed for Menus project1.lpr(4,3) Fatal: Can't find unit App used by Project1
Project setting test:
ANMERKUNG: using config file /etc/fpc.cfg WARNUNG: ppu ist zweimal vorhanden: /usr/local/lib/fpc/3.0.4/units/i386-darwin/univint/Dialogs.ppu, /usr/local/lib/fpc/3.0.4/units/i386-darwin/fv/dialogs.ppu WARNUNG: ppu ist zweimal vorhanden: /usr/local/lib/fpc/3.0.4/units/i386-darwin/univint/Menus.ppu, /usr/local/lib/fpc/3.0.4/units/i386-darwin/fv/menus.ppu WARNUNG: verwaiste Datei gefunden: /Users/xxx/tmp/lib/i386-darwin/unit1.o WARNUNG: verwaiste Datei gefunden: /Users/xxx/tmp/lib/i386-darwin/unit1.ppu
Also tried removing fpc/lazarus according to http://wiki.freepascal.org/Installing_Lazarus_on_MacOS_X#Installed_from_disk_images_or_sources manually removing everything fpc related I could find (e.g. .lazarus dir in home and so on) and reinstalling but still no luck
Title: Re: Trouble on mac / FV
Post by: Thaddy on March 21, 2018, 10:37:45 pm
Then your paths are incorrect. I double checked.
Title: Re: Trouble on mac / FV
Post by: d2klein on March 28, 2018, 07:58:08 pm
Still trying.
compiling on console leads to error too. using fpc -vut source file I come to:
(APP) Load from APP (interface) unit MENUS (MENUS) Loading unit MENUS Unitsearch: Menus.ppu Searching file Menus.ppu... not found Searching file menus.ppu... not found Searching file MENUS.PPU... not found Unitsearch: Menus.pp Searching file Menus.pp... not found Searching file menus.pp... not found Searching file MENUS.PP... not found Unitsearch: Menus.pas Searching file Menus.pas... not found Searching file menus.pas... not found Searching file MENUS.PAS... not found Unitsearch: Menus.p Searching file Menus.p... not found Searching file menus.p... not found
(MENUS) Finished loading unit MENUS (APP) Adding dependency: APP depends on MENUS (APP) Recompiling App, checksum changed for Menus
And this is because while searching for ppus, the first MENUS.PPU found is the UNIVINT one. But instead of continue searching the compiler stops and tries to use the first one found (probably the wrong one? as there is another one in /usr/local/lib/fpc/3.0.4/units/x86_64-darwin/fv) . Therefore the system tries to recompile APP which is not possible.
Still working on how to come around
Title: Re: Trouble on mac / FV
Post by: d2klein on March 28, 2018, 08:01:23 pm
maybe it's possible to enhance my fpc.cfg by another ifdef FV flag pointing to the fv directory first?