Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

compiling problems on Mac OS 10.4.x

Help
2006-05-01
2013-04-09
  • I'm getting some compiling errors depending on which version of gcc I am using:

    gcc 3.3:

    ld: Undefined symbols:
    __ZN9__gnu_cxx12__atomic_addEPVii
    __ZN9__gnu_cxx18__exchange_and_addEPVii
    __ZNSs4_Rep20_S_empty_rep_storageE
    __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base
    __ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base
    __ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_
    _sprintf$LDBLStub
    _fprintf$LDBLStub
    make[2]: *** [OpenFlower] Error 1
    make[1]: *** [install-recursive] Error 1
    make: *** [install-recursive] Error 1

    gcc 4.0:

    /usr/bin/ld: Undefined symbols:
    __ZNSaIcED4Ev
    std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage
    __ZNSt15basic_streambufIcSt11char_traitsIcEEC4Ev
    __ZNSt15basic_streambufIcSt11char_traitsIcEED4Ev
    std::__default_alloc_template<true, 0>::deallocate(void*, unsigned long)
    std::__default_alloc_template<true, 0>::_S_force_new
    std::__default_alloc_template<true, 0>::_S_free_list
    std::__default_alloc_template<true, 0>::_S_node_allocator_lock
    std::__default_alloc_template<true, 0>::_S_refill(unsigned long)
    std::__default_alloc_template<true, 0>::allocate(unsigned long)
    __ZNSt24__default_alloc_templateILb1ELi0EE5_LockD4Ev
    collect2: ld returned 1 exit status
    make[3]: *** [OpenFlower] Error 1
    make[2]: *** [all-recursive] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2

    Not too sure how to overcome these errors (moderately versed in Unix).  Anyone have any ideas?  Is there any way to update my gcc libraries to have these functions? Thanks-

     
    • As an add-on to my above question:  what type of machine and compiler is the 'platform-independent' code written for?

       
    • I'm trying to install openflower on Mac OsX too. Do you use the 'make' command to compile ?

      By my side, i just still have 1 error:

      /usr/bin/ld: can't locate file for: -llaspack
      collect2: ld returned 1 exit status
      make[1]: *** [OpenFlower] Error 1
      make: *** [all-recursive] Error 1

      this is the last one, but I can't solve it. Does anyone got the solution ?

       
    • Here's what I did to compile it in 10.4.

      1) Get laspack from http://www.mgnet.org/mgnet/Codes/laspack/, be certain that all old laspack files are removed. They screw thigns up for some reason.

      2) Get XCode tools 2.3 from apple. Installing this should not be a big deal.

      3) Open a terminal, and go to /usr  . Make certain you have a directory labled local in /usr  . If not, create it using

      sudo mkdir /usr/local

      Navigate to the folder where you extracted laspack. Run

      ./install local

      This installs laspack in /usr/local.

      4) Make certain /usr/local/bin is in your path. To do that, enter

      echo $PATH

      in your terminal.

      5) Now comes the tricky part. Download openflower's source, and go into the {openflower}/src directory. Two files need to be edited to make it gcc 4.0 compliant. Open the {openflower}/src/Maths/OpConvection.cpp file ina  text editor. Add the line

      #include<cmath>

      directly beneath the line #include <iostream>. This includes the standard math library. Next, open {openflower}/src/Geometry/Mesh.cpp and add the line

      #include<cmath>

      below #include<iostream> just like you did in the previous file. Save both files, and go back to the terminal.

      6) In the openflower directory, enter

      ./configure

      to configure the make file.

      7) Still in the openflower directory, enter

      make

      This will produce a binary file in the src directory. Move it wherever you want (/usr/local/bin is always good, or /usr/bin).

      Hope this helped!

      -John

       
    • I noticed an error in my post above. Obviously, there needs to be a space in the include statements (#include <cmath>).

      -John