Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build smokegen on Linux? #4

Closed
hakonhagland opened this issue Mar 6, 2022 · 5 comments · Fixed by commonqt/smokegen#1
Closed

How to build smokegen on Linux? #4

hakonhagland opened this issue Mar 6, 2022 · 5 comments · Fixed by commonqt/smokegen#1

Comments

@hakonhagland
Copy link

I am on Ubuntu 21.10, clang version 13.0, Qt version 5.14.2. I tried this:

$ git clone git@github.com:commonqt/smokegen.git
$ cd smokegen
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=/opt/qt/smokegen -DCMAKE_PREFIX_PATH=/opt/qt/qtbase/lib/cmake/Qt5 \
      -DQt5_DIR=/opt/qt/qtbase -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.12") 
-- Found LLVM 13.0.0
-- Using LLVMConfig.cmake in: /lib/llvm-13/cmake
-- Linker detection: GNU ld
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hakon/test/smokegen/build2

$ make -j12
Scanning dependencies of target smokegen
Scanning dependencies of target smokebase
[  4%] Building CXX object smokebase/CMakeFiles/smokebase.dir/smokebase.cpp.o
[  9%] Building CXX object CMakeFiles/smokegen.dir/astvisitor.cpp.o
[ 18%] Building CXX object CMakeFiles/smokegen.dir/frontendaction.cpp.o
[ 18%] Building CXX object CMakeFiles/smokegen.dir/defaultargvisitor.cpp.o
[ 22%] Building CXX object CMakeFiles/smokegen.dir/astconsumer.cpp.o
[ 36%] Building CXX object CMakeFiles/smokegen.dir/options.cpp.o
[ 36%] Building CXX object CMakeFiles/smokegen.dir/main.cpp.o
[ 36%] Building CXX object CMakeFiles/smokegen.dir/ppcallbacks.cpp.o
[ 40%] Building CXX object CMakeFiles/smokegen.dir/type.cpp.o
[ 45%] Linking CXX shared library ../bin/libsmokebase.so
[ 45%] Built target smokebase
Scanning dependencies of target smokeapi
Scanning dependencies of target smokedeptool
[ 50%] Building CXX object smokeapi/CMakeFiles/smokeapi.dir/main.cpp.o
[ 54%] Building CXX object deptool/CMakeFiles/smokedeptool.dir/main.cpp.o
/home/hakon/test/smokegen/type.cpp: In member function ‘bool Type::isAssignable()’:
/home/hakon/test/smokegen/type.cpp:221:1: warning: control reaches end of non-void function [-Wreturn-type]
  221 | }
      | ^
[ 59%] Linking CXX executable ../bin/smokeapi
/home/hakon/test/smokegen/deptool/main.cpp: In function ‘int main(int, char**)’:
/home/hakon/test/smokegen/deptool/main.cpp:104:10: warning: ‘void qSort(RandomAccessIterator, RandomAccessIterator, LessThan) [with RandomAccessIterator = QList<Smoke*>::iterator; LessThan = bool (*)(Smoke*, Smoke*)]’ is deprecated: Use std::sort [-Wdeprecated-declarations]
  104 |     qSort(smokeModules.begin(), smokeModules.end(), smokeModuleLessThan);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/qt/qtbase/include/QtCore/qlist.h:43,
                 from /opt/qt/qtbase/include/QtCore/qobject.h:49,
                 from /opt/qt/qtbase/include/QtCore/qabstractanimation.h:43,
                 from /opt/qt/qtbase/include/QtCore/QtCore:6,
                 from /home/hakon/test/smokegen/deptool/main.cpp:20:
/opt/qt/qtbase/include/QtCore/qalgorithms.h:181:46: note: declared here
  181 | QT_DEPRECATED_X("Use std::sort") inline void qSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan)
      |                                              ^~~~~
/home/hakon/test/smokegen/deptool/main.cpp:108:57: warning: ‘QList<T> QSet<T>::toList() const [with T = Smoke*]’ is deprecated: Use values() instead. [-Wdeprecated-declarations]
  108 |         QList<Smoke*> sortedList = parents[smoke].toList();
      |                                    ~~~~~~~~~~~~~~~~~~~~~^~
