Mark Morgan Lloyd wrote:
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]
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to