Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2015-03

FPC and OpenSXCE/Illumos/Solaris 11

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mark Morgan Lloyd

I'm taking a minimal look at OpenSXCE, which is a compilation of Illumos (formerly Open Solaris 11 etc.) for SPARC. I've already got SPARC Solaris 10 running, so am able to see what's different rather than being confused by a completely unfamiliar platform.

With a fairly complete installation (i.e. including GNU binutils etc.) and FPC 2.6.4 built on a Solaris 10 system, compiling a trivial program results in

/usr/bin/gld:built in linker script:21: syntax error

I can see that there's been various discussion of this sort of thing before, with truncated/missing linker scripts being implicated (i.e. it's not really an FPC problem). In this case, it appears that none of the linker script files are being opened, and I find that if I put an explicit

-k-T/usr/gnu/sparc-sun-solaris2.11/lib/ldscripts/elf32_sparc.x

in /etc/fpc.cfg I can build simple test programs. If anybody understands what's going on, can they confirm that this is an appropriate file to use?

Using FPC 2.6.4, if I try building 2.7.1 it runs most of the way through provided that I put the above hack on the command line to accommodate cases where fpc.cfg is not being used. However it eventually fails with

/usr/bin/gar: creating libpfpmake.a
Linking fpmake
/usr/bin/gld: internal error ldlang.c 4884
fpmake.pp(49) Error: Error while linking

Can anybody suggest why fpmake is pushing gld into this kind of error, and can it be disabled? (I note that 2.6.4 barfs on fastcgi earlier in the build sequence because the -k-T hasn't been passed through, I presume this has been fixed for 2.7.1.)

I was hoping to be able to investigate whether Lazarus would run on this system, since gtk etc. is a much later version than the one with Solaris 10 including more complete Unicode support etc. However in view of the proprietary nature of both Solaris and SPARC I'm not proposing to put much time into it- unless of course the existing problems turn out to be trivial.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 42 lines
I'm taking a minimal look at OpenSXCE, which is a compilation of Illumos (formerly Open Solaris 11 etc.) for SPARC. I've already got SPARC Solaris 10 running, so am able to see what's different rather than being confused by a completely unfamiliar platform. With a fairly complete installation (i.e. including GNU binutils etc.) and FPC 2.6.4 built on a Solaris 10 system, compiling a trivial program results in /usr/bin/gld:built in linker script:21: syntax error I can see that there's been various discussion of this sort of thing before, with truncated/missing linker scripts being implicated (i.e. it's not really an FPC problem). In this case, it appears that none of the linker script files are being opened, and I find that if I put an explicit -k-T/usr/gnu/sparc-sun-solaris2.11/lib/ldscripts/elf32_sparc.x in /etc/fpc.cfg I can build simple test programs. If anybody understands what's going on, can they confirm that this is an appropriate file to use? Using FPC 2.6.4, if I try building 2.7.1 it runs most of the way through provided that I put the above hack on the command line to accommodate cases where fpc.cfg is not being used. However it eventually fails with /usr/bin/gar: creating libpfpmake.a Linking fpmake /usr/bin/gld: internal error ldlang.c 4884 fpmake.pp(49) Error: Error while linking Can anybody suggest why fpmake is pushing gld into this kind of error, and can it be disabled? (I note that 2.6.4 barfs on fastcgi earlier in the build sequence because the -k-T hasn't been passed through, I presume this has been fixed for 2.7.1.) I was hoping to be able to investigate whether Lazarus would run on this system, since gtk etc. is a much later version than the one with Solaris 10 including more complete Unicode support etc. However in view of the proprietary nature of both Solaris and SPARC I'm not proposing to put much time into it- unless of course the existing problems turn out to be trivial.

That particular machine self-destructed, so I don't have an adequate record of what versions of gld/ld were installed. A rebuilt system using the SunFreeware libraries etc. (which are for Solaris 10 rather than 11) appears to be OK, except that SunFreeware binutils installs ld (not gld) in /usr/local/bin which has the result that an older (buggy) version of gld is picked up by FPC before the correct one. Creating symlinks /usr/local/bin/gld etc. appears to fix the problem.

I'm currently trying to put some minor updates into http://wiki.lazarus.freepascal.org/Lazarus_on_Solaris in case anybody else is still interested.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Jonas Maebe
to Mark Morgan Lloyd

Mark Morgan Lloyd wrote on Wed, 13 May 2015:

Show quoted text 8 lines
That particular machine self-destructed, so I don't have an adequate record of what versions of gld/ld were installed. A rebuilt system using the SunFreeware libraries etc. (which are for Solaris 10 rather than 11) appears to be OK, except that SunFreeware binutils installs ld (not gld) in /usr/local/bin which has the result that an older (buggy) version of gld is picked up by FPC before the correct one. Creating symlinks /usr/local/bin/gld etc. appears to fix the problem.

You can use the -Xn command line parameter on Solaris to use the native linker instead of the GNU one (FPC 3.x).

Jonas

Reply by email

Mark Morgan Lloyd
to Jonas Maebe
Jonas Maebe wrote 12 lines
Mark Morgan Lloyd wrote on Wed, 13 May 2015: > That particular machine self-destructed, so I don't have an adequate > record of what versions of gld/ld were installed. A rebuilt system > using the SunFreeware libraries etc. (which are for Solaris 10 rather > than 11) appears to be OK, except that SunFreeware binutils installs > ld (not gld) in /usr/local/bin which has the result that an older > (buggy) version of gld is picked up by FPC before the correct one. > Creating symlinks /usr/local/bin/gld etc. appears to fix the problem. You can use the -Xn command line parameter on Solaris to use the native linker instead of the GNU one (FPC 3.x).

Thanks, it's one of the things I've already got on my list to check. Somebody added that to the Wiki page, initially as something undocumented. Google suggests that gld 2.19 is known to be broken on Solaris, other versions appear OK; I've modified the script I use for building to log which binary is actually used as announced in -vt output.

There's supposed to be a new OpenSXCE build at the end of this month or during June, so I'm holding off any further work until then. There's a whole load of politics/nationalism associated with the project, I'm doing my best to be non-judgemental in the interest of helping to keep the SPARC platform alive.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email