Menu

Installing from source on mac osx Mavericks

Help
2014-05-13
2014-05-23
  • André Valentin

    André Valentin - 2014-05-13

    Sorry to be here again: thanks for having solved the locale problem.
    I have 2 macintosh:one old macbook under 10.7, on which I installed asymptote 2.28 from source, without problems.

    And a iMac under Mavericks (10.9.2). After having written in a terminal: "xcode-select --install" to install some command line tools,
    I run into errors during the make process as you can see near the end of the log:

    https://dl.dropboxusercontent.com/u/26884927/AsyInstall.txt

     
  • John Bowman

    John Bowman - 2014-05-13

    Yes, I just submitted a patch (attached) to svn to fix that yesterday. Can you please verify that it works.

     
  • John Bowman

    John Bowman - 2014-05-13

    P.S. Also change PREREQ(4,3) to PREREQ(4,0) in memory.h to get rid of the warning there.

     
  • André Valentin

    André Valentin - 2014-05-13

    Shame on me: I have never used a patch!
    I have a slist.patch: were do I place it? (in Asymptote source folder i suppose)
    and then what precise incantation must I formulate: something like
    "patch slist.patch"?
    Sorry to be so ignorant!

     
  • Charles Staats

    Charles Staats - 2014-05-13

    I also have been having trouble installing in OS X 10.9.2. I was able to get the installation to build by making the following changes:

    in prc/writePRC.h: commented out lines as follows:

    #ifdef __GNUC__
    //#include <ext/slist>
    #endif
    

    and farther down in the same file:

    //#ifdef __GNUC__
    //typedef __gnu_cxx::slist<PRCAttribute> PRCAttributeList;
    //#else
    typedef std::list<PRCAttribute> PRCAttributeList;
    //#endif
    

    in genv.cc: changed #include <bits/stl_algo.h> to #include <algorithm>. I'm not sure how well that ought to work, but according to this website,

    /** @file stl_algo.h
     *  This is an internal header file, included by other library headers.
     *  You should not attempt to use it directly.
     */
    

    Regardless, the version I now have sort of works, but trying to compile a pdf file without setting prc to false gives the error

    ~/asymptote/share/asymptote/plain_shipout.asy: 83.3: runtime: Cannot read label width
    

    (Note that I am substituting ~ for the actual address of my home directory.)

     
  • André Valentin

    André Valentin - 2014-05-13

    After having gotten through patch manipulation,
    I have a new error:

    ~~~~~~~~~~~~~~~~~~~
    Creating camperror.d
    g++ -Wall -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -DUSEGC -D_THREAD_SAFE -pthread -DFFTWPP_SINGLE_THREAD -I/usr/local/include -I . -Igc-7.4.0/include -o camperror.o -c camperror.cc
    In file included from camperror.cc:14:
    In file included from ./camperror.h:16:
    In file included from ./common.h:35:
    ./memory.h:32:10: fatal error: 'tr1/unordered_map' file not found

    include <tr1 unordered_map="">

    ~~~~~~~~~~~~~~~~~~~~

    I do have that file in /usr/include/c++/4.2.1/tr1

     
  • John Bowman

    John Bowman - 2014-05-14

    In memory.h you need to change PREREQ(4,3) to PREREQ(4,0).
    Or compile from the latest svn version.

     
  • André Valentin

    André Valentin - 2014-05-14

    The change in memory.h was already done, as you told me in a preceding post...
    I'll try the svn version.

     
  • John Bowman

    John Bowman - 2014-05-14

    What version of g++ are you using?

     
  • André Valentin

    André Valentin - 2014-05-14

    ~~~~~~~
    ovale-2:~ andrevalentin$ g++ -v
    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
    --with-gxx-include-dir=/usr/include/c++/4.2.1
    Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
    Target: x86_64-apple-darwin13.1.0
    Thread model: posix
    ~~~~~~~~
    By the way, I have the same error


    ./memory.h:32:10: fatal error: 'tr1/unordered_map' file not found


    with the svn version.

     
  • John Bowman

    John Bowman - 2014-05-14

    It looks like the __cplusplus macro isn't set properly. I guess I'll have to use
    configure to autodetect whether "tr1/" is needed or not.

    Anyway, you can work around it by replacing in memory.h:

    #if __cplusplus >= 201103L
    

    with

    ~~~~~~~~~~~~~~~~~~~~~~

    if 1

    ~~~~~~~~~~~~~~~~~~~~~

     
  • Michail Vidiassov

    As to slist - that was premature optimisation.
    Just use list unconditionally.
    I have already dropped slist use in the development version of the PRC code.

     
  • André Valentin

    André Valentin - 2014-05-14

    I did so, but there is now the error


    ./prc/writePRC.h:33:10: fatal error: 'ext/slist' file not found


    Must I do the same in "writePRC.h"?

     
  • Michail Vidiassov

    If you do not use slist - there is no reason to include its header file.

     
  • André Valentin

    André Valentin - 2014-05-15

    I gave a try of asymptote 2.29, (mac os 10 Mavericks) with the command

    ./configure CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib

    as I was told since several years. But I'am not sure if this is anymore valid...

    I got an error:


    g++ -Wall -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -DUSEGC -D_THREAD_SAFE -pthread -DFFTWPP_SINGLE_THREAD -I/usr/local/include -I . -Igc-7.4.0/include -o genv.o -c genv.cc
    genv.cc:18:10: fatal error: 'bits/stl_algo.h' file not found
    include <bits stl_algo.h="">


    I do have a "stl_algo.h" in /usr/include/c++/4.2.1/bits/

    so is "/usr/include/" in the search path?

    I gave a second try with "./configure" alone, but I got the same error.

     
  • Mojca Miklavec

    Mojca Miklavec - 2014-05-15

    OK, so you could try the latest version from SVN. But two users untill now reported that while the binary builds, it hangs "forever" after being launched.

     
  • André Valentin

    André Valentin - 2014-05-15

    After trying the modification suggested in https://sourceforge.net/p/asymptote/discussion/409349/thread/3ced789c/#b3a8
    I've got considerably farther. But the build stage of the manual got stuck in building "GaussianSurface.asy". I can do 2D drawings, but no 3D...

    And I've a lot of:

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ext/hash_map:212:5: warning: 
          Use of the header <ext/hash_map> is deprecated. Migrate to <unordered_map> [-W#warnings]
    
     
  • Mojca Miklavec

    Mojca Miklavec - 2014-05-16

    Further changes have been committed to SVN that need testing. (You can try to run just make, followed by asy -config="" -vvv doc/GaussianSurface.asy.)

    The ext/hash_map warning was a consequence of a typo that was fixed in revision 5652.

     
  • André Valentin

    André Valentin - 2014-05-20

    Thanks to Mojca and John! The installation on Mac os 10 Mavericks of 2.31svn-r5664
    was done smoothly (3 days ago).

    Just one small detail:
    I have gnu Readline(6.3) installed in /usr/local/include and /usr/local/lib, but it was not found…

     

Log in to post a comment.