[fpc-pascal] FPC and Mac OS X 10.5
Mattias Gaertner
nc-gaertnma at netcologne.de
Tue Jul 15 00:16:23 CEST 2008
On Mon, 14 Jul 2008 23:51:30 +0200
Jonas Maebe <jonas.maebe at elis.ugent.be> wrote:
>
> On 14 Jul 2008, at 23:03, Mattias Gaertner wrote:
>
> > On Fri, 26 Oct 2007 16:58:29 +0200
> > Jonas Maebe <jonas.maebe at elis.ugent.be> wrote:
> >
> >> [...]
> >> * The new linker deals differently with stabs debug information
> >> compared to previous versions, causing a lot of "Unknown stabs"
> >> warnings and also some errors during linking
> >> - Effect: you can't compile code with stabs debug information
> >> - Occurs: with any program compiled with stabs debug information
> >> (programs compiled on 10.4 with stabs may still be debuggable on
> >> 10.5 though)
> >> - Fix: already in FPC 2.3.1 (not yet merged to FPC 2.2.1)
> >
> > Strange. I installed FPC 2.3.1 from svn and I still get the unknown
> > stabs errors.
>
> That's because it also has to be partly fixed in the linker (which I
> didn't realise when I posted that message). The unknown stabs
> warnings (they're not errors afaik) are caused by stabs for local
> constants in functions/procedures (the linker interprets them as
> function stabs, because they have a very similar format and gcc does
> not generate stabs for constants).
>
> If you want, you can download a patched linker from
> http://trappist.elis.ugent.be/~jmaebe/cctools/ (extract it to some
> directory, add a symbolic link to /usr/bin/as in the same directory,
> and point FPC to it using the -FD command line switch). That linker
> corresponds to the one shipped with Xcode 3.0 (+ the patches in that
> directory).
>
> But since end users most likely won't have that patched linker (and
> because stabs has been deprecated by Apple), you may want to switch
> to dwarf instead on Mac OS X 10.5+
Thanks. That fixed the warnings.
Now only the wrong file formats.
zbase, gzio, crc, zdeflate, ... inffast. Hmm. These are only the .o
files in paszlib.
> > And I get a lot warnings like:
> > ld: warning in zbase.o, file is not of required architecture
>
> That normally means what it says: you are trying to link a PowerPC
> object file into an Intel binary or vice versa. I don't know why
> this would happen unless you somehow overwrote certain object files
> without overwriting the associated ppu files, have some strange
> object search path, etc. You can use the file command to check the
> architecture of an object file using the "file" command.
I was wrong. There are some fpc files too. 'file' gives:
inffast.o: Mach-O object i386.
Like all other.
> And also take into account the comments of the first note at
> http://bugs.freepascal.org/bug_view_advanced_page.php?bug_id=11270#bugnotes
> (but that only affects the finally linked binaries and not the
> compilation of the unit object files).
>
> > And finally a lot of missing symbols so linking fails. :(
>
> That's because of the right object files were not found.
Mattias
More information about the fpc-pascal
mailing list