Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Compilation with fedora 28 fails

Hello,

I get the following error message when trying to compile with QT5 (fedora only provides ruby 2.3, so I need to compile it against this newer version)

Has anyone an Idea?

Thank you

Théophane

g++ -c -pipe -fvisibility=hidden -O2 -Wall -W -pedantic -Woverloaded-virtual -Wsign-promo -Wsynth -Wno-deprecated -Wno-long-long -Wno-strict-aliasing -Wno-deprecated-declarations -Wno-reserved-user-defined-literal -D_REENTRANT -fPIC -DHAVE_QTBINDINGS -DHAVE_PYTHON -DHAVE_RUBY -DHAVE_RUBY_VERSION_CODE=20501 -DKLAYOUT_VERSION=0.25.4 -DKLAYOUT_VERSION_REV=753e170a -DKLAYOUT_VERSION_DATE=2018-09-05 -DKLAYOUT_MAJOR_VERSION=0 -DKLAYOUT_MINOR_VERSION=25 -DKLAYOUT_TINY_VERSION=4 -DMAKE_DB_LIBRARY -DQT_NO_DEBUG -DQT_DESIGNER_LIB -DQT_UIPLUGIN_LIB -DQT_PRINTSUPPORT_LIB -DQT_MULTIMEDIAWIDGETS_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_XMLPATTERNS_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I../../../src/db/db -I. -I../../../src/tl/tl -I../../../src/gsi/gsi -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtDesigner -isystem /usr/include/qt5/QtUiPlugin -isystem /usr/include/qt5/QtPrintSupport -isystem /usr/include/qt5/QtMultimediaWidgets -isystem /usr/include/qt5/QtSvg -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtMultimedia -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtXmlPatterns -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtSql -isystem /usr/include/qt5/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib64/qt5/mkspecs/linux-g++ -o dbCellMapping.o ../../../src/db/db/dbCellMapping.cc

In file included from /usr/include/c++/8/bits/stl_algobase.h:66,
from /usr/include/c++/8/algorithm:61,
from ../../../src/db/db/dbArray.h:30,
from ../../../src/db/db/dbLayout.h:29,
from ../../../src/db/db/dbCellMapping.cc:24:
/usr/include/c++/8/bits/stl_iterator_base_funcs.h: In instantiation of ‘constexpr void std::__advance(_RandomAccessIterator&, _Distance, std::random_access_iterator_tag) [with _RandomAccessIterator = db::SortedCellIndexIterator; _Distance = long unsigned int]’:
/usr/include/c++/8/bits/stl_iterator_base_funcs.h:206:21: required from ‘void std::advance(_InputIterator&, _Distance) [with _InputIterator = db::SortedCellIndexIterator; _Distance = long unsigned int]’
/usr/include/c++/8/bits/stl_algobase.h:958:16: required from ‘_ForwardIterator std::__lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&, _Compare) [with _ForwardIterator = db::SortedCellIndexIterator; _Tp = unsigned int; _Compare = __gnu_cxx::__ops::_Iter_less_val]’
/usr/include/c++/8/bits/stl_algobase.h:993:32: required from ‘_ForwardIterator std::lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = db::SortedCellIndexIterator; _Tp = unsigned int]’
../../../src/db/db/dbCellMapping.cc:191:48: required from here
/usr/include/c++/8/bits/stl_iterator_base_funcs.h:183:2: error: no match for ‘operator--’ (operand type is ‘db::SortedCellIndexIterator’)
--__i;
^~~~~
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-reserved-user-defined-literal’
gmake[2]: *** [Makefile:1663: dbCellMapping.o] Error 1
gmake[2]: Leaving directory '/home/theophane/klayout/build-release/db/db'
gmake[1]: *** [Makefile:46: sub-db-make_first] Error 2
gmake[1]: Leaving directory '/home/theophane/klayout/build-release/db'
gmake: *** [Makefile:167: sub-db-make_first] Error 2

