XRay3D / GERBER_X3

Program for preparing G-code for milling of printed circuit boards on CNC. You can use it as a converter to a PDF file.
193 stars 48 forks source link

Ошибка при линковке под Linux #122

Closed ronindev closed 2 months ago

ronindev commented 2 months ago

Ubuntu 22.04

[ 62%] Linking CXX shared library /home/ronin/software/GERBER_X3/bin/Qt5.15_gnu_x64/plugins/libfldxf.so
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_codedata.cpp.o:(.data.rel.ro.local+0x0): multiple definition of `Dxf::CodeData::staticMetaObject'; CMakeFiles/fldxf.dir/dxf_codedata.cpp.o:(.data.rel.ro.local+0x0): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_entity.cpp.o:(.data.rel.ro.local+0x0): multiple definition of `Dxf::Entity::staticMetaObject'; CMakeFiles/fldxf.dir/entities/dxf_entity.cpp.o:(.data.rel.ro.local+0x0): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_mtext.cpp.o:(.data.rel.local+0x0): multiple definition of `Dxf::MText::staticMetaObject'; CMakeFiles/fldxf.dir/entities/dxf_mtext.cpp.o:(.data.rel.local+0x0): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_plugin.cpp.o: in function `Dxf::Plugin::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)':
moc_dxf_plugin.cpp:(.text+0x0): multiple definition of `Dxf::Plugin::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)'; CMakeFiles/fldxf.dir/dxf_plugin.cpp.o:dxf_plugin.cpp:(.text+0x243e): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_plugin.cpp.o:(.data.rel.ro+0x0): multiple definition of `Dxf::Plugin::staticMetaObject'; CMakeFiles/fldxf.dir/dxf_plugin.cpp.o:(.data.rel.ro+0x0): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_plugin.cpp.o: in function `Dxf::Plugin::metaObject() const':
moc_dxf_plugin.cpp:(.text+0x1a): multiple definition of `Dxf::Plugin::metaObject() const'; CMakeFiles/fldxf.dir/dxf_plugin.cpp.o:dxf_plugin.cpp:(.text+0x2458): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_plugin.cpp.o: in function `Dxf::Plugin::qt_metacast(char const*)':
moc_dxf_plugin.cpp:(.text+0x66): multiple definition of `Dxf::Plugin::qt_metacast(char const*)'; CMakeFiles/fldxf.dir/dxf_plugin.cpp.o:dxf_plugin.cpp:(.text+0x24a4): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_plugin.cpp.o: in function `Dxf::Plugin::qt_metacall(QMetaObject::Call, int, void**)':
moc_dxf_plugin.cpp:(.text+0xde): multiple definition of `Dxf::Plugin::qt_metacall(QMetaObject::Call, int, void**)'; CMakeFiles/fldxf.dir/dxf_plugin.cpp.o:dxf_plugin.cpp:(.text+0x251c): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_plugin.cpp.o: in function `qt_plugin_query_metadata':
moc_dxf_plugin.cpp:(.text+0x116): multiple definition of `qt_plugin_query_metadata'; CMakeFiles/fldxf.dir/dxf_plugin.cpp.o:dxf_plugin.cpp:(.text+0x2554): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_plugin.cpp.o: in function `qt_plugin_instance':
moc_dxf_plugin.cpp:(.text+0x127): multiple definition of `qt_plugin_instance'; CMakeFiles/fldxf.dir/dxf_plugin.cpp.o:dxf_plugin.cpp:(.text+0x2565): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_sourcedialog.cpp.o: in function `Dxf::SourceDialog::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)':
moc_dxf_sourcedialog.cpp:(.text+0x0): multiple definition of `Dxf::SourceDialog::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)'; CMakeFiles/fldxf.dir/dxf_sourcedialog.cpp.o:dxf_sourcedialog.cpp:(.text+0x113e): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_sourcedialog.cpp.o:(.data.rel.ro+0x0): multiple definition of `Dxf::SourceDialog::staticMetaObject'; CMakeFiles/fldxf.dir/dxf_sourcedialog.cpp.o:(.data.rel.ro+0x0): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_sourcedialog.cpp.o: in function `Dxf::SourceDialog::metaObject() const':
moc_dxf_sourcedialog.cpp:(.text+0x1a): multiple definition of `Dxf::SourceDialog::metaObject() const'; CMakeFiles/fldxf.dir/dxf_sourcedialog.cpp.o:dxf_sourcedialog.cpp:(.text+0x1158): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_sourcedialog.cpp.o: in function `Dxf::SourceDialog::qt_metacast(char const*)':
moc_dxf_sourcedialog.cpp:(.text+0x66): multiple definition of `Dxf::SourceDialog::qt_metacast(char const*)'; CMakeFiles/fldxf.dir/dxf_sourcedialog.cpp.o:dxf_sourcedialog.cpp:(.text+0x11a4): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_sourcedialog.cpp.o: in function `Dxf::SourceDialog::qt_metacall(QMetaObject::Call, int, void**)':
moc_dxf_sourcedialog.cpp:(.text+0xbe): multiple definition of `Dxf::SourceDialog::qt_metacall(QMetaObject::Call, int, void**)'; CMakeFiles/fldxf.dir/dxf_sourcedialog.cpp.o:dxf_sourcedialog.cpp:(.text+0x11fc): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_spline.cpp.o:(.data.rel.local+0x0): multiple definition of `Dxf::Spline::staticMetaObject'; CMakeFiles/fldxf.dir/entities/dxf_spline.cpp.o:(.data.rel.local+0x0): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_text.cpp.o:(.data.rel.local+0x0): multiple definition of `Dxf::Text::staticMetaObject'; CMakeFiles/fldxf.dir/entities/dxf_text.cpp.o:(.data.rel.local+0x0): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_types.cpp.o: in function `Dxf::DxfObj::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)':
moc_dxf_types.cpp:(.text+0x0): multiple definition of `Dxf::DxfObj::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)'; CMakeFiles/fldxf.dir/dxf_types.cpp.o:dxf_types.cpp:(.text+0x0): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_types.cpp.o:(.data.rel.ro+0x0): multiple definition of `Dxf::DxfObj::staticMetaObject'; CMakeFiles/fldxf.dir/dxf_types.cpp.o:(.data.rel.ro+0x0): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_types.cpp.o: in function `Dxf::DxfObj::metaObject() const':
moc_dxf_types.cpp:(.text+0x1a): multiple definition of `Dxf::DxfObj::metaObject() const'; CMakeFiles/fldxf.dir/dxf_types.cpp.o:dxf_types.cpp:(.text+0x1a): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_types.cpp.o: in function `Dxf::DxfObj::qt_metacast(char const*)':
moc_dxf_types.cpp:(.text+0x66): multiple definition of `Dxf::DxfObj::qt_metacast(char const*)'; CMakeFiles/fldxf.dir/dxf_types.cpp.o:dxf_types.cpp:(.text+0x66): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_types.cpp.o: in function `Dxf::DxfObj::qt_metacall(QMetaObject::Call, int, void**)':
moc_dxf_types.cpp:(.text+0xbe): multiple definition of `Dxf::DxfObj::qt_metacall(QMetaObject::Call, int, void**)'; CMakeFiles/fldxf.dir/dxf_types.cpp.o:dxf_types.cpp:(.text+0xbe): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/section/dxf_sectionparser.cpp.o:(.data.rel.ro.local+0x0): multiple definition of `Dxf::SectionParser::staticMetaObject'; CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_sectionparser.cpp.o:(.data.rel.ro.local+0x0): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/tables/dxf_abstracttable.cpp.o:(.data.rel.ro.local+0x0): multiple definition of `Dxf::AbstractTable::staticMetaObject'; CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_abstracttable.cpp.o:(.data.rel.ro.local+0x0): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/tables/dxf_layermodel.cpp.o: in function `Dxf::LayerModel::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)':
dxf_layermodel.cpp:(.text+0x14c4): multiple definition of `Dxf::LayerModel::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)'; CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_layermodel.cpp.o:moc_dxf_layermodel.cpp:(.text+0x0): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/tables/dxf_layermodel.cpp.o:(.data.rel.ro+0x0): multiple definition of `Dxf::LayerModel::staticMetaObject'; CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_layermodel.cpp.o:(.data.rel.ro+0x0): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/tables/dxf_layermodel.cpp.o: in function `Dxf::LayerModel::metaObject() const':
dxf_layermodel.cpp:(.text+0x14de): multiple definition of `Dxf::LayerModel::metaObject() const'; CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_layermodel.cpp.o:moc_dxf_layermodel.cpp:(.text+0x1a): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/tables/dxf_layermodel.cpp.o: in function `Dxf::LayerModel::qt_metacast(char const*)':
dxf_layermodel.cpp:(.text+0x152a): multiple definition of `Dxf::LayerModel::qt_metacast(char const*)'; CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_layermodel.cpp.o:moc_dxf_layermodel.cpp:(.text+0x66): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/tables/dxf_layermodel.cpp.o: in function `Dxf::LayerModel::qt_metacall(QMetaObject::Call, int, void**)':
dxf_layermodel.cpp:(.text+0x1582): multiple definition of `Dxf::LayerModel::qt_metacall(QMetaObject::Call, int, void**)'; CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_layermodel.cpp.o:moc_dxf_layermodel.cpp:(.text+0xbe): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/tables/dxf_layermodel.cpp.o: in function `Dxf::ItemsTypeDelegate::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)':
dxf_layermodel.cpp:(.text+0x15ba): multiple definition of `Dxf::ItemsTypeDelegate::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)'; CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_layermodel.cpp.o:moc_dxf_layermodel.cpp:(.text+0xf6): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/tables/dxf_layermodel.cpp.o:(.data.rel.ro+0x40): multiple definition of `Dxf::ItemsTypeDelegate::staticMetaObject'; CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_layermodel.cpp.o:(.data.rel.ro+0x40): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/tables/dxf_layermodel.cpp.o: in function `Dxf::ItemsTypeDelegate::metaObject() const':
dxf_layermodel.cpp:(.text+0x15d4): multiple definition of `Dxf::ItemsTypeDelegate::metaObject() const'; CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_layermodel.cpp.o:moc_dxf_layermodel.cpp:(.text+0x110): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/tables/dxf_layermodel.cpp.o: in function `Dxf::ItemsTypeDelegate::qt_metacast(char const*)':
dxf_layermodel.cpp:(.text+0x1620): multiple definition of `Dxf::ItemsTypeDelegate::qt_metacast(char const*)'; CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_layermodel.cpp.o:moc_dxf_layermodel.cpp:(.text+0x15c): first defined here
/usr/bin/ld: CMakeFiles/fldxf.dir/tables/dxf_layermodel.cpp.o: in function `Dxf::ItemsTypeDelegate::qt_metacall(QMetaObject::Call, int, void**)':
dxf_layermodel.cpp:(.text+0x1678): multiple definition of `Dxf::ItemsTypeDelegate::qt_metacall(QMetaObject::Call, int, void**)'; CMakeFiles/fldxf.dir/fldxf_autogen/include/moc_dxf_layermodel.cpp.o:moc_dxf_layermodel.cpp:(.text+0x1b4): first defined here
collect2: error: ld returned 1 exit status

Подскажите как собрать из мастера?

ronindev commented 2 months ago

Попытки сборки оставили много мусора в директориях не под версионным контролем. Удалил всё, перекачал и сборка прошла