Lazarus
Installation => Linux => Topic started by: att2 on April 05, 2018, 10:22:04 am
-
Hello,
What I did so far:
* On a Win10 machine, I installed virtualbox 5.2.x (latest version as of today).
* Inside the Virtualbox, there is a OpenSuse Leap 42.3 Linux.
* I used fpcupdeluxe 1.6.0p to install Lazarus "fixes version" (1.8.3) and FPC "trunk" version.
* I pressed "install and update fpc/laz
* I re-started fpcupdeluxe, selected "cross compile: AARCH64 / Linux" and "install FPC".
* Everything worked fine.
Result so far: Lazarus IDE starts up nicely. When compiling to normal=same architecture (Intel x64) everything works and compiles as it should.
But when I try to switch to "cross-compile to aarch64" by using:
"Project -> Project options -> config and target -> aarch64 " ... then I use
"Tools -> Configure ' Build Lazarus' " -> (correct options, then) "Build"
I get the error:
Error: Unsupported target architecture -Paarch64, invoke the "fpc" compiler driver instead.
I don't know how to properly proceed and "invoke the fpc compiler driver" .
How to do this?
Have I missed any options?
Please, any advice is greatly appreciated. I need cross-compilation working.... ;)
-
Addition: When compiling, I also get the message:
unit1.pas(46,0) Error: Assembler arm-linux-as not found, switching to external assembling
Any advice?
-
I solved my problem!!!!!!
I made symbolic links so that my cross compilation directory looks like this:
armdevel@linux-4mcd:~/fpcupdeluxe/cross/bin/aarch64-linux> ls -al
insgesamt 17556
drwxr-xr-x 2 armdevel users 4096 5. Apr 10:42 .
drwxr-xr-x 3 armdevel users 27 5. Apr 09:25 ..
-rwxr-xr-x 1 armdevel users 971920 3. Dez 2016 aarch64-linux-addr2line
-rwxr-xr-x 1 armdevel users 996408 3. Dez 2016 aarch64-linux-ar
-rwxr-xr-x 1 armdevel users 1483488 3. Dez 2016 aarch64-linux-as
-rwxr-xr-x 1 armdevel users 967440 3. Dez 2016 aarch64-linux-c++filt
-rwxr-xr-x 1 armdevel users 31552 3. Dez 2016 aarch64-linux-elfedit
-rwxr-xr-x 1 armdevel users 1038736 3. Dez 2016 aarch64-linux-gprof
-rwxr-xr-x 1 armdevel users 2012384 3. Dez 2016 aarch64-linux-ld
-rwxr-xr-x 1 armdevel users 2012384 3. Dez 2016 aarch64-linux-ld.bfd
-rwxr-xr-x 1 armdevel users 980752 3. Dez 2016 aarch64-linux-nm
-rwxr-xr-x 1 armdevel users 1159888 3. Dez 2016 aarch64-linux-objcopy
-rwxr-xr-x 1 armdevel users 1678032 3. Dez 2016 aarch64-linux-objdump
-rwxr-xr-x 1 armdevel users 996408 3. Dez 2016 aarch64-linux-ranlib
-rwxr-xr-x 1 armdevel users 497440 3. Dez 2016 aarch64-linux-readelf
-rwxr-xr-x 1 armdevel users 971792 3. Dez 2016 aarch64-linux-size
-rwxr-xr-x 1 armdevel users 971920 3. Dez 2016 aarch64-linux-strings
-rwxr-xr-x 1 armdevel users 1159888 3. Dez 2016 aarch64-linux-strip
lrwxrwxrwx 1 armdevel users 23 5. Apr 10:40 arm-linux-addr2line -> aarch64-linux-addr2line
lrwxrwxrwx 1 armdevel users 16 5. Apr 10:40 arm-linux-ar -> aarch64-linux-ar
lrwxrwxrwx 1 armdevel users 16 5. Apr 10:39 arm-linux-as -> aarch64-linux-as
lrwxrwxrwx 1 armdevel users 21 5. Apr 10:40 arm-linux-c++filt -> aarch64-linux-c++filt
lrwxrwxrwx 1 armdevel users 21 5. Apr 10:41 arm-linux-elfedit -> aarch64-linux-elfedit
lrwxrwxrwx 1 armdevel users 19 5. Apr 10:41 arm-linux-gprof -> aarch64-linux-gprof
lrwxrwxrwx 1 armdevel users 16 5. Apr 10:41 arm-linux-ld -> aarch64-linux-ld
lrwxrwxrwx 1 armdevel users 20 5. Apr 10:41 arm-linux-ld.bfd -> aarch64-linux-ld.bfd
lrwxrwxrwx 1 armdevel users 16 5. Apr 10:41 arm-linux-nm -> aarch64-linux-nm
lrwxrwxrwx 1 armdevel users 21 5. Apr 10:41 arm-linux-objcopy -> aarch64-linux-objcopy
lrwxrwxrwx 1 armdevel users 21 5. Apr 10:41 arm-linux-objdump -> aarch64-linux-objdump
lrwxrwxrwx 1 armdevel users 20 5. Apr 10:42 arm-linux-ranlib -> aarch64-linux-ranlib
lrwxrwxrwx 1 armdevel users 21 5. Apr 10:42 arm-linux-readelf -> aarch64-linux-readelf
lrwxrwxrwx 1 armdevel users 18 5. Apr 10:42 arm-linux-size -> aarch64-linux-size
lrwxrwxrwx 1 armdevel users 21 5. Apr 10:42 arm-linux-strings -> aarch64-linux-strings
lrwxrwxrwx 1 armdevel users 19 5. Apr 10:42 arm-linux-strip -> aarch64-linux-strip
armdevel@linux-4mcd:~/fpcupdeluxe/cross/bin/aarch64-linux>
So , for every "aarch64-something" file I made a symbolic link with a name of "arm-something" (same rest of file name).
Now it works!!!!!!!
Problem Solved!!!
-
Two things:
1. there is no such thing as a freepascal compiler driver. It is a compiler, bar none.
2. that's an awful lot of symlinks and that should not be necessary. You need just one.
One symlink in /usr/bin or /usr/local/bin that points to /usr/lib/fpc/3.0.4/ppcarm or /usr/local/lib/fpc/3.0.4/ppcarm if your installation is correct.
But you are using fpcdeluxe - which does not use conventions - and that should just work unless you also have a previous installation from the distribution itself.
-
Thaddy: 1.)
Error: Unsupported target architecture -Paarch64, invoke the "fpc" compiler driver instead.
1.) is the direct copy/paste from the Error message. Yes, it says "driver". Yes, it irritated me too. So there.
2.) What has ppcarm to do with a missing assembler/linker name of "arm-....something" ?
-
2. You probably have a dependency problem OR a previous installation that you did not uninstall.
1. There is a large automotive electronics company called FPC, unfortunatley, that may install drivers (sic). Someone can have mixed up FreePascal with FPC perhaps? But that is the Linux distribution... 8-) O:-)
-
I am not making this up.
Here is a screenshot:
(http://666kb.com/i/dsdz5fgq1myi479rh.jpg)
So there.
-
Error: Unsupported target architecture -Paarch64, invoke the "fpc" compiler driver instead.
It's either Tools->Environment->Files->Compiler executable (global default) or Project->Project Options->Compiler Options->Compiler Commands (project specific, should default to global default).
1. there is no such thing as a freepascal compiler driver. It is a compiler, bar none.
fpc is compiler driver, ppcXXX is the actual compiler.
-
And why doesn't "fpcupdeluxe 1.6.0p" make the proper ppcXXX file ? How to tell him to make it?
-
This is a strange error.
If you install an aarch64 cross-compiler, the ppcrossa64 compiler should be available.
And no trickery of linking towards arm-utils should be needed !
-
Yes, DonAlfredo, Master of the fpcUpDeluxe, I know. But I am telling you exactly how it happened to me. I am installing it as normal user, not as root (if that additional info is any help).
First, I pressed "normal" "install and update FPC+LAZ", then I selected "ARM / Linux" and pressed the button "install cross compiler". I did not even change the default directory, "/home/username/fpcupdeluxe" ! The same linking trickery was necessary to get the ARM/Linux platform to cross compile. FPCUPDeluxe would produce a series of exe files called arm-gnueafbhi-as / ld / etc.etc. and I had to pseudo-rename them to arm-linux-as, etc. without the string "gnueafbhi" (or somesuch) in the middle.
Same symptom.
But still, I now can compile for three systems, i.e. aarch64, ARM, and x64_86.