Closed michael-ring closed 3 years ago
After som e more investigation it looks like the problem comes from one of the more recent changes and is in fact worse than I thought:
The message I saw while building was this one:
fpcupdeluxe: WARNING: Removing -CaEABI crosscompiler option: not allowed for ARMHF FPC < 3.3 !
This causes an issue because now, when building armv6m or arm7m compilers ABI is reset to 'default' and there is no 'default' directory in the unit-directories for arm-embedded.
So compiler does not find it's units anymore.
You simply cannot remove the parameter for trunk compilers, it completely breaks the $fpcabi interface.
Here's part of my fpcdebug.txt file:
00020000:(11033) Interpreting file option "#IFDEF FPC_CROSSCOMPILING"
00020000:(11033) Interpreting file option "#IFDEF EMBEDDED"
00020000:(11033) Interpreting file option "#IFDEF CPUARM"
00020000:(11033) Interpreting file option "#IFDEF CPUARMV6M"
00020000:(11033) Interpreting file option "#ENDIF CPUARMV6M"
00020000:(11028) Handling option "-FD/Users/ring/fpcupdeluxe/cross/bin/arm-embedded/"
00020000:(11032) Interpreting option "-FD/Users/ring/fpcupdeluxe/cross/bin/arm-embedded/"
00020000:(11028) Handling option "-XParm-none-eabi-"
00020000:(11032) Interpreting option "-XParm-none-eabi-"
00020000:(11028) Handling option "-Fl/Users/ring/fpcupdeluxe/cross/lib/arm-embedded/armv6m/default/"
00020000:(11032) Interpreting option "-Fl/Users/ring/fpcupdeluxe/cross/lib/arm-embedded/armv6m/default/"
00008000:Path "/Users/ring/fpcupdeluxe/cross/lib/arm-embedded/armv6m/default/" not found
When I use fpcupdeluxe 1.8.2m (last version before o that is now visible under 'n') all is back to normal:
00020000:(11028) Handling option "-CaEABI"
00020000:(11032) Interpreting option "-CaEABI"
00020000:(11033) Interpreting file option "#ENDIF CPUARMV6M"
00020000:(11033) Interpreting file option "#IFDEF CPUARMV7EM"
00020000:(11033) Interpreting file option "#ENDIF CPUARMV7EM"
00020000:(11033) Interpreting file option "#IFDEF CPUARMV7M"
00020000:(11033) Interpreting file option "#ENDIF CPUARMV7M"
00020000:(11028) Handling option "-FD/Users/ring/fpcupdeluxe/cross/bin/arm-embedded/"
00020000:(11032) Interpreting option "-FD/Users/ring/fpcupdeluxe/cross/bin/arm-embedded/"
00020000:(11028) Handling option "-XParm-none-eabi-"
00020000:(11032) Interpreting option "-XParm-none-eabi-"
00020000:(11028) Handling option "-Fl/Users/ring/fpcupdeluxe/cross/lib/arm-embedded/armv6m/eabi/"
00020000:(11032) Interpreting option "-Fl/Users/ring/fpcupdeluxe/cross/lib/arm-embedded/armv6m/eabi/"
00020000:(11028) Handling option "-Fu/Users/ring/fpcupdeluxe/fpc/units/arm-embedded/armv6m/eabi/rtl"
00020000:(11032) Interpreting option "-Fu/Users/ring/fpcupdeluxe/fpc/units/arm-embedded/armv6m/eabi/rtl"
00020000:(11028) Handling option "-Fu/Users/ring/fpcupdeluxe/fpc/units/arm-embedded/armv6m/eabi/packages"
fpcupdeluxe: WARNING: Removing -CaEABI crosscompiler option: not allowed for ARMHF FPC < 3.3 !
First, this should not happen with FPC trunk ! So this needs to be investigated. Second. Some time ago, we decided to use -dFPC_ARMHF as a default setting. Making it necessary to add -CaEABI when not using this hardfloat ABI. However, -CaEABI is only available for FPC trunk. That is why it must be removed. Its an illegal option for everything below trunk. I guess the version detection of FPC is not done correct by fpcupdeluxe.
I guess the version detection of FPC is not done correct by fpcupdeluxe.
So, what I need is the output when building the cross-compiler for arm embedded.
Cannot build at all atm, no bootstrapping compiler available (With latest fpcupdeluxe-n downloaded a few moments ago:
fpcupdeluxe: info: FPCNativeInstaller (GetModule: FPC): FPC was at revision: unknown fpcupdeluxe: info: FPCNativeInstaller (GetModule: FPC): FPC is now at revision: 49109 fpcupdeluxe: info: FPCNativeInstaller (GetModule: FPC): No FPC patches defined. fpcupdeluxe: info: FPCNativeInstaller (BuildModule: FPC): Building module FPC... fpcupdeluxe: info: FPC native builder: Detected source version FPC (source): 3.3.1 fpcupdeluxe: info: FPCNativeInstaller (BuildModule: FPC): To compile this FPC, we need (required) a compiler with version 3.2.0 or 3.2.2 fpcupdeluxe: info: FPCNativeInstaller (CheckAndGetTools): Looking for official FPC bootstrapper with version 3.2.2 fpcupdeluxe: info: FPCNativeInstaller (CheckAndGetTools): Now looking for a better [version] bootstrap compiler from Github FPCUP(deluxe) releases. fpcupdeluxe: info: FPCNativeInstaller (CheckAndGetTools): Looking online for a FPCUP(deluxe) bootstrapper with name: fpcup-3_2_2-x86_64-darwin-ppcx64 fpcupdeluxe: ERROR: FPCNativeInstaller (CheckAndGetTools): No bootstrapper local and online. Fatal. Stopping. Found valid make application. fpcupdeluxe: ERROR: FPCNativeInstaller (BuildModuleCustom: FPC): FPC bootstrap version error: 0.0.0 ! Should never happen: expect many errors !! fpcupdeluxe: info: FPCNativeInstaller (BuildModuleCustom: FPC): Running CleanModule once more before building FPC from sources, due to previous CleanModule failure. fpcupdeluxe: info: FPCNativeInstaller (CleanModule: FPC): Running distclean failed: could not find cleanup compiler. Will try again later fpcupdeluxe: info: FPCNativeInstaller (CleanModule: FPC): Now building FPC revision 49109 fpcupdeluxe: Executing: /usr/bin/make --jobs=16 FPMAKEOPT=--threads=16 PP=/Users/ring/fpcupdeluxe-test/fpcbootstrap/ppcx64 FPCMAKE=/Users/ring/fpcupdeluxe-test/fpc/bin/x86_64-darwin/fpcmake PPUMOVE=/Users/ring/fpcupdeluxe-test/fpc/bin/x86_64-darwin/ppumove PREFIX=/Users/ring/fpcupdeluxe-test/fpc INSTALL_PREFIX=/Users/ring/fpcupdeluxe-test/fpc FPCDIR=/Users/ring/fpcupdeluxe-test/fpcsrc INSTALL_BINDIR=/Users/ring/fpcupdeluxe-test/fpc/bin/x86_64-darwin OS_SOURCE=darwin CPU_SOURCE=x86_64 OS_TARGET=darwin CPU_TARGET=x86_64 OVERRIDEVERSIONCHECK=1 REVSTR=49109 REVINC=force OPT=-Fl/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -WM10.8 -Sg -vw-n-h-l-d-u-t-p-c- --directory=/Users/ring/fpcupdeluxe-test/fpcsrc all install (working dir: /Users/ring/fpcupdeluxe-test/fpcsrc) Makefile:135: *** Compiler /Users/ring/fpcupdeluxe-test/fpcbootstrap/ppcx64 not found. Stop.
fpcupdeluxe: ERROR: FPCNativeInstaller (CleanModule: FPC): Error running /usr/bin/make for FPC failed with exit code 512 . Details:
The Makefile of FPC trunk has changed. It now point to the yet to be released non existing FPC 3.2.2 for bootstrapping. Will update fpcupdeluxe to handle this.
Great to see FPC 3.2.2 is almost out (some issues remaining, though). Waiting for its activation in FpcUpDeluxe!
I also noted that FPC 3.2.0 is included in the upcoming Debian 11. Good to know that we could build mORMot for instance out-of-the-box with a distribution fpc compiler.
Latest release might solve ([m]any) issues !! https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/1.8.2p Please test.
Tried on aarch64-darwin, unfortunately does not work. Building embedded+lazarus workes just fine, building crosscompiler for armv6m fails immediately. I get fpcupdeluxe: Got an unexpected exception ... don't know what to do unfortunately
Here's all the log I have: Going to install a cross-compiler from available sources. Fpcupdeluxe: FPC cross-builder: Building compiler for embedded-arm (OPT: -dFPC_ARMHF) [CROSSOPT: -CaEABI ] {SUBARCH: armv6m}. FPCUP(deluxe) is starting up.
FPCupdeluxe basedir: /Users/ring/fpcupdeluxe-test Bootstrap dir: /Users/ring/fpcupdeluxe-test/fpcbootstrap
FPC URL: https://github.com/michael-ring/freepascal.git FPC source directory: /Users/ring/fpcupdeluxe-test/fpcsrc FPC install directory: /Users/ring/fpcupdeluxe-test/fpc FPC options: -dFPC_ARMHF
Lazarus URL: https://github.com/graemeg/lazarus.git Lazarus source directory: /Users/ring/fpcupdeluxe-test/lazarus Lazarus install directory: /Users/ring/fpcupdeluxe-test/lazarus Lazarus options: -g -gl -O1
Please stand back and enjoy !
13-4-21 22:40:26: fpcupdeluxe: V328 (20210409) started. FPCUPdeluxe V1.8.2p for aarch64-darwin running on macOS 11.2.3
Found valid bsdtar application. Found valid make application. fpcupdeluxe: info: FPCCrossInstaller (CleanModule: FPC): Running make compiler_distclean,rtl_distclean twice for target arm-embedded fpcupdeluxe: Executing: /usr/bin/make --jobs=8 FPMAKEOPT=--threads=8 FPC=/Users/ring/fpcupdeluxe-test/fpc/bin/aarch64-darwin/ppca64 --directory=/Users/ring/fpcupdeluxe-test/fpcsrc FPCMAKE=/Users/ring/fpcupdeluxe-test/fpc/bin/aarch64-darwin/fpcmake PPUMOVE=/Users/ring/fpcupdeluxe-test/fpc/bin/aarch64-darwin/ppumove FPCDIR=/Users/ring/fpcupdeluxe-test/fpcsrc PREFIX=/Users/ring/fpcupdeluxe-test/fpc INSTALL_PREFIX=/Users/ring/fpcupdeluxe-test/fpc INSTALL_BINDIR=/Users/ring/fpcupdeluxe-test/fpc/bin/aarch64-darwin OS_TARGET=embedded CPU_TARGET=arm SUBARCH=armv6m compiler_distclean rtl_distclean (working dir: /Users/ring/fpcupdeluxe-test/fpcsrc) /Library/Developer/CommandLineTools/usr/bin/make -C compiler distclean /Library/Developer/CommandLineTools/usr/bin/make -C rtl distclean /Library/Developer/CommandLineTools/usr/bin/make -C utils cleanall /Library/Developer/CommandLineTools/usr/bin/make -C embedded cleanall /Library/Developer/CommandLineTools/usr/bin/make -C utils distclean /Library/Developer/CommandLineTools/usr/bin/make -C embedded distclean fpcupdeluxe: Executing: /usr/bin/make --jobs=8 FPMAKEOPT=--threads=8 FPC=/Users/ring/fpcupdeluxe-test/fpc/bin/aarch64-darwin/ppca64 --directory=/Users/ring/fpcupdeluxe-test/fpcsrc FPCMAKE=/Users/ring/fpcupdeluxe-test/fpc/bin/aarch64-darwin/fpcmake PPUMOVE=/Users/ring/fpcupdeluxe-test/fpc/bin/aarch64-darwin/ppumove FPCDIR=/Users/ring/fpcupdeluxe-test/fpcsrc PREFIX=/Users/ring/fpcupdeluxe-test/fpc INSTALL_PREFIX=/Users/ring/fpcupdeluxe-test/fpc INSTALL_BINDIR=/Users/ring/fpcupdeluxe-test/fpc/bin/aarch64-darwin OS_TARGET=embedded CPU_TARGET=arm SUBARCH=armv6m compiler_distclean rtl_distclean (working dir: /Users/ring/fpcupdeluxe-test/fpcsrc) /Library/Developer/CommandLineTools/usr/bin/make -C compiler distclean /Library/Developer/CommandLineTools/usr/bin/make -C rtl distclean /Library/Developer/CommandLineTools/usr/bin/make -C utils cleanall /Library/Developer/CommandLineTools/usr/bin/make -C embedded cleanall /Library/Developer/CommandLineTools/usr/bin/make -C utils distclean /Library/Developer/CommandLineTools/usr/bin/make -C embedded distclean Building cross-tools failed. Aborting.
Same result on darwin-x86_64
You slayed one bug-beast but the next one was just arround the corner....
On first view all now works fine, all cross-compilers can be built again and the issue with eabi seems to be fixed for building trunk-ish crosscompilers.
But....
When I build cross-compiler for arm6m, then armv7m the armv6m directory gets deleted so I currently cannot have more than one subarch a time.
That a good one Michael. Will solve !! Ps: I have my first industrial application running on Wio Terminal. FreeRTOS + FPC is such a pleasure Thanks very much again !!!!!
I will return to FreeRTOS + Wio + Pico + (perhaps) M5 Core 2 hopefully soon, still have a small pile of displays here that I want to make work with Pico, when they all work I will add the code to FreeRTOS...
Glad to hear that FreeRTOS Bindings are stable enough to work in a production environment...
And again my request. https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/1.8.2r
M5 Core 2 is also very nice !!
Looks fixed, no more bug beasts eating away poor little directories, thank you very much!
Disregard first message, I looked deeper today, problem is in 2nc comment....
I just updated embedded to be in sync with current fpc trunk. After that I rebuilt fpc + lazarus in fpcupdeluxe.
The I went to Cross Tab and hit 'update all'
Seemed to work but I saw an error message about -CaEABI not beeing compatible with something <3.3 when armv6m was rebuilt.
then I ran my testsuite for pico-fpcexamples and all builds failed:
I checked fpc.cfg and all looked fine:
-Fu/Users/ring/fpcupdeluxe/fpc/units/arm-embedded/$FPCSUBARCH/$FPCABI/rtl
So FPCABI was set, but obviously not used.
I then manually selected arm embedded and armv6m as subarch and built a fresh compiler, after doing that the problem was gone.
So I guess something is not properly configured when the update builds are done.