Recent

Author Topic: Missing downloads for FPC 3.2.0 for i386  (Read 896 times)

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 724
Re: Missing downloads for FPC 3.2.0 for i386
« Reply #15 on: July 15, 2020, 08:17:49 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.
It should even not be necessary to use -FD. Did Xcode 3.1.4 already include clang? If not, pass -Aas-darwin to OPT to tell the compiler to use "as" instead. Xcode 3.1.4 by default installs the command line tools (in /usr/bin).

trev

  • Hero Member
  • *****
  • Posts: 755
  • Former Delphi 1-7 and 10.2 User
Re: Missing downloads for FPC 3.2.0 for i386
« Reply #16 on: Today at 05:48:29 am »
> Did Xcode 3.1.4 already include clang?

No. I installed llvm+clang-2.6-i386-darwin9.tar.gz from llvm.org.

Using the default /usr/bin/as (Apple Inc version cctools-698.1~1, GNU assembler version 1.38) OR the llvm-v2.6 llvm-as symlinked to /usr/local/bin/as (with /usr/local/bin occurring in the path before /usr/bin) and:

Code: [Select]
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
results in:

Code: [Select]
/bin/mkdir -p i386/units/i386-darwin
/usr/local/share/fpcsrc/fpc-3.2.0/compiler/ppc1 -Ur -Xs -O2 -n -Fui386 -Fusystems -Fu/usr/local/share/fpcsrc/fpc-3.2.0/rtl/units/i386-darwin -Fii386 -FD/Users/trev/bin/clang/bin/ -FE. -FUi386/units/i386-darwin -dRELEASE -Aas-darwin    -di386 -dGDB -dBROWSERLOG -Fux86 -Sew pp.pas
ld: could not find entry point "start" (perhaps missing crt1.o)
An error occurred while linking
pp.pas(266,1) Error: Error while linking
pp.pas(266,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
make[5]: *** [ppc386] Error 1
make[4]: *** [next] Error 2
make[3]: *** [ppc2] Error 2
make[2]: *** [cycle] Error 2
make[1]: *** [compiler_cycle] Error 2
make: *** [build-stamp.i386-darwin] Error 2

crt1.o exists in:

Code: [Select]
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/crt1.o
/Developer/SDKs/MacOSX10.5.sdk/usr/lib/crt1.o
/usr/lib/crt1.o
o Lazarus v2.1.0 r63549, FPC v3.3.1 r45778, 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 (Parallels VM)
o FPC 3.0.4, FreeBSD 12-STABLE r361007 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 724
Re: Missing downloads for FPC 3.2.0 for i386
« Reply #17 on: Today at 11:24:36 am »
You have to add -WM10.5 (or -WM10.4) to OPT because of https://wiki.freepascal.org/User_Changes_3.2.0#Default_Target_macOS_version

trev

  • Hero Member
  • *****
  • Posts: 755
  • Former Delphi 1-7 and 10.2 User
Re: Missing downloads for FPC 3.2.0 for i386
« Reply #18 on: Today at 01:11:28 pm »
That certainly progressed the build much further until:

Code: [Select]
[ 95%] Compiled package utils-unicode
Start compiling package utils-pas2js for target i386-darwin.
       Compiling pas2js/BuildUnit_utils_pas2js.pp
       Compiling pas2js/dirwatch.pp
       Compiling pas2js/httpcompiler.pp
       Compiling pas2js/pas2js.pp
       Linking pas2js/bin/i386-darwin/pas2js
       Compiling pas2js/pas2jslib.pp
       Linking pas2js/bin/i386-darwin/libpas2jslib.dylib
The installer encountered the following error:
External command "/usr/local/share/fpcsrc/fpc-3.2.0/compiler/ppc386 -Tdarwin -FEpas2js/bin/i386-darwin -FUpas2js/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/rtl/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/fcl-json/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/fcl-base/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/univint/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/fcl-res/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/rtl-objpas/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/fcl-js/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/fcl-passrc/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/pastojs/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/paszlib/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/hash/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/fcl-process/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/fcl-web/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/fcl-db/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/fcl-xml/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/iconvenc/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/rtl-extra/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/ibase/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/mysql/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/odbc/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/oracle/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/postgres/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/sqlite/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/fcl-net/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/fcl-fpcunit/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/libtar/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/openssl/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/fastcgi/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/httpd22/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/httpd24/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/libmicrohttpd/units/i386-darwin/ -Fu/usr/local/share/fpcsrc/fpc-3.2.0/packages/webidl/units/i386-darwin/ -Ur -Xs -O2 -n -FD/Users/trev/bin/clang/bin/ -WM10.5 -di386 -dRELEASE -viq pas2js/pas2jslib.pp" failed with exit code 256. Console output:
Target OS: Darwin for i386
Compiling pas2js/pas2jslib.pp
Assembling pas2jslib
clang: warning: argument unused during compilation: '-mmacosx-version-min=10.5'
Linking pas2js/bin/i386-darwin/libpas2jslib.dylib
Error: Error while linking
Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
/usr/bin/strip: bad n_sect for symbol table entry 9754 in: /usr/local/share/fpcsrc/fpc-3.2.0/utils/pas2js/bin/i386-darwin/libpas2jslib.dylib

make[2]: *** [all] Error 1
make[1]: *** [utils_all] Error 2
make: *** [build-stamp.i386-darwin] Error 2
« Last Edit: Today at 01:13:52 pm by trev »
o Lazarus v2.1.0 r63549, FPC v3.3.1 r45778, 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 (Parallels VM)
o FPC 3.0.4, FreeBSD 12-STABLE r361007 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 724
Re: Missing downloads for FPC 3.2.0 for i386
« Reply #19 on: Today at 07:32:11 pm »
That looks like a bug in the clang version you are using. I would really recommend to use "as" instead.

 

TinyPortal © 2005-2018