Lazarus 2.10 on Jetson nano Nvidia, Fails to compile lazarus / 1-Linux ---------------------------------------------------------------------- BlueIcaro · 2020-07-31 12:59 Hell, I trying to install lazarus 2.10 on a jetson nano nvidia. I downloaded fpc-3.2.0.arm-linux-on-aarch64.tar and installed. I run fpc and I got that I have fpc 3.2.0 Then I downloaded Lazarus source from svn: Quotesvn co https://svn.freepascal.org/svn/lazarus/branches/fixes_2_0/ lazarus_2_0Then into lazarus folder I run: Quote make clean all Also i tried: Quotemake clean bigideAnd Always I got the following error: QuoteFree Pascal Compiler version 3.2.0 [2020/06/05] for arm Copyright (c) 1993-2020 by Florian Klaempfl and others (1002) Target OS: Linux for ARMHF (3104) Compiling fcllaz.pas /home/jorge/lazarus/lazarus_2_0/packager/registration/fcllaz.pas(11,3) Fatal: (10022) Can't find unit db used by fcllaz Fatal: (1018) Compilation aborted Makefile:3154: recipe for target 'fcllaz.ppu' failed make[1]: *** [fcllaz.ppu] Error 1 make[1]: Leaving directory '/home/jorge/lazarus/lazarus_2_0/packager/registration' Makefile:3587: recipe for target 'registration' failed make: *** [registration] Error 2 Any Idea?. Thanks /BlueIcaro ---------------------------------------------------------------------- MarkMLl · 2020-07-31 13:07 > I downloaded fpc-3.2.0.arm-linux-on-aarch64.tar and installed. I run fpc and I got that I have fpc 3.2.0 ... > (1002) Target OS: Linux for ARMHF Is that combination intentional? MarkMLl ---------------------------------------------------------------------- BlueIcaro · 2020-07-31 14:19 Quote from: MarkMLl on July 31, 2020, 03:07:14 pm> I downloaded fpc-3.2.0.arm-linux-on-aarch64.tar and installed. I run fpc and I got that I have fpc 3.2.0 ... > (1002) Target OS: Linux for ARMHF Is that combination intentional? MarkMLl Do you want to say that I downloaded a wrong fpc package? No, I don't put any target OS, may be need it?. The OS is unbuntu 18.04LTS This is the info about cpu Quoteprocessor   : 0 model name   : ARMv8 Processor rev 1 (v8l) BogoMIPS   : 38.40 Features   : fp asimd evtstrm aes pmull sha1 sha2 crc32 CPU implementer   : 0x41 CPU architecture: 8 CPU variant   : 0x1 CPU part   : 0xd07 CPU revision   : 1 processor   : 1 model name   : ARMv8 Processor rev 1 (v8l) BogoMIPS   : 38.40 Features   : fp asimd evtstrm aes pmull sha1 sha2 crc32 CPU implementer   : 0x41 CPU architecture: 8 CPU variant   : 0x1 CPU part   : 0xd07 CPU revision   : 1 /Thanks ---------------------------------------------------------------------- TRon · 2020-07-31 14:29 Quote from: BlueIcaro on July 31, 2020, 04:19:28 pmI downloaded fpc-3.2.0.arm-linux-on-aarch64.tar and installed. I run fpc and I got that I have fpc 3.2.0 (1002) Target OS: Linux for ARMHF No, I don't put any target OS, may be need it?. The OS is unbuntu 18.04LTS Perhaps I missed something obvious. Since when is ubuntu same as aarch64 ? ---------------------------------------------------------------------- lucamar · 2020-07-31 14:57 Quote from: TRon on July 31, 2020, 04:29:03 pmQuote from: BlueIcaro on July 31, 2020, 04:19:28 pm.No, I don't put any target OS, may be need it?. The OS is unbuntu 18.04LTS Perhaps I missed something obvious. Since when is ubuntu same as aarch64 ? There was (is?) an Ubuntu for ARM flavor. I guess he means that, and that he has installed it in an aarch64 machine. The target then is Linux-aarch64, which is what the OP seems to have installed. What I don't know is whether armhf is equivalent to aarch64 Worth of note (maybe) is that the compiler in that tarball was built for ARMv7 (according to the readme) whereas you have got an ARMv8, but I've no idea whether that matters or not ... ---------------------------------------------------------------------- BlueIcaro · 2020-07-31 15:05 Hi, more info: uname -a : QuoteLinux Jorge-nano 4.9.140-tegra #1 SMP PREEMPT Thu Jun 25 21:25:44 PDT 2020 aarch64 aarch64 aarch64 GNU/Linux uname -m Quoteaarch64 ---------------------------------------------------------------------- TRon · 2020-07-31 15:41 Quote from: lucamar on July 31, 2020, 04:57:40 pmThere was (is?) an Ubuntu for ARM flavor. I guess he means that, and that he has installed it in an aarch64 machine. Did some quick research and indeed, something that I did not know is that there actually is a 64 bit arm version of 18.04. I was only able to locate the server version though. QuoteThe target then is Linux-aarch64, which is what the OP seems to have installed. What I don't know is whether armhf is equivalent to aarch64 Not perse. I have Raspbian32 (Debian derivative) running on my pi (pi which is able to run aarch64 OS but by default runs a 32-bit OS). So, the capabilities are there just not by default. afaik that is a decision made by pi foundation, to stay as compatible to their previous hw/sw mix as long as possible. Even their rebranded pi OS that is offered is 32 bit. QuoteWorth of note (maybe) is that the compiler in that tarball was built for ARMv7 (according to the readme) whereas you have got an ARMv8, but I've no idea whether that matters or not ... That should not matter. It is similar as for instance endianess. e.g. the Pi is able to "run" in both endian modes. In that regards it is similar as "running" a pi in 64 bit mode. It could be the compiler opted for arm target by default and an explicit option for targeting aarch64 should be provided. It makes sense in that you are then able to run the compiler anywhere without the actual need to setup the aarch64 target,. However in that case  you could expect these kind of errors as units are located in the wrong location (depending on your configuration settings). Unfortunately I have no experience with running aarch64. edit: it just hit me that user BlueIcaro did not mentioned which fpc version he installed. Seeing the post below, now we know ---------------------------------------------------------------------- BlueIcaro · 2020-07-31 15:42 Hello, I installed fpc-3.2.0.aarch64-linux I got a new error, may be missing some  lib in linux Quote/usr/bin/ld: cannot find -lgdk-x11-2.0 /usr/bin/ld: cannot find -lgtk-x11-2.0 /usr/bin/ld: cannot find -lpango-1.0 /usr/bin/ld: cannot find -lcairo /usr/bin/ld: cannot find -latk-1.0 But this error comes when linking. /BlueIcaro ---------------------------------------------------------------------- PascalDragon · 2020-07-31 15:47 Did you install the corresponding development packages for GTK? sudo apt-get install gtk2-dev or something like that. ---------------------------------------------------------------------- BlueIcaro · 2020-07-31 15:59 Quote from: PascalDragon on July 31, 2020, 05:47:29 pmDid you install the corresponding development packages for GTK? sudo apt-get install gtk2-dev or something like that. I don't find in google which files I need. ( A long week working!!). I installed lazarus 1.8 from repository. So packages was installed. Then I compile, and it's works. Now I missed the source file of FPC, but is not a big deal. But your solution is better @PascalDragron. I'll try on monday, and if it's works, I should write a wiki article. I want install lazarus in a jetson nano, becauce in my work we are going some products with it (secret for the moment). The first option is programing in Python. After one week reading and watching videos, python is not for a serius app. The next step, may  optional, is make a crosscompile, because jetson nano is little bit slow with GUI, like raspberry pi, jetson is faster but not to make a big project. And our aplication will without graphical enviroment. Other idea, is make a remote debuging, but I don't know if we can do it. I have to spend more time searching info. Thanks /Blueicaro ---------------------------------------------------------------------- MarkMLl · 2020-07-31 16:34 Quote from: BlueIcaro on July 31, 2020, 05:59:24 pmBut your solution is better @PascalDragron. I'll try on monday, and if it's works, I should write a wiki article. https://wiki.freepascal.org/GTK2_Interface#Quick_start_guide_for_Linux .2C_FreeBSD.2C_etc I'm afraid that most Linux etc. distreaux assume that users are aware of the fact that they have to install relevant -dev packages, and that was a fairly straightforward one. I assure you that it could have been worse: you might have ended up with some sort of complex bootstrapping scenario where you not only had to install -dev packages but also had to get involved with multiarch or explicit cross-compilation. MarkMLl ---------------------------------------------------------------------- lucamar · 2020-07-31 17:19 Quote from: BlueIcaro on July 31, 2020, 05:59:24 pmOther idea, is make a remote debuging, but I don't know if we can do it. I have to spend more time searching info. Should be doable; the Nano has both ethernet and USB ports and the SDK seems to include a full GDB install. IMHO, it's not easy (nothing seems to be when talking about GDB ) but shouldn't be too difficult either. You might find useful the wiki page on Remote Debugging, among others. ---------------------------------------------------------------------- BlueIcaro · 2020-08-03 09:53 Hello, finally here is the instructions to run Lazarus 2.10 on Nvidia Jetson nano: Update your system:     sudo apt update     sudo apt upgrade Install svn version:    sudo apt install subversion Install packages:   sudo apt install gtk+2.0 Download: fpc-3.2.0.aarch64-linux.tar and install it. Download lazarus:   svn co https://svn.freepascal.org/svn/lazarus/branches/fixes_2_0/ lazarus_2_0 Compile lazarus:    make clean all download fpc-sources, and unpack in the same directory where is installed your lazarus run lazarus:   ./starlazarus Enyoy! /BlueIcaro ---------------------------------------------------------------------- MarkMLl · 2020-08-03 10:14 Quote from: BlueIcaro on August 03, 2020, 11:53:16 amDownload lazarus:   svn co https://svn.freepascal.org/svn/lazarus/branches/fixes_2_0/ lazarus_2_0 For the record, what version doe Lazarus report? QuoteCompile lazarus:    make clean all or  make clean bigide  to get the fancy stuff. Quotedownload fpc-sources, and unpack in the same directory where is installed your lazarus I'm not sure what best practice is here. Perhaps  ...lazarus/fpcsrc  etc., but I think that needs to be spelled out in case somebody is temped to "flatten" the source tree. I practice I normally put different lazarus versions in /usr/local/share/lazarus-trunk etc., and I keep the FPC sources completely separate in /usr/local/src_fpc/3.0.4 and so on. Quoterun lazarus:   ./starlazarus Typo there :-) In practice I believe that  ./lazarus  is adequate, unless things have changed  startlazarus  is a "helper" for when the IDE is rebuilt. MarkMLl ---------------------------------------------------------------------- dbannon · 2020-08-03 12:40 Quote from: BlueIcaro on July 31, 2020, 05:59:24 pmQuote from: PascalDragon on July 31, 2020, 05:47:29 pmDid you install the corresponding development packages for GTK? sudo apt-get install gtk2-dev or something like that. I don't find in google which files I need. ( A long week working!!). I installed lazarus 1.8 from repository. So packages was installed. Then I compile, and it's works. Now I missed the source file of FPC, but is not a big deal. But your solution is better @PascalDragron. I'll try on monday, and if it's works, I should write a wiki article. ..... If you have installed FPC from a package (and 3.0.4 I assume) you should also install the FPC-src from the same source. Its just an apt command.  If you put FPC on with the excellent tar ball method, there are tarballs of the src, one level up on the web page. https://wiki.freepascal.org/Installing_Lazarus_on_Linux#Build_Lazarus_ from_Source lists (in particular GTK2-dev) the dependencies you needed to install.  Davo ---------------------------------------------------------------------- MarkMLl · 2020-08-03 14:25 If a distro installs Lazarus but doesn't install its developer dependencies I'd argue that it's a distro-level problem. As standard on Debian, I install these in preparation for building FPC build-essential gdb subversion libncursesw5-dev libncurses5-dev libgpm-dev as well as possibly libpq-dev etc., and these for Lazarus libgtk2.0-dev libqt4pas-dev libqt5pas-dev and that's about it. MarkMLl