Recent

Author Topic: Fatal: Can't find unit system used by xyz?!  (Read 627 times)

coradi

  • Full Member
  • ***
  • Posts: 165
Fatal: Can't find unit system used by xyz?!
« on: September 21, 2024, 08:39:45 pm »
New installed FPC on Linux, I got this:-(
Amstrad Schneider CPC 6128
AVR8/ARM(STM32)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11935
  • FPC developer.
Re: Fatal: Can't find unit system used by xyz?!
« Reply #1 on: September 21, 2024, 08:55:28 pm »
Something wrong with the configuration file (/etc/fpc.cfg or ~/fpc.cfg), most notably the -Fu line that points to precompiled units.

coradi

  • Full Member
  • ***
  • Posts: 165
Re: Fatal: Can't find unit system used by xyz?!
« Reply #2 on: September 21, 2024, 08:59:01 pm »
# Automatically created file, don't edit.
#IFDEF NORMAL
 -TLinux
 -Mfpc
 -Sg
 -Ci
 -CpATHLON64
 -OpATHLON64
 -Fu/usr/lib/fpc/$fpcversion\units\$fpctarget
 -Fu/usr/lib/fpc/$fpcversion\units\$fpctarget\*
 -Fu/usr/lib/fpc/$fpcversion\units\$fpctarget\rtl
 -Fl/usr/lib/gcc/x86_64-linux-gnu/11
 -Fl/usr/lib/gcc/x86_64-linux-gnu/11
 -XS
 -g-
 -p-
 -b-
 
 -O1
#ENDIF

#IFDEF DEBUG
 -TLinux
 -Mfpc
 -Sg
 -Cr
 -Ci
 -Co
 -CpATHLON64
 -OpATHLON64
 -Fu/usr/lib/fpc/$fpcversion\units\$fpctarget
 -Fu/usr/lib/fpc/$fpcversion\units\$fpctarget\*
 -Fu/usr/lib/fpc/$fpcversion\units\$fpctarget\rtl
 -Fl/usr/lib/gcc/x86_64-linux-gnu/11
 -Fl/usr/lib/gcc/x86_64-linux-gnu/11
 -XS
 -g
 -p-
 -b-
#ENDIF

#IFDEF RELEASE
 -TLinux
 -Mfpc
 -Sg
 -CpATHLON64
 -OpATHLON64
 -Fu/usr/lib/fpc/$fpcversion\units\$fpctarget
 -Fu/usr/lib/fpc/$fpcversion\units\$fpctarget\*
 -Fu/usr/lib/fpc/$fpcversion\units\$fpctarget\rtl
 -Fl/usr/lib/gcc/x86_64-linux-gnu/11
 -Fl/usr/lib/gcc/x86_64-linux-gnu/11
 -XS
 -g-
 -p-
 -b-
 
 -O2
#ENDIF
Amstrad Schneider CPC 6128
AVR8/ARM(STM32)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11935
  • FPC developer.
Re: Fatal: Can't find unit system used by xyz?!
« Reply #3 on: September 21, 2024, 09:00:37 pm »
What actually gave that message? I assumed a commandline compiler, but did you by any chance tried the textmode IDE ?

coradi

  • Full Member
  • ***
  • Posts: 165
Re: Fatal: Can't find unit system used by xyz?!
« Reply #4 on: September 21, 2024, 09:01:16 pm »
I use the texmode FPC

And Free Pascal Deluxe do(this seems to work, but not the TEXT FPC)

Compile package FCL 1.0.1: Success, Hints: 2
Hint: Start of reading config file /home/ssalbach/fpcupdeluxe/fpc/bin/x86_64-linux/fpc.cfg
Hint: End of reading config file /home/ssalbach/fpcupdeluxe/fpc/bin/x86_64-linux/fpc.cfg
Verbose: Free Pascal Compiler version 3.2.2-r0d122c49 [2024/09/21] for x86_64
Verbose: Copyright (c) 1993-2021 by Florian Klaempfl and others
Verbose: Target OS: Linux for x86-64
Verbose: Compiling fcllaz.pas
Verbose: Compiling lazaruspackageintf.pas
Verbose: 124 lines compiled, 0.1 sec
Verbose: 2 hint(s) issued
Compile package LazUtils 1.0: Success, Warnings: 5, Hints: 361
Hint: Start of reading config file /home/ssalbach/fpcupdeluxe/fpc/bin/x86_64-linux/fpc.cfg
Hint: End of reading config file /home/ssalbach/fpcupdeluxe/fpc/bin/x86_64-linux/fpc.cfg
Verbose: Free Pascal Compiler version 3.2.2-r0d122c49 [2024/09/21] for x86_64
Verbose: Copyright (c) 1993-2021 by Florian Klaempfl and others
Verbose: Target OS: Linux for x86-64
Verbose: Compilin
« Last Edit: September 21, 2024, 09:04:38 pm by coradi »
Amstrad Schneider CPC 6128
AVR8/ARM(STM32)

coradi

  • Full Member
  • ***
  • Posts: 165
Re: Fatal: Can't find unit system used by xyz?!
« Reply #5 on: September 21, 2024, 09:07:07 pm »
Oh now, The Gui Version write the same
Project: Executing command before: Exit code 1, Errors: 1
Verbose: Free Pascal Compiler version 3.2.2+dfsg-9ubuntu1 [2022/04/11] for x86_64
Verbose: Copyright (c) 1993-2021 by Florian Klaempfl and others
Debug: Target OS: Linux for x86-64
program1.pas Progress: Compiling /home/ssalbach/.cache/instantfpc/program1.pas
Fatal: Can't find unit system used by Program
Verbose: Compilation aborted
Verbose: /usr/bin/ppcx64 returned an error exitcode
Debug:
Amstrad Schneider CPC 6128
AVR8/ARM(STM32)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11935
  • FPC developer.
Re: Fatal: Can't find unit system used by xyz?!
« Reply #6 on: September 21, 2024, 09:10:25 pm »
The textmode IDE needs to configured separately. Normally a distro package would prepare that, but just go to options->directories and then in the "units' tab put something like


 -Fu/usr/lib/fpc/$fpcversion\units\$fpctarget
 -Fu/usr/lib/fpc/$fpcversion\units\$fpctarget\*
 -Fu/usr/lib/fpc/$fpcversion\units\$fpctarget\rtl

coradi

  • Full Member
  • ***
  • Posts: 165
Re: Fatal: Can't find unit system used by xyz?!
« Reply #7 on: September 21, 2024, 09:12:12 pm »
?? What is differend tom the existed Version from top?
It seems the same
Amstrad Schneider CPC 6128
AVR8/ARM(STM32)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11935
  • FPC developer.
Re: Fatal: Can't find unit system used by xyz?!
« Reply #8 on: September 21, 2024, 09:16:05 pm »
The textmode IDE has its own configuration and doesn't read fpc.cfg

The *.cfg generator also has a textmode IDE part, but apparently it isn't called for your distro's package.

coradi

  • Full Member
  • ***
  • Posts: 165
Re: Fatal: Can't find unit system used by xyz?!
« Reply #9 on: September 21, 2024, 09:18:52 pm »
ahh,  I have different FPC on my system.
The FPC in FPC Deluxe works well, now only the lazarus in FPC Deluxe have the same error
Amstrad Schneider CPC 6128
AVR8/ARM(STM32)

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Fatal: Can't find unit system used by xyz?!
« Reply #10 on: September 22, 2024, 07:14:09 am »
From what I have seen, this problem [sometimes|usually] relates to an unexpected fpc.cfg somewhere. Or an unreadable one on Windows (because of inappropriate coding, I spent a few hours there yesterday!).

Given the frequency of this problem, displaying the path to fpc.cfg on a fpc -h page would be cool as would showing it in the Options page for Lazarus.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

 

TinyPortal © 2005-2018