Lazarus
Home
Forum
Help
TinyPortal
Search
Login
Register
Lazarus
»
Free Pascal
»
Unix
(Moderators:
FPK
,
Tomas Hajny
) »
Error when compile under Linux for SPARC: /usr/bin/ld: skipping incompatible .o
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
FAQ
Wiki
Bugtracker
Packages
IRC channel
Developer Blog
Follow us on Twitter
Latest SVN
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
Search
Advanced search
« previous
next »
Print
Pages: [
1
]
Author
Topic: Error when compile under Linux for SPARC: /usr/bin/ld: skipping incompatible .o (Read 1225 times)
IgorM
New member
Posts: 5
Error when compile under Linux for SPARC: /usr/bin/ld: skipping incompatible .o
«
on:
June 13, 2017, 01:53:41 pm »
Hi!
When I compile my program on Linux for SPARC, I've got error:
[root@host1 fpc]# fpc hello.pas
Free Pascal Compiler version 3.0.2 [2017/05/07] for sparc
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: Linux for SPARC
Compiling hello.pas
Assembling hello
Linking hello
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
/usr/bin/ld: skipping incompatible hello.o when searching for hello.o
/usr/bin/ld: skipping incompatible ./hello.o when searching for hello.o
/usr/bin/ld: cannot find hello.o
hello.pas(5,40) Error: Error while linking
hello.pas(5,40) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcsparc returned an error exitcode
[root@host1 fpc]#
Could you please advise - what is wrong?
Thanx!
Best Regards
Igor Melnikov
Logged
marcov
Global Moderator
Hero Member
Posts: 6099
Re: Error when compile under Linux for SPARC: /usr/bin/ld: skipping incompatible .o
«
Reply #1 on:
June 13, 2017, 02:01:55 pm »
The format of .o that the compiler generates and that the linker wants don't match.
Wrong linker or compiler or wrong linker/compiler target.
Some linkers can accept multiple kinds of .o, but need parameters to switch (usually -m., which can be passed via the compiler using -k)
Logged
IgorM
New member
Posts: 5
Re: Error when compile under Linux for SPARC: /usr/bin/ld: skipping incompatible .o
«
Reply #2 on:
June 13, 2017, 03:01:26 pm »
Hi Marcov!
Thanx!
Object-file , generated by fpc is " ELF 64-bit":
[root@host1 fpc]# file hello.o
hello.o: ELF 64-bit MSB relocatable, SPARC V9, relaxed memory ordering, version 1 (SYSV), not stripped
When I sent to linker this target (elf64-sparc), the same error occur.
What target expect linker? - How verify full linker parameters generated by fpc ?
[root@host1 fpc]# fpc hello.pas -k-belf64-sparc
Free Pascal Compiler version 3.0.2 [2017/05/07] for sparc
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: Linux for SPARC
Compiling hello.pas
Assembling hello
Linking hello
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
/usr/bin/ld: skipping incompatible hello.o when searching for hello.o
/usr/bin/ld: skipping incompatible ./hello.o when searching for hello.o
/usr/bin/ld: cannot find hello.o
hello.pas(5,40) Error: Error while linking
hello.pas(5,40) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcsparc returned an error exitcode
Thank you!
Best Regards
Igor Melnikov
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Free Pascal
»
Unix
(Moderators:
FPK
,
Tomas Hajny
) »
Error when compile under Linux for SPARC: /usr/bin/ld: skipping incompatible .o
Recent
Import excel to dbgird
by
flori
[
Today
at 10:48:10 pm]
SQL Server - WinCE
by
ertank
[
Today
at 10:27:36 pm]
Read line from textfile
by
molly
[
Today
at 10:27:30 pm]
Is there a way of getting...
by
RedOctober
[
Today
at 10:21:52 pm]
How do I get the PLAN fro...
by
RedOctober
[
Today
at 10:18:01 pm]
Form resize not allow bey...
by
Robert B
[
Today
at 10:16:36 pm]
get page source substring...
by
Sniper
[
Today
at 09:08:47 pm]
[Solved]What's this Blue ...
by
Handoko
[
Today
at 07:46:50 pm]
Visual Pascal Community E...
by
Handoko
[
Today
at 07:45:05 pm]
New version of BGRABitmap
by
circular
[
Today
at 06:55:36 pm]