Forum > Other OS

[SOLVED] FreeBSD 12.0 - FPC 3.3.1 build failure

(1/2) > >>

trev:
Building 3.3.1 on FreeBSD 12.0 (using ld soft-linked to ld.bfd) and:


--- Code: ---gmake[5]: Leaving directory '/usr/local/share/fpc-3.3.1/compiler'
gmake rtl
gmake[5]: Entering directory '/usr/local/share/fpc-3.3.1/compiler'
gmake -C /usr/local/share/fpc-3.3.1/rtl 'OPT=   ' all
gmake[6]: Entering directory '/usr/local/share/fpc-3.3.1/rtl'
gmake -C freebsd all
gmake[7]: Entering directory '/usr/local/share/fpc-3.3.1/rtl/freebsd'
as --64 -o /usr/local/share/fpc-3.3.1/rtl/units/x86_64-freebsd/prt0.o x86_64/prt0.as
as --64 -o /usr/local/share/fpc-3.3.1/rtl/units/x86_64-freebsd/cprt0.o x86_64/cprt0.as
as --64 -o /usr/local/share/fpc-3.3.1/rtl/units/x86_64-freebsd/gprt0.o x86_64/gprt0.as
as --64 -o /usr/local/share/fpc-3.3.1/rtl/units/x86_64-freebsd/dllprt0.o x86_64/dllprt0.as
/usr/local/share/fpc-3.3.1/compiler/ppc1 -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../x86_64 -Fi../unix -Fi../bsd -Fi../bsd/x86_64 -Fi../freebsd/x86_64 -FE. -FU/usr/local/share/fpc-3.3.1/rtl/units/x86_64-freebsd -Cg -dx86_64 -dRELEASE  -Us -Sg ../bsd/system.pp
Error: Path "./" does not exist

--- End code ---

It looks like the FPC compiler does not understand the . (dot) directory -- but it does!

Typing gmake in the rtl subdirectory:


--- Code: ---/usr/local/bin/ppcx64 -Fi../inc -Fi../x86_64 -Fi../unix -Fi../bsd -Fi../bsd/x86_64 -Fi../freebsd/x86_64 -FE. -FU../../rtl/units/x86_64-freebsd -Cg -dx86_64 ../objpas/fpwidestring.pp
Free Pascal Compiler version 3.0.4 [2019/07/13] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: FreeBSD for x86-64
Compiling ../objpas/fpwidestring.pp
903 lines compiled, 0.1 sec
gmake[1]: Leaving directory '/usr/local/share/fpc-3.3.1/rtl/freebsd'

--- End code ---

First line, "-FE." and no complaints, everything is compiled.

So near and yet so far...

(FPC 3.0.4 builds without issues)

[Later: Ahh, I see the first compiler is a freshly compiled ppc1 whereas the second gmake is calling the installed (3.0.4) ppcx64. But why does ppc1 not understand dot directories?]

marcov:
Afaik this is because the llvm toolchain linker just drops what it doesn't know, and the resulting binaries are silently corrupted.

In this case the corruption probably hits something related to directory searching (or fpaccess, which is used for fileexists iirc). There primitives are used for expandfilename and friends, which is what yields the error you get.

trev:
I thought not using lld as the linker but using ld.bfd avoided the llvm linker issues?

marcov:

--- Quote from: trev on July 13, 2019, 04:11:06 pm ---I thought not using lld as the linker but using ld.bfd avoided the llvm linker issues?

--- End quote ---

Then I don't know. I built trunk on freebsd12 x86_64 in march and that went fine.

The only thing I can imagine is that I maybe  used brandelf to make the 3.0.4 compiler "native" though.

trev:

--- Code: ---trev@fbsd [/home/trev] $ file `which fpc`
/usr/local/bin/fpc: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, stripped

trev@fbsd [/home/trev] $ brandelf `which fpc`
File '/usr/local/bin/fpc' is of brand 'FreeBSD' (9).

trev@fbsd [/home/trev] $ file `which ppcx64`
/usr/local/bin/ppcx64: symbolic link to ../lib/fpc/3.0.4/ppcx64

trev@fbsd [/home/trev] $ file /usr/local/lib/fpc/3.0.4/ppcx64
/usr/local/lib/fpc/3.0.4/ppcx64: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, stripped

trev@fbsd [/home/trev] $ brandelf /usr/local/lib/fpc/3.0.4/ppcx64
File '/usr/local/lib/fpc/3.0.4/ppcx64' is of brand 'FreeBSD' (9).

--- End code ---

No need for brandelf, 3.0.4 was a locally compiled fpc from the FreeBSD ports collection which came with this bootstrap compiler binary:

-rwxr-xr-x  1 1106  493     3.2M 28 Nov  2017 ppcx64-3.0.4-freebsd

Hmmm.

Navigation

[0] Message Index

[#] Next page

Go to full version