Recent

Author Topic: [SOLVED] Missing downloads for FPC 3.2.0 for i386  (Read 2054 times)

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 946
  • Former Delphi 1-7, 10.2 User
[SOLVED] Missing downloads for FPC 3.2.0 for i386
« on: July 10, 2020, 08:07:48 am »
The Lazarus file area download for macOS i386 does not contain FPC 3.2.0 binary or source downloads but only FPC 3.0.4. See: https://sourceforge.net/projects/lazarus/files/Lazarus%20Mac%20OS%20X%20i386/Lazarus%202.0.10/

Unfortunately the macOS x86_64 FPC 3.2.0 pkg file does not install under macOS 10.11 or earlier.
« Last Edit: July 19, 2020, 02:19:40 am by trev »
o Lazarus v2.1.0 r63871, FPC v3.3.1 r46876, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

PascalDragon

  • Hero Member
  • *****
  • Posts: 2138
  • Compiler Developer
Re: Missing downloads for FPC 3.2.0 for i386
« Reply #1 on: July 10, 2020, 09:12:00 am »
Unfortunately the macOS x86_64 FPC 3.2.0 pkg file does not install under macOS 10.11 or earlier.

Are you talking about the one provided by FPC? Did you report this on the bug tracker?

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 946
  • Former Delphi 1-7, 10.2 User
Re: Missing downloads for FPC 3.2.0 for i386
« Reply #2 on: July 10, 2020, 09:17:23 am »
No - it's a known issue with the Lazarus-provided pkg installer files in the Lazarus Download area on Sourceforge as I specified.

The download README advice on Sourceforge is to use the i386 versions which do not exist.
o Lazarus v2.1.0 r63871, FPC v3.3.1 r46876, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

totya

  • Hero Member
  • *****
  • Posts: 635
Re: Missing downloads for FPC 3.2.0 for i386
« Reply #3 on: July 10, 2020, 10:12:06 am »
No - it's a known issue with the Lazarus-provided pkg installer files in the Lazarus Download area on Sourceforge as I specified.

I don't know nothing about MAC, but perhaps you can see it: fpcupdeluxe You can install stable versions too with it.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 757
Re: Missing downloads for FPC 3.2.0 for i386
« Reply #4 on: July 11, 2020, 12:05:24 pm »
Unfortunately the macOS x86_64 FPC 3.2.0 pkg file does not install under macOS 10.11 or earlier.

Are you talking about the one provided by FPC? Did you report this on the bug tracker?
No - it's a known issue with the Lazarus-provided pkg installer files in the Lazarus Download area on Sourceforge as I specified.
The fpc-3.2.0.intel-macosx.dmg in https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/Lazarus%202.0.10/ is identical to the one in https://sourceforge.net/projects/freepascal/files/Mac%20OS%20X/3.2.0/ (if you click on the "i" icons next to them, you can see the checksums match). It should install on Mac OS X 10.4 and later. If it doesn't, that's a bug.

The issue with the framework linking in the CocoaAll unit is also a bug that will be fixed. You'll have to manually specify {$linkframework CoreImage} in your main program or another unit if you wish to use functions from it imported via the CocoaAll unit in future FPC versions.

Edit: actually, there may be a different solution for this last point. Checking...
« Last Edit: July 11, 2020, 12:33:32 pm by Jonas Maebe »

julkas

  • Guest
Re: Missing downloads for FPC 3.2.0 for i386
« Reply #5 on: July 11, 2020, 01:43:19 pm »
Why not -
Code: Bash  [Select][+][-]
  1. brew update
  2. brew install fpc
  3.  
Working for me (FPC 3.2.0, OS name: "mac os x", version: "10.15.5", arch: "x86_64", family: "mac")

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 946
  • Former Delphi 1-7, 10.2 User
Re: Missing downloads for FPC 3.2.0 for i386
« Reply #6 on: July 11, 2020, 02:54:56 pm »
@Jonas: Maybe a picture will save me a thousand words. See attached from https://sourceforge.net/projects/lazarus/files/Lazarus%20Mac%20OS%20X%20i386/Lazarus%202.0.10/ (macOS 32 bit directory).

