Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthornicoh
    • CommentTimeApr 21st 2017 edited
     

    Hi,

    I am trying to build the latest version of KLayout from your Git on macOS Sierra. I am trying to build this using QT5 support (since retina screens are supported in QT5). However, I am struggling to build this version on macOS. I had no trouble building it on a Ubuntu box, however, on my mac system, it stops building and gives the following error:

    ../klayout/src/gsi/gsiClass.h:256:24: error: 'take_object' following the 'template' keyword does not refer to a template return from.template take_object<X> ();

    ../klayout/src/gsi/gsiClass.h:256:35: error: expected unqualified-id return from.template take_object<X> ();
    ../klayout/src/gsi/gsiClass.h:256:36: error: 'X' does not refer to a value return from.template take_object<X> ();
    ../klayout/src/gsi/gsiClass.h:253:17: note: declared here template <class X>
    ../klayout/src/gsi/gsiClass.h:256:40: error: expected expression return from.template take_object<X> ();

    I tried to build both using Apple's build-in clang, as well as a homebrew version of gcc/g++, but both give this error. Any suggestions on how to fix this issue?

    • CommentAuthorMatthias
    • CommentTimeApr 21st 2017 edited
     

    Hi nicoh,

    which clang and gcc version are you using?

    You can try to delete the "template" keyword. That may break the build on other systems, so I have to check that for other compilers.

    Matthias

    P.S. please don't expect the master on GitHub to be stable.

    • CommentAuthornicoh
    • CommentTimeApr 24th 2017
     

    Hi Matthias,

    Thanks for your comment. I am using Apple LLVM version 8.1.0 (clang-802.0.41) and also i have tried gcc 6.3.0.

    What exactly do you mean by 'delete the template keyword'? If I comment out the section of code (253-256) that gives these errors, it will build on for quite some time, before stopping the build at:

    ../klayout/src/db/dbLibraryManager.cc:36:80: error: explicit specialization of 'instance' after instantiation template<> DB_PUBLIC tl::Registrar<db::Library> *tl::Registrar<db::Library>::instance = 0;

    • CommentAuthorMatthias
    • CommentTimeApr 25th 2017
     

    I mean:

    replace

    from.template take_object<X> ();
    

    by

    from.take_object<X> ();
    

    Matthias

    • CommentAuthornicoh
    • CommentTimeMay 3rd 2017 edited
     
    Thanks for the reply. This also does not seem to help:
    ../klayout/src/gsi/gsiClass.h:256:15: error: use of undeclared identifier 'take_object' return from take_object<X> ();
    ../klayout/src/gsi/gsiClass.h:256:27: error: 'X' does not refer to a value return from take_object<X> ();
    ../klayout/src/gsi/gsiClass.h:253:17: note: declared here template <class X>
    ../klayout/src/gsi/gsiClass.h:256:31: error: expected expression return from take_object<X> ();