[SOLVED] how to compile a project with fpc under ubuntu18.04 lazarus / 32-Linux ---------------------------------------------------------------------- senglit · 2022-02-28 06:32 hi all, I have a program(no-gui) which works under win10 and centos with lazarus. Today I copied this program into a embeded arm ubuntu18.04 device, in which I ran “sudo apt insall fpc-3.0.4” to install the newest version supported by apt. When I compile this progam I got an error like the attached img. I saw it can set dirs at option->directories, it's all empty in 4 tabs. But I don't know what should I fill in because I don't know where did ubuntu installed these files. what should I do now? ---------------------------------------------------------------------- senglit · 2022-02-28 06:39 It seems units, include, libraries, object and miscellaneous file can be written here. for now it's all empty. what should I fill in? ---------------------------------------------------------------------- Thaddy · 2022-02-28 06:43 file|new from template|program ---------------------------------------------------------------------- Hartmut · 2022-02-28 07:21 I'm not sure if I can help you. I installed FPC 3.0.4 on a normal desktop computer with Ubuntu 18.04 some years ago and the system unit on my computer is located here: /usr/lib/fpc/3.0.4/units/i386-linux/rtl/system.o /usr/lib/fpc/3.0.4/units/i386-linux/rtl/system.ppu /usr/lib/fpc/3.0.4/units/x86_64-linux/rtl/system.o /usr/lib/fpc/3.0.4/units/x86_64-linux/rtl/system.ppu If you don't find it there, you should search your disk for files system.o and system.ppu ---------------------------------------------------------------------- senglit · 2022-02-28 07:48 no template available  :'( should I install some other package except fpc-3.0.4? Quote from: Thaddy on February 28, 2022, 07:43:23 amfile|new from template|program ---------------------------------------------------------------------- senglit · 2022-02-28 08:04 there is no "fpc" folder under my /usr/lib. I did 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 root@htnice:~# find / -name system/dev/disk/by-label/system/lib/system d/system/run/systemd/system/sys/devices/system/etc/systemd/system  there is no fpc unit system on this device. it seems I must have missed some other packages. it's not enough to install only fpc-3.0.4 Quote from: Hartmut on February 28, 2022, 08:21:54 amI'm not sure if I can help you. I installed FPC 3.0.4 on a normal desktop computer with Ubuntu 18.04 some years ago and the system unit on my computer is located here: /usr/lib/fpc/3.0.4/units/i386-linux/rtl/system.o /usr/lib/fpc/3.0.4/units/i386-linux/rtl/system.ppu /usr/lib/fpc/3.0.4/units/x86_64-linux/rtl/system.o /usr/lib/fpc/3.0.4/units/x86_64-linux/rtl/system.ppu If you don't find it there, you should search your disk for files system.o and system.ppu ---------------------------------------------------------------------- Hartmut · 2022-02-28 08:17 Quote from: senglit on February 28, 2022, 09:04:04 amI did 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 root@htnice:~# find / -name system/dev/disk/by-label/system/lib/system d/system/run/systemd/system/sys/devices/system/etc/systemd/system  maybe you should run find / -name system.ppu ---------------------------------------------------------------------- senglit · 2022-02-28 09:15 Quote from: Hartmut on February 28, 2022, 09:17:08 amQuote from: senglit on February 28, 2022, 09:04:04 amI did 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 root@htnice:~# find / -name system/dev/disk/by-label/system/lib/system d/system/run/systemd/system/sys/devices/system/etc/systemd/system  maybe you should run find / -name system.ppu you are right! The ide will not search sub-folders so I added tens of unit and inc by hand... There are other errors reported by the compiler, which I didnot get on windows and centos(with lazarus, not fpc). at lest the relied-package problem is solved now. Thank you! ---------------------------------------------------------------------- senglit · 2022-02-28 09:36 I found the reason of the last 2 compiling errors: they are supported only by fpc since version 3.2.0. What I'm using on this arm-ubuntu is 3.0.4. So I need to upgrade the fpc version. the main problem "can not find unit/inc" is solved perfectly. Thanks to Hartmut and Thaddy! this thread is closed now. ---------------------------------------------------------------------- Hartmut · 2022-02-28 10:26 If you are going to install FPC 3.2.0 I have a suggestion for you: I too had tremendous problems to install FPC/Lazarus on Ubuntu before I got to know fpcupdeluxe. I strongly recommend to use this installation tool, if it runs on your system, what you have to check. One of it's many benefits is, that the complete installation is put in only one selectable destination folder. That means, that your installation is not scattered over uncountable system folders. This has big advantages, especially if you will have someday more than 1 different FPC/Lazarus versions parallel working. Wiki: https://wiki.freepascal.org/fpcupdeluxe Sub-Forum: https://forum.lazarus.freepascal.org/index.php/topic,34645.0.html