Forum > Linux

[SOLVED] crosscompiler says: "unsupported target, invoke compiler driver?"

(1/3) > >>

att2:
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....    ;)

att2:
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?

att2:
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!!!

Thaddy:
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.

att2:
Thaddy: 1.) 
--- Quote ---Error: Unsupported target architecture -Paarch64, invoke the "fpc" compiler driver instead.
--- End quote ---
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" ?

Navigation

[0] Message Index

[#] Next page

Go to full version