installing CLN on darwin

John Whitley whitley at acm.org
Mon Feb 23 05:59:49 CET 2004


Richard B. Kreckel writes:
> Note that you'll find some linker problems at a later stage.
> Somebody knowledgeable about the way that linker works needs to fix this.

In my Great Quest to get GiNaC running on Mac OS X, I've done some digging on this problem.
The issue lies with the machine-dependent hacks in include/cln/modules.h for forcing
construction time ordering.

The following quote from 
http://mail.gnu.org/archive/html/users-prolog/2004-01/msg00028.html
sums up the issue at hand:

   The problem comes down to the fact that Mach-o has lazy linking and
   does not allow any changes in the .text section where our compiled
   code resides.  Therefore the message below, which states "
   non-writable section".  This means that all external symbols need a
   stub construct in the .data section. The code in .text jumps to
   .data section, which in the meantime has magically been changed to
   point to the actual implementation of the target routine in linked
   shared libraries.

I still need to fullly understand the approach implemented by CL_PROVIDE and related macros in
modules.h, then determine/implement/test the solution for Darwin-based platforms.

FWIW, I've had to manage this problem in C++ embedded systems before,  e.g. via a linker 
directive files.  I'm unclear as to what motivated the design choices in CLN, such that it even 
encounters the constructor ordering problem in the first place?  

Thanks,
John Whitley

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.cebix.net/pipermail/ginac-devel/attachments/20040223/512decf1/attachment.html


More information about the GiNaC-devel mailing list