Comments

  • Hi,

    what STL and/or gcc is Fedora using? /usr/include/c++/8 isn't a version I have seen on gcc. Maybe that is actually clang?

    The issue is basically that the "lower_bound" algorithm implementation requires a operator-- for forward iterators … that does not really make sense. Other STL implementations do not need this.

    Matthias

  • Hi,

    This was gcc 8
    I tried with clang 6 as well and got the following error:

    clang++ -c -pipe -fvisibility=hidden -O2 -Wall -W -pedantic -Woverloaded-virtual -Wsign-promo -Wsynth -Wno-deprecated -Wno-long-long -Wno-strict-aliasing -Wno-deprecated-declarations -Wno-reserved-user-defined-literal -D_REENTRANT -fPIC -DKLAYOUT_VERSION= -DKLAYOUT_VERSION_REV= -DKLAYOUT_VERSION_DATE= -DKLAYOUT_MAJOR_VERSION= -DKLAYOUT_MINOR_VERSION= -DKLAYOUT_TINY_VERSION=0 -DMAKE_DB_LIBRARY -DQT_NO_DEBUG -DQT_DESIGNER_LIB -DQT_UIPLUGIN_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I../../../src/db/db -I. -I../../../src/tl/tl -I../../../src/gsi/gsi -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtDesigner -isystem /usr/include/qt5/QtUiPlugin -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtSql -isystem /usr/include/qt5/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib64/qt5/mkspecs/linux-clang -o dbCellMapping.o ../../../src/db/db/dbCellMapping.cc
    In file included from ../../../src/db/db/dbCellMapping.cc:24:
    In file included from ../../../src/db/db/dbLayout.h:29:
    In file included from ../../../src/db/db/dbArray.h:30:
    In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/algorithm:61:
    In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/stl_algobase.h:66:
    /usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/stl_iterator_base_funcs.h:183:2: error: cannot decrement value of type 'db::SortedCellIndexIterator'
    --__i;
    ^ ~~~
    /usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/stl_iterator_base_funcs.h:206:12: note: in instantiation of function template specialization 'std::__advance<db::SortedCellIndexIterator, unsigned long>' requested here
    std::__advance(__i, __d, std::__iterator_category(__i));
    ^
    /usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/stl_algobase.h:958:9: note: in instantiation of function template specialization 'std::advance<db::SortedCellIndexIterator, unsigned long>' requested here
    std::advance(__middle, __half);
    ^
    /usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/stl_algobase.h:993:19: note: in instantiation of function template specialization 'std::__lower_bound<db::SortedCellIndexIterator, unsigned int, __gnu_cxx::__ops::_Iter_less_val>' requested here
    return std::__lower_bound(__first, __last, __val,
    ^
    ../../../src/db/db/dbCellMapping.cc:191:25: note: in instantiation of function template specialization 'std::lower_bound<db::SortedCellIndexIterator, unsigned int>' requested here
    for (i = std::lower_bound (i, end, *c); i != end && *i == *c; ++i) {
    ^
    1 error generated.
    make[2]: *** [Makefile:1664: dbCellMapping.o] Error 1
    make[2]: Leaving directory '/home/theophane/klayout/build-klayout-clang-Release/db/db'
    make[1]: Leaving directory '/home/theophane/klayout/build-klayout-clang-Release/db'
    make[1]: *** [Makefile:46: sub-db-make_first] Error 2
    make: *** [Makefile:163: sub-db-make_first] Error 2
    09:19:19: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project klayout (kit: clang)
    When executing step "Make"

    Best,

    Théophane

  • Hi,

    Apparently it's the STL - clang uses the same STL than gcc.

    I can't say why this STL can't digest the KLayout iterators. I've been using many different STL implementations including (recently) the one from Microsoft. No issue so far. Maybe it's easy to add an operator-- to SortedCellIndexIterator, but without some testing I can't tell.

    Matthias

  • Hi Matthias

    I unfortunately don't have the knowledge to understand, try and fix the problem.

    Thanks for your help, Grüße :)

    Théophane

  • I'll try to follow up on this, but please don't expect a quick response. Supporting yet another Linux variant is not on my top priority list.

    Regards,

    Matthias

  • Just a suggestion,
    Have you already thought of providing an AppImage package in addition to your centos package?

    Cheers

    Theo

  • Hi Theo,

    As I understand AppImage, this package solves the distribution issue but not the deployment topic. I still need to support compatibility and provide the build infrastructure.

    I'm still hoping to enter pull mode when the package managers pull the sources from GitHub rather than me pushing the distro packages.

    Matthias

Sign In or Register to comment.