[CLN-list] Linking on Mac OS X

David Fang fang at csl.cornell.edu
Thu Aug 19 08:48:04 CEST 2004


Hi,

> I'm trying to build CLN 1.1.8 on a G4/Mac OS X 10.3.5 system with the
> XCode 1.5 tools (i.e. Apple's version of GCC 3.3 and the Mach linker).
> By disabling shared libraries, I've got quite far with this, up to
> linking the CLN test case, exam.  This gives unresolved externals
> ending with _ctorend and _dtorend.

	Earlier this year, I was able to compile and link CLN (was 1.1.6)
on Mac OS X with much help from a correspondent, and I took the time to
scribble down the notes for how it was done.  Then can be found at:

	http://www.csl.cornell.edu/~fang/sw/CLN.html

	Mind you, it was late and I was in a hurry when I wrote this, so I
didn't fill in many explanations, nevertheless, you'll find some answers
to some of the problems you're encountering.

> I've tracked it down to the fact that each object in the library has a
> _XXX_[cd]torend symbol defined module-local (i.e. nm entry prefixed by
> "s").  However, each module has an unresolved XXX_[cd]torend symbol (nm
> entry prefixed by "U"), without the underscore prefix.
>
> This is the CL_PROVIDE and CL_REQUIRE macros.  My include/cln/config.h
> has ASM_UNDERSCORE defined.  I tried to read the macro definition, but
> got lost.  Can anyone help?

	In fact, one of the steps I've listed is "comment out the #define
ASM_UNDERSCORE" line.  :)

> I searched the archives for relevant information a few days ago and
> didn't find any.  They seem to have disappeared in the meantime???

	I honestly haven't had much success building any post-1.2.0
version of GiNaC on Mac OS X, and haven't had much time to play around
with it.  But I hope the above link helps.  Good luck.

David Fang
Computer Systems Laboratory
Electrical & Computer Engineering
Cornell University
http://www.csl.cornell.edu/~fang/ -- *gag* work in progress




More information about the CLN-list mailing list