Recent

Author Topic: Lazarus 2.10 on Jetson nano Nvidia, Fails to compile  (Read 1040 times)

BlueIcaro

  • Hero Member
  • *****
  • Posts: 601
Lazarus 2.10 on Jetson nano Nvidia, Fails to compile
« on: July 31, 2020, 02:59:14 pm »
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:
Quote
svn co https://svn.freepascal.org/svn/lazarus/branches/fixes_2_0/ lazarus_2_0
Then into lazarus folder I run:
Quote
make clean all
Also i tried:
Quote
make clean bigide
And Always I got the following error:
Quote
Free 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
« Last Edit: August 03, 2020, 11:39:15 am by BlueIcaro »
Remenber, the lazarus wiki is your friend: http://wiki.lazarus.freepascal.org/Main_Page
General questions (several lenguages) http://wiki.lazarus.freepascal.org/

MarkMLl

  • Hero Member
  • *****
  • Posts: 1328
Re: Lazarus 2.10 on Jetson nano Nvidia, Fails to compile
« Reply #1 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


Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

BlueIcaro

  • Hero Member
  • *****
  • Posts: 601
Re: Lazarus 2.10 on Jetson nano Nvidia, Fails to compile
« Reply #2 on: July 31, 2020, 04:19:28 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
Quote
processor   : 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
Remenber, the lazarus wiki is your friend: http://wiki.lazarus.freepascal.org/Main_Page
General questions (several lenguages) http://wiki.lazarus.freepascal.org/

TRon

  • Hero Member
  • *****
  • Posts: 536
Re: Lazarus 2.10 on Jetson nano Nvidia, Fails to compile
« Reply #3 on: July 31, 2020, 04:29:03 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

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

  • Hero Member
  • *****
  • Posts: 3075
Re: Lazarus 2.10 on Jetson nano Nvidia, Fails to compile
« Reply #4 on: July 31, 2020, 04:57:40 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 ...
« Last Edit: July 31, 2020, 05:06:18 pm by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.8/FPC 3.0.4 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

BlueIcaro

  • Hero Member
  • *****
  • Posts: 601
Re: Lazarus 2.10 on Jetson nano Nvidia, Fails to compile
« Reply #5 on: July 31, 2020, 05:05:47 pm »
Hi, more info:
uname -a :
Quote
Linux Jorge-nano 4.9.140-tegra #1 SMP PREEMPT Thu Jun 25 21:25:44 PDT 2020 aarch64 aarch64 aarch64 GNU/Linux

uname -m
Quote
aarch64
Remenber, the lazarus wiki is your friend: http://wiki.lazarus.freepascal.org/Main_Page
General questions (several lenguages) http://wiki.lazarus.freepascal.org/

TRon

  • Hero Member
  • *****
  • Posts: 536
Re: Lazarus 2.10 on Jetson nano Nvidia, Fails to compile
« Reply #6 on: July 31, 2020, 05:41:42 pm »
There 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.

Quote
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 :-[
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.

Quote
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 ...
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  :D
« Last Edit: July 31, 2020, 05:51:17 pm by TRon »

BlueIcaro

  • Hero Member
  • *****
  • Posts: 601
Re: Lazarus 2.10 on Jetson nano Nvidia, Fails to compile
« Reply #7 on: July 31, 2020, 05:42:36 pm »
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
Remenber, the lazarus wiki is your friend: http://wiki.lazarus.freepascal.org/Main_Page
General questions (several lenguages) http://wiki.lazarus.freepascal.org/

PascalDragon

  • Hero Member
  • *****
  • Posts: 2257
  • Compiler Developer
Re: Lazarus 2.10 on Jetson nano Nvidia, Fails to compile
« Reply #8 on: July 31, 2020, 05:47:29 pm »
Did you install the corresponding development packages for GTK? sudo apt-get install gtk2-dev or something like that.

BlueIcaro

  • Hero Member
  • *****
  • Posts: 601
Re: Lazarus 2.10 on Jetson nano Nvidia, Fails to compile
« Reply #9 on: July 31, 2020, 05:59:24 pm »
Did 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
« Last Edit: July 31, 2020, 06:02:58 pm by BlueIcaro »
Remenber, the lazarus wiki is your friend: http://wiki.lazarus.freepascal.org/Main_Page
General questions (several lenguages) http://wiki.lazarus.freepascal.org/

MarkMLl

  • Hero Member
  • *****
  • Posts: 1328
Re: Lazarus 2.10 on Jetson nano Nvidia, Fails to compile
« Reply #10 on: July 31, 2020, 06:34:24 pm »
But 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
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

lucamar

  • Hero Member
  • *****
  • Posts: 3075
Re: Lazarus 2.10 on Jetson nano Nvidia, Fails to compile
« Reply #11 on: July 31, 2020, 07:19:25 pm »
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.

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.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.8/FPC 3.0.4 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

BlueIcaro

  • Hero Member
  • *****
  • Posts: 601
Re: Lazarus 2.10 on Jetson nano Nvidia, Fails to compile
« Reply #12 on: August 03, 2020, 11:53:16 am »
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




Remenber, the lazarus wiki is your friend: http://wiki.lazarus.freepascal.org/Main_Page
General questions (several lenguages) http://wiki.lazarus.freepascal.org/

MarkMLl

  • Hero Member
  • *****
  • Posts: 1328
Re: Lazarus 2.10 on Jetson nano Nvidia, Fails to compile
« Reply #13 on: August 03, 2020, 12:14:16 pm »
Download lazarus:
  svn co https://svn.freepascal.org/svn/lazarus/branches/fixes_2_0/ lazarus_2_0

For the record, what version doe Lazarus report?

Quote
Compile lazarus:
   make clean all

or  make clean bigide  to get the fancy stuff.

Quote
download 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.

Quote
run 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
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

dbannon

  • Hero Member
  • *****
  • Posts: 1165
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus 2.10 on Jetson nano Nvidia, Fails to compile
« Reply #14 on: August 03, 2020, 02:40:44 pm »

Did 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
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

 

TinyPortal © 2005-2018