Recent

Author Topic: Problems building app on 2.2.0 RC1 under macOS - [RESOLVED]  (Read 4898 times)

carl_caulkett

  • Sr. Member
  • ****
  • Posts: 306
Problems building app on 2.2.0 RC1 under macOS - [RESOLVED]
« on: August 11, 2021, 03:37:46 pm »
* Lazarus 2.2.0.rc1
* macOS 10.14.6
* fpc 3.2.0
* fpc 3.2.0 src

I'm trying to build the Lazarus source project Adenochrome (https://sourceforge.net/projects/adenochrome/).

I keep getting the error "graphics.pp(62,14) Fatal: Cannot find GraphMath used by Graphics, incompatible ppu=/Users/carlca/.lazarus/lib/LazUtils/lib/i386-darwin/graphmath.ppu, multiple packages: LazUtils, LCLBase".

Yet, a file search on my machine reveals the presence of GraphMath.pp, GraphMath.o and GraphMath.ppu. Also, the error is occurring at the point in Graphics.pp where GraphMath is referenced, and I can see no compiler dependent directives present that may confuse the issue.

Any ideas, what I need to do to get this project to build?

 

« Last Edit: August 11, 2021, 09:53:43 pm by carl_caulkett »
"It builds... ship it!"

Mac Mini M1
macOS 13.6 Ventura
Lazarus 2.2.6 (release version)
FPC 3.2.2 (release version)

carl_caulkett

  • Sr. Member
  • ****
  • Posts: 306
I don't know is it is connected but I am also getting the message: Warning: Recompiling GraphMath, checksum changed for /usr/local/lib/fpc/3.2.2/units/i386-darwin/rtl/system.ppu".

I took the reckless step of copying GraphMath.pp to my project folder but that doesn't seem to make any difference...
"It builds... ship it!"

Mac Mini M1
macOS 13.6 Ventura
Lazarus 2.2.6 (release version)
FPC 3.2.2 (release version)

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1059
Lazarus 2.2.0rc1, and all the units it ships with, has/have been compiled with FPC 3.2.2. That means you should also install FPC 3.2.2 and FPC 3.2.2 src. The last version of FPC that you install will become the default version on your system, and also the version that Lazarus uses (unless you changed Lazarus settings to point it to a specific compiler binary).

carl_caulkett

  • Sr. Member
  • ****
  • Posts: 306
Sorry, my mistake! I've just checked, and indeed, I have FPC 3.2.2 installed.

volumes/os2 ❯❯❯ fpc                                                                                                                             ✘ 130
Free Pascal Compiler version 3.2.2 [2021/05/16] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
« Last Edit: August 11, 2021, 09:00:39 pm by carl_caulkett »
"It builds... ship it!"

Mac Mini M1
macOS 13.6 Ventura
Lazarus 2.2.6 (release version)
FPC 3.2.2 (release version)

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1059
That's very strange. The error message then suggests that somehow the graphmath.ppu unit included with Lazarus was compiled against a different version of an FPC 3.2.2 system unit than the one you have installed. That sounds like a bug in the packaged files with the Lazarus installer. Best file a bug report, so this can hopefully fixed for the final version.

Also, for some reason you are compiling for i386 (Intel 32 bit) rather than x86-64 (Intel 64 bit). If you did not do that on purpose, I would recommend to switch to x86-64 by going to the Lazarus menu -> Preferences, and in the "Environment" settings make sure the compiler is set to /usr/local/bin/fpc and under Project -> Project Options ... -> Compiler Options -> "Config and Target" the Target CPU Family is set to "Default". That might also work around the issue you have in case the shipped GraphMath unit for x86-64 was correctly compiled against the FPC 3.2.2 system unit.

carl_caulkett

  • Sr. Member
  • ****
  • Posts: 306
Re: Problems building app on 2.2.0 RC1 under macOS - [RESOLVED]
« Reply #5 on: August 11, 2021, 09:53:02 pm »
Yes the compiler was set to i386, though not through any deliberate action by myself. I switched to `/usr/local/bin/fpc`, and although I had to reload Lazarus before the changes took effect, and, notwithstanding some nonsense about inline suctions not being inlined, everything seems to be fine now.

Thank you very much ;-)
"It builds... ship it!"

Mac Mini M1
macOS 13.6 Ventura
Lazarus 2.2.6 (release version)
FPC 3.2.2 (release version)

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Problems building app on 2.2.0 RC1 under macOS - [RESOLVED]
« Reply #6 on: August 12, 2021, 03:03:59 am »
I used to encounter this issue where ppc386 was set as the compiler by default back in 2019, but it hasn't occurred lately. I installed Lazarus 2.2 RC1 on a clean Mojave VM only a few days ago and everything was fine.

Did you have a previous Lazarus installation?

 

TinyPortal © 2005-2018