Recent

Author Topic: powerpc-aix-ld.exe: this linker was not configured to use sysroots  (Read 6693 times)

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: powerpc-aix-ld.exe: this linker was not configured to use sysroots
« Reply #15 on: October 23, 2018, 02:09:25 pm »
Passing -a64 is not necessary. It is done for you by FPC itself.

However, your current problem seems to be more severe.
Its a linker-script problem. This linker-script is generated by FPC.
It will be hard to solve this problem (by me).
I have a clue, but perhaps somebody else has a better clue.

Anyhow.

If you want/need my further help, its time to send me the libs somehow.
I need to look at the linker problem in detail. And that is only possible (for me) by testing on my own PC.

I send you a PM with a dropbox link.

Sorry about this.

No reason to be sorry, i am very grateful for you help!
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: powerpc-aix-ld.exe: this linker was not configured to use sysroots
« Reply #16 on: October 23, 2018, 08:09:13 pm »
Solved (I hope).

I had to patch the GNU binutils (bfd). Your AIX assembler that generated your crt0_64.o uses some section types that were not yet supported by even the latest binutils (2.31.1).

Newly compiled binutils are to be found here:
https://github.com/newpascal/fpcupdeluxe/releases/download/wincrossbins_v1.0/WinCrossBinsAIXPowerPC.zip

They work for me. I hope that they will work for you too !

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: powerpc-aix-ld.exe: this linker was not configured to use sysroots
« Reply #17 on: October 23, 2018, 08:47:12 pm »
Solved (I hope).

I had to patch the GNU binutils (bfd). Your AIX assembler that generated your crt0_64.o uses some section types that were not yet supported by even the latest binutils (2.31.1).

Newly compiled binutils are to be found here:
https://github.com/newpascal/fpcupdeluxe/releases/download/wincrossbins_v1.0/WinCrossBinsAIXPowerPC.zip

They work for me. I hope that they will work for you too !

Wow! Many thanks for your efforts. 32 bit does linking now while 64 bit still produces the following log:

Code: Text  [Select][+][-]
  1. Hint: (11030) Start of reading config file C:\freepascal\fpc\trunk\bin\i386-win32\fpc.cfg
  2. Hint: (11031) End of reading config file C:\freepascal\fpc\trunk\bin\i386-win32\fpc.cfg
  3. Free Pascal Compiler version 3.3.1 [2018/10/23] for powerpc64
  4. Copyright (c) 1993-2018 by Florian Klaempfl and others
  5. (1002) Target OS: AIX for PowerPC64
  6. (3104) Compiling unixtest.lpr
  7. (9009) Assembling unixtest
  8. (9015) Linking C:\freepascal\projects\unixtest\unixtest
  9. C:\freepascal\fpc\trunk\bin\i386-win32\powerpc-aix-ld.exe: C:\freepascal\aixroot\lib\crt0_64.o: symbol `_tdata' has unrecognized smclas 20
  10. C:\freepascal\aixroot\lib\crt0_64.o: error adding symbols: Bad value
  11. C:\freepascal\projects\unixtest\unixtest.lpr(13,25) Error: (9013) Error while linking
  12. C:\freepascal\projects\unixtest\unixtest.lpr(13,25) Fatal: (10026) There were 1 errors compiling module, stopping
  13. Fatal: (1018) Compilation aborted

I'll test the binary tomorrow as i have no access to the aix machine at home.

Any ideas for the 64bit linking?
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: powerpc-aix-ld.exe: this linker was not configured to use sysroots
« Reply #18 on: October 23, 2018, 08:55:18 pm »
Yep. Do a Clean and Build ?
I only tested 64bit. So, it should work !!
Strange.

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: powerpc-aix-ld.exe: this linker was not configured to use sysroots
« Reply #19 on: October 24, 2018, 08:33:42 am »
I did a fresh rebuild of compilers and it's working now. Binary is usable on real system.  :D

For another project i had to rename the binutils to ..64.. because the option -XP was ignored in Lazarus while it worked for the
simple test app.
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: powerpc-aix-ld.exe: this linker was not configured to use sysroots
« Reply #20 on: October 24, 2018, 12:48:32 pm »
Solved (I hope).

I had to patch the GNU binutils (bfd). Your AIX assembler that generated your crt0_64.o uses some section types that were not yet supported by even the latest binutils (2.31.1).

Newly compiled binutils are to be found here:
https://github.com/newpascal/fpcupdeluxe/releases/download/wincrossbins_v1.0/WinCrossBinsAIXPowerPC.zip

They work for me. I hope that they will work for you too !

Could it be that dynamic linking with powerpc-aix-ln.exe is somehow broken? If is use "-dy --verbose" i can see the linker only searching for libxxx.a.

Edit:
When i force linking libsqlite3.so by adding "-( c:\freepascal\aixroot\lib\libsqlite3.so -)" i get the following error:
Code: Text  [Select][+][-]
  1. C:\freepascal\fpc\trunk\bin\i386-win32\powerpc-aix-ld.exe: c:\freepascal\aixroot\lib\libsqlite3.so: XCOFF shared object when not producing XCOFF output
  2. c:\freepascal\aixroot\lib\libsqlite3.so: error adding symbols: Invalid operation
« Last Edit: October 24, 2018, 02:31:53 pm by Pascal »
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

 

TinyPortal © 2005-2018