In file included from /opt/qt/qtbase/include/QtCore/qdebug.h:52,
                 from /opt/qt/qtbase/include/QtCore/qcborcommon.h:45,
                 from /opt/qt/qtbase/include/QtCore/qcborvalue.h:45,
                 from /opt/qt/qtbase/include/QtCore/qcborarray.h:43,
                 from /opt/qt/qtbase/include/QtCore/QtCore:38,
                 from /home/hakon/test/smokegen/deptool/main.cpp:20:
/opt/qt/qtbase/include/QtCore/qset.h:251:14: note: declared here
  251 |     QList<T> toList() const { return values(); }
      |              ^~~~~~
/home/hakon/test/smokegen/deptool/main.cpp:109:14: warning: ‘void qSort(RandomAccessIterator, RandomAccessIterator, LessThan) [with RandomAccessIterator = QList<Smoke*>::iterator; LessThan = bool (*)(Smoke*, Smoke*)]’ is deprecated: Use std::sort [-Wdeprecated-declarations]
  109 |         qSort(sortedList.begin(), sortedList.end(), smokeModuleLessThan);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/qt/qtbase/include/QtCore/qlist.h:43,
                 from /opt/qt/qtbase/include/QtCore/qobject.h:49,
                 from /opt/qt/qtbase/include/QtCore/qabstractanimation.h:43,
                 from /opt/qt/qtbase/include/QtCore/QtCore:6,
                 from /home/hakon/test/smokegen/deptool/main.cpp:20:
/opt/qt/qtbase/include/QtCore/qalgorithms.h:181:46: note: declared here
  181 | QT_DEPRECATED_X("Use std::sort") inline void qSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan)
      |                                              ^~~~~
[ 59%] Built target smokeapi
[ 63%] Linking CXX executable ../bin/smokedeptool
[ 63%] Built target smokedeptool
/home/hakon/test/smokegen/main.cpp: In function ‘int main(int, char**)’:
/home/hakon/test/smokegen/main.cpp:272:21: error: ‘class clang::tooling::ToolInvocation’ has no member named ‘mapVirtualFile’
  272 |                 inv.mapVirtualFile(f->filename, { f->content, f->size });
      |                     ^~~~~~~~~~~~~~
/home/hakon/test/smokegen/main.cpp:289:34: error: exception handling disabled, use ‘-fexceptions’ to enable
  289 |     catch (const std::exception& e)
      |                                  ^
/home/hakon/test/smokegen/main.cpp:291:47: error: ‘e’ was not declared in this scope; did you mean ‘llvm::numbers::e’?
  291 |         std::cout << "An error occured: " <<  e.what();
      |                                               ^
      |                                               llvm::numbers::e
In file included from /usr/lib/llvm-13/include/llvm/ADT/DenseMap.h:20,
                 from /usr/lib/llvm-13/include/clang/Basic/FileManager.h:21,
                 from /usr/lib/llvm-13/include/clang/Tooling/Tooling.h:33,
                 from /home/hakon/test/smokegen/main.cpp:32:
/usr/lib/llvm-13/include/llvm/Support/MathExtras.h:57:18: note: ‘llvm::numbers::e’ declared here
   57 | constexpr double e          = 2.7182818284590452354, // (0x1.5bf0a8b145749P+1) https://oeis.org/A001113
      |                  ^
