[OS X TeX] Optimal Solution for an asymptotemk engine

Martin Costabel costabel at wanadoo.fr
Tue Apr 13 13:27:04 CEST 2010

Peter Dyballa wrote:
> Am 12.04.2010 um 14:51 schrieb Martin Costabel:
>> Now looking at today's asy version 1.92, which doesn't want to build 
>> on MacOSX 10.5...
> Some hints or details? I can easily make it compile (with GCC 4.0 and 
> 4.2 and LLVM-GCC 4.2 with -O0) or not compile (with LLVM-GCC 4.2 and 
> some optimisation or an LDFLAG like -dead-strip, in gc-7.1)...

I have now a Fink package for asymptote 1.92 that builds both on 10.5 
and 10.6.

On 10.5, it did not build, because asymptote-1.92, contrary to 1.91, 
includes <tr1/unordered_map>. The version of this that comes from 
c++-4.0.1 is apparently either incompatible with gc or just broken. It 
spits out long and incomprehensible error messages of the type

> g++ -Wall -ansi -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -DUSEGC  -I/sw/include -Os  -I . -I/sw/include/gc -I/usr/include/gc -o settings.o -c settings.cc
> /usr/include/c++/4.0.0/tr1/hashtable: In copy constructor 'std::tr1::hashtable<Key, Value, Allocator, ExtractKey, Equal, H1, H2, H, RehashPolicy, cache_hash_code, mutable_iterators, unique_keys>::hashtable(const std::tr1::hashtable<Key, Value, Allocator, ExtractKey, Equal, H1, H2, H, RehashPolicy, cache_hash_code, mutable_iterators, unique_keys>&) [with Key = trans::venv::key, Value = std::pair<const trans::venv::key, trans::venv::value*>, Allocator = gc_allocator<std::pair<trans::venv::key, trans::venv::value*> >, ExtractKey = Internal::extract1st<std::pair<const trans::venv::key, trans::venv::value*> >, Equal = trans::venv::keyeq, H1 = trans::venv::keyhash, H2 = Internal::mod_range_hashing, H = Internal::default_ranged_hash, RehashPolicy = Internal::prime_rehash_policy, bool cache_hash_code = false, bool mutable_iterators = true, bool unique_keys = false]':
> /usr/include/c++/4.0.0/tr1/unordered_map:110:   instantiated from here
> /usr/include/c++/4.0.0/tr1/hashtable:1045: error: no matching function for call to 'std::tr1::hashtable<trans::venv::key, 
> std::pair<const trans::venv::key, trans::venv::value*>, gc_allocator<std::pair<trans::venv::key, trans::venv::value*> >, I
> nternal::extract1st<std::pair<const trans::venv::key, trans::venv::value*> >, trans::venv::keyeq, trans::venv::keyhash, In
> ternal::mod_range_hashing, Internal::default_ranged_hash, Internal::prime_rehash_policy, false, true, false>::m_allocate_n
> ode(Internal::hash_node<std::pair<const trans::venv::key, trans::venv::value*>, false>*&)'

and so on.

So for 10.5, I had to patch memory.h so that it does not include 
<tr1/unordered_map>. On 10.6, this is not necessary.

I also patched pipestream.h so that it uses SIGINT instead of SIGQUIT 
and the latex crash dumps go away.

If I have more time, I will take this to the asymptote authors.


More information about the macostex-archives mailing list