Build problem on Mac OS 10.8.2 (12C60)

Help
quarus
2012-10-27
2013-06-03
  • quarus
    quarus
    2012-10-27

    Hi,

    I can't get assimp to compile under Mac OS X Mountain Lion using Xcode Version 4.5.1 (4G1004). When trying to build the cmake generated xcode project I get the compiler error below. As you can see I did enable the Boost Workaround since I  don't want to install it on my machine. Any ideas? Switching between LLVM and gcc compiler unfortunately didn't help and it also happen when using Unix Makefiles.

    Any hints are appreciated!

    In file included from /Users/al/Downloads/assimp--3.0.1270-sdk/code/IFCLoader.cpp:49:
    /Users/al/Downloads/assimp--3.0.1270-sdk/code/BoostWorkaround/boost/tuple/tuple.hpp:178:20: error: expected
          expression
                            return m.get<N>();
                                            ^
    /Users/al/Downloads/assimp--3.0.1270-sdk/code/BoostWorkaround/boost/tuple/tuple.hpp:184:20: error: expected
          expression
                            return m.get<N>();
                                            ^
    /Users/al/Downloads/assimp--3.0.1270-sdk/code/BoostWorkaround/boost/tuple/tuple.hpp:211:20: error: expected
          expression
                            return m.get<N>();
                                            ^
    /Users/al/Downloads/assimp--3.0.1270-sdk/code/BoostWorkaround/boost/tuple/tuple.hpp:218:20: error: expected
          expression
                            return m.get<N>();
                                            ^
    /Users/al/Downloads/assimp--3.0.1270-sdk/code/BoostWorkaround/boost/tuple/tuple.hpp:227:12: error: expected
          expression
                    t.get<0>() = t0;
                             ^
    /Users/al/Downloads/assimp--3.0.1270-sdk/code/BoostWorkaround/boost/tuple/tuple.hpp:228:12: error: expected
          expression
                    t.get<1>() = t1;
                             ^
    /Users/al/Downloads/assimp--3.0.1270-sdk/code/BoostWorkaround/boost/tuple/tuple.hpp:229:12: error: expected
          expression
                    t.get<2>() = t2;
                             ^
    /Users/al/Downloads/assimp--3.0.1270-sdk/code/BoostWorkaround/boost/tuple/tuple.hpp:230:12: error: expected
          expression
                    t.get<3>() = t3;
                             ^
    /Users/al/Downloads/assimp--3.0.1270-sdk/code/BoostWorkaround/boost/tuple/tuple.hpp:231:12: error: expected
          expression
                    t.get<4>() = t4;
                             ^
    /Users/al/Downloads/assimp--3.0.1270-sdk/code/BoostWorkaround/boost/tuple/tuple.hpp:240:12: error: expected
          expression
                    t.get<0>() = t0;
                             ^
    /Users/al/Downloads/assimp--3.0.1270-sdk/code/BoostWorkaround/boost/tuple/tuple.hpp:241:12: error: expected
          expression
                    t.get<1>() = t1;
                             ^
    /Users/al/Downloads/assimp--3.0.1270-sdk/code/BoostWorkaround/boost/tuple/tuple.hpp:242:12: error: expected
          expression
                    t.get<2>() = t2;
                             ^
    /Users/al/Downloads/assimp--3.0.1270-sdk/code/BoostWorkaround/boost/tuple/tuple.hpp:243:12: error: expected
          expression
                    t.get<3>() = t3;
                             ^
    /Users/al/Downloads/assimp--3.0.1270-sdk/code/BoostWorkaround/boost/tuple/tuple.hpp:252:12: error: expected
          expression
                    t.get<0>() = t0;
                             ^
    /Users/al/Downloads/assimp--3.0.1270-sdk/code/BoostWorkaround/boost/tuple/tuple.hpp:253:12: error: expected
          expression
                    t.get<1>() = t1;
                             ^
    /Users/al/Downloads/assimp--3.0.1270-sdk/code/BoostWorkaround/boost/tuple/tuple.hpp:254:12: error: expected
          expression
                    t.get<2>() = t2;
                             ^
    /Users/al/Downloads/assimp--3.0.1270-sdk/code/BoostWorkaround/boost/tuple/tuple.hpp:263:12: error: expected
          expression
                    t.get<0>() = t0;
                             ^
    /Users/al/Downloads/assimp--3.0.1270-sdk/code/BoostWorkaround/boost/tuple/tuple.hpp:264:12: error: expected
          expression
                    t.get<1>() = t1;
                             ^
    /Users/al/Downloads/assimp--3.0.1270-sdk/code/BoostWorkaround/boost/tuple/tuple.hpp:272:12: error: expected
          expression
                    t.get<0>() = t0;
                             ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    [/code]
    
     
  • Josep Valls
    Josep Valls
    2013-02-07

    Did you ever figure it out? I am running in the same problem in Mountain Lion, latest Xcode 4.6.

     
  • Kim Kulling
    Kim Kulling
    2013-02-08

    HI,
    one possible workaround is to switch from the NoBoost-version to the latest Boost-version of tuple. Just install boost and generate the makefiles with boost enabled ( which is anyway the default configuration ) by using cmake and try it again.

    And this error sounds suspicious to me. Maybe we can find someone with a Mac to test our stuff on OS X in a more detailed way.

    Kimmi

     

  • Anonymous
    2013-02-08

    Hi,

    I'm having the same problem.  I worked around it by replacing boost::tuple with C++11 std::tuple:

    * Replace #include <boost/tuple/tuple.hpp> with #include <tuple>
    * Replace boost::tuple with  std::tuple
    * Replace abc.get<N>() with std::get<N>(abc)
    * Replace boost::make_tuple with std::make_tuple

    It looks like the NoBoost tuple needs to put an extra template keyword in front of the .get method calls in tuple.hpp:

            // Get a specific tuple element
            template <unsigned N>
            typename detail::type_getter<T0,0,typename very_long::next_type, N>::type& get ()   {
                return m.template get<N>();
            }
    

    Cheers,

    Kester

     
  • Raziel
    Raziel
    2013-03-03

    Is there an ETA on when a fix could be expected for this issue in trunk? Running into the same issue and don't wish to start applying hacks to get it compiling if I can avoid it.

     
  • Kim Kulling
    Kim Kulling
    2013-03-03

    Hii,

    I will add the proposed fix next week. Hopefully this will help you guy's. Sorry, i have forget it!

    Kimmi

     
  • Raziel
    Raziel
    2013-03-16

    Absolutely no need to apologise about it. It's amazing that you guys are providing such a fine library for us to use.

     
  • Kim Kulling
    Kim Kulling
    2013-03-17

    So, fix is delivered. Hopefully works for all compilers, I don't have so much here. Feedback would be great.

    Kimmi

     
  • Raziel
    Raziel
    2013-03-18

    I'm still getting the same compile error as in post #1. Was the fix put into trunk or one of the branches?

     
  • Hi,

    the official repository has moved to Github, so you need to take the trunk from there. I didn't yet find time to make setup a script to git-svn to the old svn repository. Sorry for any inconvenience this may case!

    Apart from that I do think that kimmis fix doesn't fix the issue. The template needs to go in all instances of get, including the non-class functions and the const-version of the one you fixed.

    I don't have osx/llvm here - it would be great if one of you osx guys could provide a full diff so we can really fix this.

    Bye, Alex

     
  • Raziel
    Raziel
    2013-03-19

    I can confirm that I still get the same problem:
    In file included from /Users/Francois/Development/AssImpLatest/code/IFCLoader.cpp:49:
    /Users/Francois/Development/AssImpLatest/code/BoostWorkaround/boost/tuple/tuple.hpp:184:20: error: expected expression
                            return m.get<N>();
                                            ^
    /Users/Francois/Development/AssImpLatest/code/BoostWorkaround/boost/tuple/tuple.hpp:211:20: error: expected expression
                            return m.get<N>();
       etc.

    Francois.