The contents does not include FPC 3.2.0, but FPC 3.0.4 or the filenames are wrong.
o Lazarus v2.1.0 r63871, FPC v3.3.1 r46876, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 757
Re: Missing downloads for FPC 3.2.0 for i386
« Reply #7 on: July 11, 2020, 03:25:30 pm »
I was reacting to this statement:
Unfortunately the macOS x86_64 FPC 3.2.0 pkg file does not install under macOS 10.11 or earlier.
It should definitely install under OS X 10.11 and earlier, and includes both i386 and x86-64 compilers (fat binaries).

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 757
Re: Missing downloads for FPC 3.2.0 for i386
« Reply #8 on: July 11, 2020, 03:45:18 pm »
I've reinstalled Mac OS X 10.6.8 on my old MacBook Pro mid-2010, and FPC 3.2.0 installed and works fine on it (after installing Xcode 3.2.6 and its command line tools, which required turning back the date to July 2011 and disconnecting from the internet to work around the expired certificate in the Xcode installer package).

The only requirement is to explicitly specify -WM10.5 or -WM10.6 when compiling, to deal with the fact that the default is now OS X 10.8.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 946
  • Former Delphi 1-7, 10.2 User
Re: Missing downloads for FPC 3.2.0 for i386
« Reply #9 on: July 14, 2020, 12:16:22 pm »
I re-installed 10.4 over FreeBSD on my 2007 Mac mini plus Xcode etc but Lazarus 2.0.10 + FPC 3.2.0 was not happy.

I upgraded from 10.4 to 10.5, installed Xcode, Clang 2.6-i386 but FPC 3.2.0 won't compile on less than 10.8 (needed because of the FPC CoreImage framework patch). However, the x86_64 FPC 3.2.0 binaries do install and compile my sample .pas files ok on 10.5, but Lazarus 2.0.10 cannot compile either Carbon or Cocoa interfaces using FPC 3.2.0, but does successfully compile the Carbon interface with FPC 3.0.4.

I avoided Apple's expired certificates by downloading the Xcode versions from the dev download site.

[I'd forgotten how slow a Core2Duo 1.83GHz CPU and spinning rust could be when installing OS X versions :-]
o Lazarus v2.1.0 r63871, FPC v3.3.1 r46876, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

PascalDragon

  • Hero Member
  • *****
  • Posts: 2138
  • Compiler Developer
Re: Missing downloads for FPC 3.2.0 for i386
« Reply #10 on: July 14, 2020, 01:39:40 pm »
I upgraded from 10.4 to 10.5, installed Xcode, Clang 2.6-i386 but FPC 3.2.0 won't compile on less than 10.8 (needed because of the FPC CoreImage framework patch). However, the x86_64 FPC 3.2.0 binaries do install and compile my sample .pas files ok on 10.5, but Lazarus 2.0.10 cannot compile either Carbon or Cocoa interfaces using FPC 3.2.0, but does successfully compile the Carbon interface with FPC 3.0.4.

You do know that "cannot compile" is not a very helpful error message? ;) What exactly is the error you get so that we can determine whether it's a Lazarus or FPC problem.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 946
  • Former Delphi 1-7, 10.2 User
Re: Missing downloads for FPC 3.2.0 for i386
« Reply #11 on: July 15, 2020, 01:05:47 pm »
Yes, I know. I was just rather engrossed in the laborious task of installing various versions of macOS and updates at the time while in the midst of updating the compatibility matrix. Excuses, excuses ;)

Leopard 10.5.8
Xcode 3.1.4
Clang 2.6-i386
Lazarus 2.0.10 i386-Darwin-Carbon FPC 3.0.4

Compiling Carbon interface with FPC 3.2.0 ppc386 results in:

Code: [Select]
carbondef.pp(1030,3) Note: Call to subroutine "function GetDebugLogger:TLazLogger;" marked as inline is not inlined
interfaces.pas(33,3) Hint: Unit "InterfaceBase" not used in Interfaces
Compile Project, Target: /Users/trev/tmp/project1: Exit code 1, Errors: 1
ld: framework not found CoreImage
An error occurred while linking
Error: Error while linking

which is curious because Carbon shouldn't be using CocoaAll.pas (where the CoreImage framework is linked in) anyway and the default project application is using the 32 bit Carbon widgetset (set in Project options) and the compiler is set to ppc386 in IDE options and i386 is set in Project options.

Compiling Cocoa interface with FPC 3.2.0 ppcx64 results in:

Code: [Select]
cocoagdiobjects.pas(3423,3) Note: Local variable "WidthMul" not used
interfaces.pas(30,3) Hint: Unit "InterfaceBase" not used in Interfaces
Compile Project, CPU: x86_64, Target: /Users/trev/tmp/project1: Exit code 1, Errors: 1
ld: framework not found CoreImage
An error occurred while linking
Error: Error while linking

which is currently expected because of the CocoaAll.pas link to the CoreImage framework.Yes, the irony has not escaped me: I reported the missing dollar sign in CocoaAll.pas which now causes CoreImage to be linked in :(

Attempting to recompile FPC 3.2.0 with FPC 3.0.4 on this system also fails:

Code: [Select]
make -C /usr/local/share/fpcsrc/fpc-3.2.0/rtl 'OPT=/Users/trev/bin/clang/bin/  ' all
make -C darwin all
/bin/mkdir -p /usr/local/share/fpcsrc/fpc-3.2.0/rtl/units/i386-darwin
/usr/local/lib/fpc/3.0.4/ppc386 -FD=/Users/trev/bin/clang/bin/ -Ur -dFPC_USE_LIBC -Ur -Xs -O2 -n -Fi../inc -Fi../i386 -Fi../unix -Fi../bsd -Fi../bsd/i386 -Fi../darwin/i386 -FE. -FU/usr/local/share/fpcsrc/fpc-3.2.0/rtl/units/i386-darwin /Users/trev/bin/clang/bin/ -di386 -dRELEASE  -Us -Sg ../bsd/system.pp
system.inc(721,40) Warning: Comparison might be always false due to range of constant and expression
system.inc(722,5) Warning: unreachable code
dynlib.inc(173,10) Warning: Function result does not seem to be set
dynlib.inc(178,10) Warning: Function result does not seem to be set
dynlib.inc(183,10) Warning: Function result does not seem to be set
dynlib.inc(188,10) Warning: Function result does not seem to be set
dynlib.inc(193,10) Warning: Function result does not seem to be set
dynlib.inc(198,10) Warning: Function result does not seem to be set
system.pp(395) Error: Can't call the assembler, error 127 switching to external assembling
system.pp(395) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted
make[7]: *** [system.ppu] Error 1
make[6]: *** [darwin_all] Error 2
make[5]: *** [rtl] Error 2
make[4]: *** [next] Error 2
make[3]: *** [ppc1] Error 2
make[2]: *** [cycle] Error 2
make[1]: *** [compiler_cycle] Error 2
make: *** [build-stamp.i386-darwin] Error 2

If there's anything else needed, let me know.
o Lazarus v2.1.0 r63871, FPC v3.3.1 r46876, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

PascalDragon

  • Hero Member
  • *****
  • Posts: 2138
  • Compiler Developer
Re: Missing downloads for FPC 3.2.0 for i386
« Reply #12 on: July 15, 2020, 02:07:52 pm »
Compiling Carbon interface with FPC 3.2.0 ppc386 results in:

Code: [Select]
carbondef.pp(1030,3) Note: Call to subroutine "function GetDebugLogger:TLazLogger;" marked as inline is not inlined
interfaces.pas(33,3) Hint: Unit "InterfaceBase" not used in Interfaces
Compile Project, Target: /Users/trev/tmp/project1: Exit code 1, Errors: 1
ld: framework not found CoreImage
An error occurred while linking
Error: Error while linking

which is curious because Carbon shouldn't be using CocoaAll.pas (where the CoreImage framework is linked in) anyway and the default project application is using the 32 bit Carbon widgetset (set in Project options) and the compiler is set to ppc386 in IDE options and i386 is set in Project options.

Even Carbon uses Cocoa for some functionality like the system tray. I think if you define CarbonDontUseCocoa you can disable that.

Compiling Cocoa interface with FPC 3.2.0 ppcx64 results in:

Code: [Select]
cocoagdiobjects.pas(3423,3) Note: Local variable "WidthMul" not used
interfaces.pas(30,3) Hint: Unit "InterfaceBase" not used in Interfaces
Compile Project, CPU: x86_64, Target: /Users/trev/tmp/project1: Exit code 1, Errors: 1
ld: framework not found CoreImage
An error occurred while linking
Error: Error while linking

which is currently expected because of the CocoaAll.pas link to the CoreImage framework.Yes, the irony has not escaped me: I reported the missing dollar sign in CocoaAll.pas which now causes CoreImage to be linked in :(

Yes, Jonas recently reverted that in trunk due to that problem. You could recompile the CocoaAll unit with the $LinkFramework directive for that framework disabled.

Attempting to recompile FPC 3.2.0 with FPC 3.0.4 on this system also fails:

Code: [Select]
make -C /usr/local/share/fpcsrc/fpc-3.2.0/rtl 'OPT=/Users/trev/bin/clang/bin/  ' all
make -C darwin all
/bin/mkdir -p /usr/local/share/fpcsrc/fpc-3.2.0/rtl/units/i386-darwin
/usr/local/lib/fpc/3.0.4/ppc386 -FD=/Users/trev/bin/clang/bin/ -Ur -dFPC_USE_LIBC -Ur -Xs -O2 -n -Fi../inc -Fi../i386 -Fi../unix -Fi../bsd -Fi../bsd/i386 -Fi../darwin/i386 -FE. -FU/usr/local/share/fpcsrc/fpc-3.2.0/rtl/units/i386-darwin /Users/trev/bin/clang/bin/ -di386 -dRELEASE  -Us -Sg ../bsd/system.pp
system.inc(721,40) Warning: Comparison might be always false due to range of constant and expression
system.inc(722,5) Warning: unreachable code
dynlib.inc(173,10) Warning: Function result does not seem to be set
dynlib.inc(178,10) Warning: Function result does not seem to be set
dynlib.inc(183,10) Warning: Function result does not seem to be set
dynlib.inc(188,10) Warning: Function result does not seem to be set
dynlib.inc(193,10) Warning: Function result does not seem to be set
dynlib.inc(198,10) Warning: Function result does not seem to be set
system.pp(395) Error: Can't call the assembler, error 127 switching to external assembling
system.pp(395) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted
make[7]: *** [system.ppu] Error 1
make[6]: *** [darwin_all] Error 2
make[5]: *** [rtl] Error 2
make[4]: *** [next] Error 2
make[3]: *** [ppc1] Error 2
make[2]: *** [cycle] Error 2
make[1]: *** [compiler_cycle] Error 2
make: *** [build-stamp.i386-darwin] Error 2

How did you call make?

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 946
  • Former Delphi 1-7, 10.2 User
Re: Missing downloads for FPC 3.2.0 for i386
« Reply #13 on: July 15, 2020, 03:30:47 pm »
Code: Text  [Select][+][-]
  1. make clean all FPC="/usr/local/lib/fpc/3.0.4/ppc386 -FD=/Users/trev/bin/clang/bin/" OS_TARGET=darwin CPU_TARGET=i386 CPU_SOURCE=i386 OPT="/Users/trev/bin/clang/bin/"

clang and as are also linked from /usr/local/bin/ to /Users/trev/bin/clang/bin/.
o Lazarus v2.1.0 r63871, FPC v3.3.1 r46876, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

PascalDragon

  • Hero Member
  • *****
  • Posts: 2138
  • Compiler Developer
Re: Missing downloads for FPC 3.2.0 for i386
« Reply #14 on: July 15, 2020, 04:14:33 pm »
Code: Text  [Select][+][-]
  1. make clean all FPC="/usr/local/lib/fpc/3.0.4/ppc386 -FD=/Users/trev/bin/clang/bin/" OS_TARGET=darwin CPU_TARGET=i386 CPU_SOURCE=i386 OPT="/Users/trev/bin/clang/bin/"

clang and as are also linked from /usr/local/bin/ to /Users/trev/bin/clang/bin/.

That is wrong (don't pass options in FPC, fpc never uses "=" in parameters and OPT is a parameter list for fpc, so no parameters without prefix). You need to call it like this:

Code: Text  [Select][+][-]
  1. make clean all FPC="/usr/local/lib/fpc/3.0.4/ppc386" CROSSBINDIR="/Users/trev/bin/clang/bin/" OS_TARGET=darwin CPU_TARGET=i386 CPU_SOURCE=i386

And if you have additional parameters for the compiler (aside from a potential BINUTILSPREFIX) you need to provide them in OPT as if you'd pass them onto the compiler (e.g. OPT="-O2 -glw").

Edit: clarified the incorrect use.
« Last Edit: July 15, 2020, 04:50:36 pm by PascalDragon »

 

TinyPortal © 2005-2018