make[2]: *** [CMakeFiles/smokegen.dir/build.make:134: CMakeFiles/smokegen.dir/main.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/hakon/test/smokegen/astvisitor.cpp: In member function ‘Type* SmokegenASTVisitor::registerType(clang::QualType) const’:
/home/hakon/test/smokegen/astvisitor.cpp:530:104: error: no matching function for call to ‘llvm::APSInt::toString(int)’
  530 |                             tempArgType.setName(QString::fromStdString(args[i].getAsIntegral().toString(10)));
      |                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
In file included from /usr/lib/llvm-13/include/clang/AST/Type.h:34,
                 from /usr/lib/llvm-13/include/clang/AST/CanonicalType.h:17,
                 from /usr/lib/llvm-13/include/clang/AST/ASTContext.h:19,
                 from /home/hakon/test/smokegen/astvisitor.cpp:4:
/usr/lib/llvm-13/include/llvm/ADT/APSInt.h:82:8: note: candidate: ‘void llvm::APSInt::toString(llvm::SmallVectorImpl<char>&, unsigned int) const’
   82 |   void toString(SmallVectorImpl<char> &Str, unsigned Radix = 10) const {
      |        ^~~~~~~~
/usr/lib/llvm-13/include/llvm/ADT/APSInt.h:82:40: note:   no known conversion for argument 1 from ‘int’ to ‘llvm::SmallVectorImpl<char>&’
   82 |   void toString(SmallVectorImpl<char> &Str, unsigned Radix = 10) const {
      |                 ~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/lib/llvm-13/include/clang/AST/Type.h:33,
                 from /usr/lib/llvm-13/include/clang/AST/CanonicalType.h:17,
                 from /usr/lib/llvm-13/include/clang/AST/ASTContext.h:19,
                 from /home/hakon/test/smokegen/astvisitor.cpp:4:
/usr/lib/llvm-13/include/llvm/ADT/APInt.h:1741:8: note: candidate: ‘void llvm::APInt::toString(llvm::SmallVectorImpl<char>&, unsigned int, bool, bool) const’
 1741 |   void toString(SmallVectorImpl<char> &Str, unsigned Radix, bool Signed,
      |        ^~~~~~~~
/usr/lib/llvm-13/include/llvm/ADT/APInt.h:1741:8: note:   candidate expects 4 arguments, 1 provided
make[2]: *** [CMakeFiles/smokegen.dir/build.make:95: CMakeFiles/smokegen.dir/astvisitor.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:295: CMakeFiles/smokegen.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
@hakonhagland
Copy link
Author

Sorry it seems like it used gcc instead of clang, here is a new try (it still produces similar errors) with clang:

$ cmake .. -DCMAKE_INSTALL_PREFIX=/opt/qt/smokegen -DQt5_DIR=/opt/qt/qtbase -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang-13 -DCMAKE_CXX_COMPILER=clang++-13 -DCMAKE_PREFIX_PATH=/opt/qt/qtbase/lib/cmake/Qt5
-- The C compiler identification is Clang 13.0.0
-- The CXX compiler identification is Clang 13.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /bin/clang-13 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /bin/clang++-13 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.12") 
-- Found LLVM 13.0.0
-- Using LLVMConfig.cmake in: /lib/llvm-13/cmake
-- Linker detection: GNU ld
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hakon/test/smokegen/build

$ make -j12
Scanning dependencies of target smokegen
Scanning dependencies of target smokebase
[  4%] Building CXX object smokebase/CMakeFiles/smokebase.dir/smokebase.cpp.o
[  9%] Building CXX object CMakeFiles/smokegen.dir/astconsumer.cpp.o
[ 13%] Building CXX object CMakeFiles/smokegen.dir/main.cpp.o
[ 22%] Building CXX object CMakeFiles/smokegen.dir/astvisitor.cpp.o
[ 27%] Building CXX object CMakeFiles/smokegen.dir/frontendaction.cpp.o
[ 27%] Building CXX object CMakeFiles/smokegen.dir/defaultargvisitor.cpp.o
[ 36%] Building CXX object CMakeFiles/smokegen.dir/options.cpp.o
[ 36%] Building CXX object CMakeFiles/smokegen.dir/type.cpp.o
[ 40%] Building CXX object CMakeFiles/smokegen.dir/ppcallbacks.cpp.o
[ 45%] Linking CXX shared library ../bin/libsmokebase.so
[ 45%] Built target smokebase
Scanning dependencies of target smokeapi
Scanning dependencies of target smokedeptool
[ 50%] Building CXX object smokeapi/CMakeFiles/smokeapi.dir/main.cpp.o
[ 54%] Building CXX object deptool/CMakeFiles/smokedeptool.dir/main.cpp.o
/home/hakon/test/smokegen/type.cpp:221:1: warning: non-void function does not return a value in all control paths [-Wreturn-type]
}
^
1 warning generated.
/home/hakon/test/smokegen/deptool/main.cpp:104:5: warning: 'qSort<QList<Smoke *>::iterator, bool (*)(Smoke *, Smoke *)>' is deprecated: Use std::sort [-Wdeprecated-declarations]
    qSort(smokeModules.begin(), smokeModules.end(), smokeModuleLessThan);
    ^
/opt/qt/qtbase/include/QtCore/qalgorithms.h:181:1: note: 'qSort<QList<Smoke *>::iterator, bool (*)(Smoke *, Smoke *)>' has been explicitly marked deprecated here
QT_DEPRECATED_X("Use std::sort") inline void qSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan)
^
/opt/qt/qtbase/include/QtCore/qglobal.h:294:33: note: expanded from macro 'QT_DEPRECATED_X'
#  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
                                ^
/opt/qt/qtbase/include/QtCore/qcompilerdetection.h:676:55: note: expanded from macro 'Q_DECL_DEPRECATED_X'
#    define Q_DECL_DEPRECATED_X(text) __attribute__ ((__deprecated__(text)))
                                                      ^
/home/hakon/test/smokegen/deptool/main.cpp:108:51: warning: 'toList' is deprecated: Use values() instead. [-Wdeprecated-declarations]
        QList<Smoke*> sortedList = parents[smoke].toList();
                                                  ^
/opt/qt/qtbase/include/QtCore/qset.h:250:5: note: 'toList' has been explicitly marked deprecated here
    QT_DEPRECATED_X("Use values() instead.")
    ^
/opt/qt/qtbase/include/QtCore/qglobal.h:294:33: note: expanded from macro 'QT_DEPRECATED_X'
#  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
                                ^
/opt/qt/qtbase/include/QtCore/qcompilerdetection.h:676:55: note: expanded from macro 'Q_DECL_DEPRECATED_X'
#    define Q_DECL_DEPRECATED_X(text) __attribute__ ((__deprecated__(text)))
                                                      ^
/home/hakon/test/smokegen/deptool/main.cpp:109:9: warning: 'qSort<QList<Smoke *>::iterator, bool (*)(Smoke *, Smoke *)>' is deprecated: Use std::sort [-Wdeprecated-declarations]
        qSort(sortedList.begin(), sortedList.end(), smokeModuleLessThan);
        ^
/opt/qt/qtbase/include/QtCore/qalgorithms.h:181:1: note: 'qSort<QList<Smoke *>::iterator, bool (*)(Smoke *, Smoke *)>' has been explicitly marked deprecated here
QT_DEPRECATED_X("Use std::sort") inline void qSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan)
^
/opt/qt/qtbase/include/QtCore/qglobal.h:294:33: note: expanded from macro 'QT_DEPRECATED_X'
#  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
                                ^
/opt/qt/qtbase/include/QtCore/qcompilerdetection.h:676:55: note: expanded from macro 'Q_DECL_DEPRECATED_X'
#    define Q_DECL_DEPRECATED_X(text) __attribute__ ((__deprecated__(text)))
                                                      ^
[ 59%] Linking CXX executable ../bin/smokeapi
3 warnings generated.
[ 63%] Linking CXX executable ../bin/smokedeptool
[ 63%] Built target smokeapi
[ 63%] Built target smokedeptool
/home/hakon/test/smokegen/astvisitor.cpp:530:96: error: no matching member function for call to 'toString'
                            tempArgType.setName(QString::fromStdString(args[i].getAsIntegral().toString(10)));
                                                                       ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/usr/lib/llvm-13/include/llvm/ADT/APSInt.h:82:8: note: candidate function not viable: no known conversion from 'int' to 'SmallVectorImpl<char> &' for 1st argument
  void toString(SmallVectorImpl<char> &Str, unsigned Radix = 10) const {
       ^
/usr/lib/llvm-13/include/llvm/ADT/APInt.h:1741:8: note: candidate function not viable: requires at least 3 arguments, but 1 was provided
  void toString(SmallVectorImpl<char> &Str, unsigned Radix, bool Signed,
       ^
/home/hakon/test/smokegen/astvisitor.cpp:530:72: error: reference to type 'const std::string' (aka 'const basic_string<char>') could not bind to an rvalue of type 'void'
                            tempArgType.setName(QString::fromStdString(args[i].getAsIntegral().toString(10)));
                                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/qt/qtbase/include/QtCore/qstring.h:1506:58: note: passing argument to parameter 's' here
inline QString QString::fromStdString(const std::string &s)
                                                         ^
/home/hakon/test/smokegen/main.cpp:272:21: error: no member named 'mapVirtualFile' in 'clang::tooling::ToolInvocation'
                inv.mapVirtualFile(f->filename, { f->content, f->size });
                ~~~ ^
/home/hakon/test/smokegen/main.cpp:61:5: error: cannot use 'try' with exceptions disabled
    try
    ^
2 errors generated.
make[2]: *** [CMakeFiles/smokegen.dir/build.make:134: CMakeFiles/smokegen.dir/main.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
2 errors generated.
make[2]: *** [CMakeFiles/smokegen.dir/build.make:95: CMakeFiles/smokegen.dir/astvisitor.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:295: CMakeFiles/smokegen.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

@hakonhagland
Copy link
Author

/home/hakon/test/smokegen/astvisitor.cpp:530:96: error: no matching member function for call to 'toString'
                            tempArgType.setName(QString::fromStdString(args[i].getAsIntegral().toString(10)));
                                                                       ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/usr/lib/llvm-13/include/llvm/ADT/APSInt.h:82:8: note: candidate function not viable: no known conversion from 'int' to 'SmallVectorImpl<char> &' for 1st argument
  void toString(SmallVectorImpl<char> &Str, unsigned Radix = 10) const {
       ^
/usr/lib/llvm-13/include/llvm/ADT/APInt.h:1741:8: note: candidate function not viable: requires at least 3 arguments, but 1 was provided
  void toString(SmallVectorImpl<char> &Str, unsigned Radix, bool Signed,

Similar problem here.

@hakonhagland
Copy link
Author

Yes problem seems to be with LLVM-13, it compiles with no error if change to version 11:

/bin/clang++-11 -DQT_CORE_LIB -DQT_NO_DEBUG -DQT_XML_LIB -D__GENERATOR_BUILDING \
     -Dsmokegen_EXPORTS -I/usr/lib/llvm-11/include \
     -I. -isystem /opt/qt/qtbase/include \
     -isystem /opt/qt/qtbase/include/QtCore \
     -isystem /opt/qt/qtbase/./mkspecs/linux-g++ \
     -isystem /opt/qt/qtbase/include/QtXml \
     -O3 -DNDEBUG   -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS \
     -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS  \
     -fno-exceptions -fPIC -o CMakeFiles/smokegen.dir/astvisitor.cpp.o \
     -c ../astvisitor.cpp

@hakonhagland
Copy link
Author

Recompiling with clang-11 and LLVM-11 now gives one error:

$ cmake .. -DCMAKE_INSTALL_PREFIX=/opt/qt/smokegen \
    -DCMAKE_PREFIX_PATH="/opt/qt/qtbase/lib/cmake/Qt5;/usr/lib/llvm-11/lib/cmake/llvm" \
    -DQt5_DIR=/opt/qt/qtbase -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_C_COMPILER=clang-11 -DCMAKE_CXX_COMPILER=clang++-11
-- The C compiler identification is Clang 11.0.1
-- The CXX compiler identification is Clang 11.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /bin/clang-11 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /bin/clang++-11 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found LLVM 11.0.1
-- Using LLVMConfig.cmake in: /usr/lib/llvm-11/lib/cmake/llvm
-- Linker detection: GNU ld
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hakon/pcl/data/p/desktop/emacs/desktop/scratch/common-lisp--packages--common-qt5--smokegen--build/smokegen/build
hakon@hakon-Precision-7530:~/pcl/data/p/desktop/emacs/desktop/scratch/common-lisp--packages--common-qt5--smokegen--build/smokegen/build$ make -j12
Scanning dependencies of target smokebase
Scanning dependencies of target smokegen
[  4%] Building CXX object smokebase/CMakeFiles/smokebase.dir/smokebase.cpp.o
[  9%] Building CXX object CMakeFiles/smokegen.dir/astconsumer.cpp.o
[ 13%] Building CXX object CMakeFiles/smokegen.dir/main.cpp.o
[ 27%] Building CXX object CMakeFiles/smokegen.dir/defaultargvisitor.cpp.o
[ 27%] Building CXX object CMakeFiles/smokegen.dir/astvisitor.cpp.o
[ 27%] Building CXX object CMakeFiles/smokegen.dir/frontendaction.cpp.o
[ 40%] Building CXX object CMakeFiles/smokegen.dir/options.cpp.o
[ 40%] Building CXX object CMakeFiles/smokegen.dir/type.cpp.o
[ 40%] Building CXX object CMakeFiles/smokegen.dir/ppcallbacks.cpp.o
[ 45%] Linking CXX shared library ../bin/libsmokebase.so
[ 45%] Built target smokebase
Scanning dependencies of target smokeapi
Scanning dependencies of target smokedeptool
[ 50%] Building CXX object smokeapi/CMakeFiles/smokeapi.dir/main.cpp.o
[ 54%] Building CXX object deptool/CMakeFiles/smokedeptool.dir/main.cpp.o
/home/hakon/pcl/data/p/desktop/emacs/desktop/scratch/common-lisp--packages--common-qt5--smokegen--build/smokegen/type.cpp:221:1: warning: non-void function does not return a value in all control paths [-Wreturn-type]
}
^
1 warning generated.
/home/hakon/pcl/data/p/desktop/emacs/desktop/scratch/common-lisp--packages--common-qt5--smokegen--build/smokegen/deptool/main.cpp:104:5: warning: 'qSort<QList<Smoke *>::iterator, bool (*)(Smoke *, Smoke *)>' is deprecated: Use std::sort [-Wdeprecated-declarations]
    qSort(smokeModules.begin(), smokeModules.end(), smokeModuleLessThan);
    ^
/opt/qt/qtbase/include/QtCore/qalgorithms.h:181:1: note: 'qSort<QList<Smoke *>::iterator, bool (*)(Smoke *, Smoke *)>' has been explicitly marked deprecated here
QT_DEPRECATED_X("Use std::sort") inline void qSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan)
^
/opt/qt/qtbase/include/QtCore/qglobal.h:294:33: note: expanded from macro 'QT_DEPRECATED_X'
#  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
                                ^
/opt/qt/qtbase/include/QtCore/qcompilerdetection.h:676:55: note: expanded from macro 'Q_DECL_DEPRECATED_X'
#    define Q_DECL_DEPRECATED_X(text) __attribute__ ((__deprecated__(text)))
                                                      ^
/home/hakon/pcl/data/p/desktop/emacs/desktop/scratch/common-lisp--packages--common-qt5--smokegen--build/smokegen/deptool/main.cpp:108:51: warning: 'toList' is deprecated: Use values() instead. [-Wdeprecated-declarations]
        QList<Smoke*> sortedList = parents[smoke].toList();
                                                  ^
/opt/qt/qtbase/include/QtCore/qset.h:250:5: note: 'toList' has been explicitly marked deprecated here
    QT_DEPRECATED_X("Use values() instead.")
    ^
/opt/qt/qtbase/include/QtCore/qglobal.h:294:33: note: expanded from macro 'QT_DEPRECATED_X'
#  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
                                ^
/opt/qt/qtbase/include/QtCore/qcompilerdetection.h:676:55: note: expanded from macro 'Q_DECL_DEPRECATED_X'
#    define Q_DECL_DEPRECATED_X(text) __attribute__ ((__deprecated__(text)))
                                                      ^
/home/hakon/pcl/data/p/desktop/emacs/desktop/scratch/common-lisp--packages--common-qt5--smokegen--build/smokegen/deptool/main.cpp:109:9: warning: 'qSort<QList<Smoke *>::iterator, bool (*)(Smoke *, Smoke *)>' is deprecated: Use std::sort [-Wdeprecated-declarations]
        qSort(sortedList.begin(), sortedList.end(), smokeModuleLessThan);
        ^
/opt/qt/qtbase/include/QtCore/qalgorithms.h:181:1: note: 'qSort<QList<Smoke *>::iterator, bool (*)(Smoke *, Smoke *)>' has been explicitly marked deprecated here
QT_DEPRECATED_X("Use std::sort") inline void qSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan)
^
/opt/qt/qtbase/include/QtCore/qglobal.h:294:33: note: expanded from macro 'QT_DEPRECATED_X'
#  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
                                ^
/opt/qt/qtbase/include/QtCore/qcompilerdetection.h:676:55: note: expanded from macro 'Q_DECL_DEPRECATED_X'
#    define Q_DECL_DEPRECATED_X(text) __attribute__ ((__deprecated__(text)))
                                                      ^
3 warnings generated.
[ 59%] Linking CXX executable ../bin/smokedeptool
[ 59%] Built target smokedeptool
[ 63%] Linking CXX executable ../bin/smokeapi
[ 63%] Built target smokeapi
/home/hakon/pcl/data/p/desktop/emacs/desktop/scratch/common-lisp--packages--common-qt5--smokegen--build/smokegen/main.cpp:61:5: error: cannot use 'try' with exceptions disabled
    try
    ^
1 error generated.
make[2]: *** [CMakeFiles/smokegen.dir/build.make:134: CMakeFiles/smokegen.dir/main.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:295: CMakeFiles/smokegen.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

@hakonhagland
Copy link
Author

main.cpp:61:5: error: cannot use 'try' with exceptions disabled

It looks like it was the LLVM cmake function llvm_update_compile_flags that added a -fno-exceptions flag to the COMPILE_FLAGS property of the target. I have added a PR to address this, see commonqt/smokegen#1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant