On Oct 3, 2006, at 4:37 PM, Frank Heckenbach wrote:
Glenn Howes wrote:
It appears to me that HAVE_STATVFS is defined if my current OS X SDK
(10.4) has a statvfs.h header file amongst its include files,
More precisely, if the statvfs function exists in the library. The
RTS configure script tries to compile and link a dummy program
containing a reference to this function, and checks whether that
works. Likewise for statfs and HAVE_STATFS. The header is also
checked, that's HAVE_SYS_STATVFS_H.
which
means if I build my Pascal development environment from the build-on-
Intel.command that the statvfs version will be hard wired into the
runtime and any binary I generate will not work on 10.3 (which does
not have statvfs in its libSystem.B.dylib library).
Normally, configuration should always be done on the "weakest"
system, so better systems will work due to backward-compatibility.
If that's not possible (as I understand, though I don't know much
about Mac OS libs), one could hand-edit the generated file
gcc/p/rts/rts-config.h, then rebuild the RTS (remove gcc/p/rts/rts.o
and do make again).
I had thought I'd done the equivalent of that, but perhaps I missed something.
Also, if I build
my environment/library on a PowerPC using the build-on-
powerPC-10.3.command, I end up with a different set of link problems
involving the long double version of pow().
What's the problem here, does it only exist on 10.3, not 10.4?
Yes. __powidf2 was removed from the 10.4 SDK, I guess because there is no native long double pow operation on the x86. Or some such reason. So if I create my library against the 10.3 SDK I get an application which cannot run on 10.4 for PPC. I'm not even directly calling it, as far as I can tell.
Besides which, I'd prefer
to do my development on OS X for Intel going forward.
I can't follow you here (as I said, I don't know much about Mac), is
this about system versions or platforms? If 10.3 doesn't work on
Intel (if that's the problem), can't you use 10.3 for PPC and 10.4
for Intel?
Yes. 10.3 does not run on Intel.
I could, but either way I'm getting a runtime resolution error for a missing symbol. __powidf2 or statvfs.
Just to be clear, I link in two static libraries: a universal version
of the libgpc.a for the runtime, and a universal version of the
library I've created. Neither of them contain the symbol _statvfs (at
least I can't find that text in them).
Did you look with a binary search program (just to be sure), and
perhaps also just for statvfs? (I don't know where the underscore
comes from and which part adds it; I know it's added on Dos systems
for link-compatibility with other compilers which in turn did it to
work-around the silly Intel assembler syntax. I suppose such
historical reasons don't apply on Mac OS.)
I just looked with my text editor, and I didn't look for the underscores, just the statvfs.
Otherwise, I don't really understand what's going on here.
Neither do I.