Issues with Free Pascal Compiler version 3.2.2+dfsg-9ubuntu1 in Ubuntu 22.04 lazarus / 1-Linux ---------------------------------------------------------------------- bloxorz · 2023-03-10 19:10 Hi, I have tried to compile the saludar.pas program in Ubuntu 22.04 and received the following errors: (3,1): Fatal: Can't find unit system used by Saludar. (0): Fatal: Compilation aborted. Error: /usr/bin/ppcx64 returned an error exitcode. ---------------------------------------------------------------------- Bogen85 · 2023-03-10 19:20 Quote from: bloxorz on March 10, 2023, 08:10:13 pmHi, I have tried to compile the saludar.pas program in Ubuntu 22.04 and received the following errors: (3,1): Fatal: Can't find unit system used by Saludar. (0): Fatal: Compilation aborted. Error: /usr/bin/ppcx64 returned an error exitcode. Can you attach the program or include it in a code block? Also, if the source file is not in an empty directory, could you include a listing of the files in that directory? If you get the same error message when the source file is in an empty directory, then the file listing is not needed. ---------------------------------------------------------------------- bloxorz · 2023-03-10 20:08 Sure, Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i PROGRAM Saludar; BEGINwrite('hola mundo');END.  What's a source file? My program is located in the home directory. ---------------------------------------------------------------------- tetrastes · 2023-03-10 20:11 Quote from: bloxorz on March 10, 2023, 08:10:13 pmHi, I have tried to compile the saludar.pas program in Ubuntu 22.04 and received the following errors: (3,1): Fatal: Can't find unit system used by Saludar. (0): Fatal: Compilation aborted. Error: /usr/bin/ppcx64 returned an error exitcode. How did you install fpc? ---------------------------------------------------------------------- bloxorz · 2023-03-10 20:53 I downloaded fpc-3.2.0-x86_64-linux.tar into a folder called tmp. Then I used the command tar -xvf to extract the files. Then I did cd fpc-3.2.0.x86_64-linux and ./install.sh, PATH=~/fpc-3.2.2/bin:$PATH, then echo 'PATH=~/fpc-3.2.2/bin:$PATH' >> ~/.profile. This is my path file: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i /home/felip e/fpc- 3.2.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin :/usr/games:/usr/local/games:/snap/bin:/snap/bin  After that I did sudo apt install fp-compiler-3.2.2 and then sudo apt install fp-ide-3.2.2 ---------------------------------------------------------------------- tetrastes · 2023-03-10 21:25 So you messed two installations. Try to apt purge those you installed by apt. ---------------------------------------------------------------------- Fred vS · 2023-03-10 21:48 Quote from: bloxorz on March 10, 2023, 08:10:13 pm(3,1): Fatal: Can't find unit system used by Saludar. Hello. Check your fpc.cfg file used by /usr/bin/ppcx64. It is probably located in /etc/fpc.cfg Edit it and adapt the -Fu's with the path where fpc-compiled units are installed. Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i # searchpath for units and other system dependent things Save it and re-try. ---------------------------------------------------------------------- bloxorz · 2023-03-10 23:56 QuoteEdit it and adapt the -Fu's with the path where fpc-compiled units are installed. I was able to get to the file you told me, but I don't understand how to adapt the Fu's you mention. What do you mean with fpc-compiled units? Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i # searchpath for units and other system dependent things- Fu/usr/lib/x86_64-linux-gnu/fpc/$fpcversion/units/$fpctarget- Fu/usr/lib/x86_64-linux- gnu/fpc/$fpcversion/units/$fpctarget/*-Fu/usr/lib/x86_64-linux- gnu/fpc/$fpcversion/units/$fpctarget/rtl ---------------------------------------------------------------------- TRon · 2023-03-11 00:16 Quote from: bloxorz on March 11, 2023, 12:56:27 amI was able to get to the file you told me, but I don't understand how to adapt the Fu's you mention. What do you mean with fpc-compiled units? The latter refers to files that have the extension ppu. Does your system actually have a path "/usr/lib/x86_64-linux- gnu/fpc/3.2.2/units/x86_64-linux" ? Try to locate where the path actually is and then modify the -Fu entries accordingly. You can use the $fpcversion and $fpctarget macros to replace the actual version (3.2.2) and target (x86_64-linux) of your installed compiler. edit BTW: Quote from: bloxorz on March 10, 2023, 09:53:46 pmI downloaded fpc-3.2.0-x86_64-linux.tar into a folder called tmp. Then I used the command tar -xvf to extract the files. Then I did cd fpc-3.2.0.x86_64-linux and ./install.sh, PATH=~/fpc-3.2.2/bin:$PATH, then echo 'PATH=~/fpc-3.2.2/bin:$PATH' >> ~/.profile. Is the name of the tar file you downloaded a typo (3.2.0) ? QuoteThis is my path file: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i /home/felip e/fpc- 3.2.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin :/usr/games:/usr/local/games:/snap/bin:/snap/bin ... because if it is not a typo then you have used the wrong path. QuoteAfter that I did sudo apt install fp-compiler-3.2.2 and then sudo apt install fp-ide-3.2.2 And mismatching versions that way is probably going to be ugly. ---------------------------------------------------------------------- bloxorz · 2023-03-11 02:20 QuoteIs the name of the tar file you downloaded a typo (3.2.0) ? No, in fact the installer version is 3.2.0 in SourceForge: http://sourceforge.net/projects/freepascal/files/Linux/3.2.2 QuoteTry to locate where the path actually is and then modify the -Fu entries accordingly. Like this? Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i # searchpath for units and other system dependent things- Fu/usr/lib/x86_64-linux-gnu/fpc/3.2.2/units/x86_64-linux- Fu/usr/lib/x86_64-linux- gnu/fpc/3.2.2/units/x86_64-linux/*-Fu/usr/lib/x86_64-linux- gnu/fpc/3.2.2/units/x86_64-linux/rtl  Quote... because if it is not a typo then you have used the wrong path. Do I need to edit the path? ---------------------------------------------------------------------- TRon · 2023-03-11 02:39 Quote from: bloxorz on March 11, 2023, 03:20:08 amQuoteIs the name of the tar file you downloaded a typo (3.2.0) ? No, in fact the installer version is 3.2.0 in SourceForge: http://sourceforge.net/projects/freepascal/files/Linux/3.2.2 .... and the file located there is named "fpc-3.2.2.x86_64-linux.tar" and not " fpc-3.2.0-x86_64-linux.tar" These are two completely different tar files. QuoteLike this? No, not exactly You need to locate where you installed the unit files (you have installed FPC on your system and I have no clue what location you used to install the complementary unit files). The location where those files are located is named a path (not to confuse with a system search path that is used for searching directories in order to locate executable files). QuoteDo I need to edit the path? The -Fu paths located in the fpc.cfg file, yes in case that location does not match the location where your units files are actually located. You do not need to replace the version number and target macro's, only point -Fu to the correct location (path) where your units are located (where you have installed them to). But the point of that remark was that if you actually used the 3.2.0 tar archive and also have FPC 3.2.2 installed that things are becoming a bit messy. It is currently not even clear if you installed 3.2.0 and 3.2.2 together (one using the package manager of your distribution and the other using the tar archive and installed into your home directory) because something like that is not going to work. edit: and I am a bit slow as user tetrastes already figured that so please follow his suggestion.