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

Build fails with LLVM/clang #446

Open
qumaciel opened this issue Sep 25, 2021 · 2 comments
Open

Build fails with LLVM/clang #446

qumaciel opened this issue Sep 25, 2021 · 2 comments
Labels

Comments

@qumaciel
Copy link

qumaciel commented Sep 25, 2021

Hi, I'm trying to build lxqt from souce (following this instructions) using LLVM/clang.

I've managed to build everything except from qtermwidget.

I have a Arch-based distro and I'm parting from the PKGBUILD from
qtermwidget-git AUR
pointing CC/CXX to clang.

Current Behavior

Here is the output I get when trying to build with clang

$ makepkg -csi
==> Making package: qtermwidget-git 0.17.0.23.g68a019e-1 (sáb 25 set 2021 10:50:06)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating qtermwidget git repo...
Fetching origin
==> Validating source files with sha256sums...
    qtermwidget ... Skipped
==> Extracting sources...
  -> Creating working copy of qtermwidget git repo...
Cloning into 'qtermwidget'...
done.
==> Starting pkgver()...
==> Starting build()...
-- The C compiler identification is Clang 12.0.1
-- The CXX compiler identification is Clang 12.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang - 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: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Keyboard layouts will be installed in: /usr/share/qtermwidget5/kb-layouts
-- Color schemes will be installed in: /usr/share/qtermwidget5/color-schemes
-- Translations will be installed in: /usr/share/qtermwidget5/translations
-- Looking for updwtmpx
-- Looking for updwtmpx - found
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Found PythonInterp: /usr/bin/python (found version "3.9.7") 
-- Found PythonLibs: /usr/lib/libpython3.9.so (found version "3.9.7") 
-- Python system site-packages directory: /usr/lib/python3.9/site-packages
-- Found PythonLibrary: /usr/lib/libpython3.9.so  
-- Found SIP version: 4.19.25
-- Found PyQt5 version: 5.15.4
-- Configuring done
-- Generating done
-- Build files have been written to: lxqt/08-qtermwidget-git/src/build
[  1%] Generating ui_SearchBar.h
[  2%] Generating lib/moc_Emulation.cpp
[  3%] Generating lib/moc_Filter.cpp
[  4%] Generating lib/moc_HistorySearch.cpp
[  5%] Generating lib/moc_Pty.cpp
[  6%] Generating lib/moc_ScreenWindow.cpp
[  7%] Generating lib/moc_SearchBar.cpp
[  8%] Generating lib/moc_Session.cpp
[  9%] Generating lib/moc_TerminalDisplay.cpp
[ 10%] Generating lib/moc_Vt102Emulation.cpp
[ 11%] Generating lib/moc_kprocess.cpp
[ 13%] Generating lib/moc_kptydevice.cpp
[ 14%] Generating lib/moc_kptyprocess.cpp
[ 15%] Generating lib/moc_qtermwidget.cpp
[ 16%] Generating qtermwidget_arn.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_arn.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 28 untranslated source text(s)
[ 17%] Generating qtermwidget_ast.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_ast.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 28 untranslated source text(s)
[ 18%] Generating qtermwidget_bg.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_bg.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 19%] Generating qtermwidget_ca.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_ca.qm'...
    Generated 21 translation(s) (21 finished and 0 unfinished)
    Ignored 7 untranslated source text(s)
[ 20%] Generating qtermwidget_cs.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_cs.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 21%] Generating qtermwidget_cy.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_cy.qm'...
    Generated 21 translation(s) (21 finished and 0 unfinished)
    Ignored 7 untranslated source text(s)
[ 22%] Generating qtermwidget_da.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_da.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 23%] Generating qtermwidget_de.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_de.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 25%] Generating qtermwidget_el.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_el.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 26%] Generating qtermwidget_es.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_es.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 27%] Generating qtermwidget_et.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_et.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 28%] Generating qtermwidget_fr.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_fr.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 29%] Generating qtermwidget_gl.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_gl.qm'...
    Generated 21 translation(s) (21 finished and 0 unfinished)
    Ignored 7 untranslated source text(s)
[ 30%] Generating qtermwidget_he.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_he.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 31%] Generating qtermwidget_hr.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_hr.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 32%] Generating qtermwidget_hu.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_hu.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 33%] Generating qtermwidget_it.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_it.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 34%] Generating qtermwidget_ja.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_ja.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 35%] Generating qtermwidget_lt.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_lt.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 36%] Generating qtermwidget_nb_NO.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_nb_NO.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 38%] Generating qtermwidget_nl.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_nl.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 39%] Generating qtermwidget_pl.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_pl.qm'...
    Generated 21 translation(s) (21 finished and 0 unfinished)
    Ignored 7 untranslated source text(s)
[ 40%] Generating qtermwidget_pt.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_pt.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 41%] Generating qtermwidget_pt_BR.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_pt_BR.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 42%] Generating qtermwidget_ru.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_ru.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 43%] Generating qtermwidget_si.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_si.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 28 untranslated source text(s)
[ 44%] Generating qtermwidget_sk.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_sk.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 45%] Generating qtermwidget_tr.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_tr.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 46%] Generating qtermwidget_uk.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_uk.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 47%] Generating qtermwidget_zh_CN.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_zh_CN.qm'...
    Generated 28 translation(s) (28 finished and 0 unfinished)
[ 48%] Generating qtermwidget_zh_TW.qm
Updating 'lxqt/08-qtermwidget-git/src/build/qtermwidget_zh_TW.qm'...
    Generated 21 translation(s) (21 finished and 0 unfinished)
    Ignored 7 untranslated source text(s)
[ 50%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/BlockArray.cpp.o
[ 51%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/ColorScheme.cpp.o
[ 52%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/Emulation.cpp.o
[ 53%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/Filter.cpp.o
[ 54%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/History.cpp.o
[ 55%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/HistorySearch.cpp.o
[ 56%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/KeyboardTranslator.cpp.o
[ 57%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/konsole_wcwidth.cpp.o
[ 58%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/kprocess.cpp.o
[ 59%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/kpty.cpp.o
[ 60%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/kptydevice.cpp.o
[ 61%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/kptyprocess.cpp.o
[ 63%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/Pty.cpp.o
[ 64%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/qtermwidget.cpp.o
[ 65%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/Screen.cpp.o
[ 66%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/ScreenWindow.cpp.o
[ 67%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/SearchBar.cpp.o
[ 68%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/Session.cpp.o
[ 69%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/ShellCommand.cpp.o
[ 70%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/TerminalCharacterDecoder.cpp.o
[ 71%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/TerminalDisplay.cpp.o
[ 72%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/tools.cpp.o
[ 73%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/Vt102Emulation.cpp.o
[ 75%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_Emulation.cpp.o
[ 76%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_Filter.cpp.o
[ 77%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_HistorySearch.cpp.o
[ 78%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_kprocess.cpp.o
[ 79%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_kptydevice.cpp.o
[ 80%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_kptyprocess.cpp.o
[ 81%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_Pty.cpp.o
[ 82%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_qtermwidget.cpp.o
[ 83%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_ScreenWindow.cpp.o
[ 84%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_SearchBar.cpp.o
[ 85%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_Session.cpp.o
[ 86%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_TerminalDisplay.cpp.o
[ 88%] Building CXX object CMakeFiles/qtermwidget5.dir/lib/moc_Vt102Emulation.cpp.o
[ 89%] Linking CXX shared library libqtermwidget5.so
[ 89%] Built target qtermwidget5
Byte-compiling lxqt/08-qtermwidget-git/src/build/pyqt//__init__.py to lxqt/08-qtermwidget-git/src/build/pyqt//__pycache__/__init__.cpython-39.pyc
[ 89%] Built target __home_maciel_Downloads_Software_lxqt_08-qtermwidget-git_src_build_pyqt____pycache_____init__.cpython-39.pyc
[ 90%] Generating sip/sipQTermWidgetpart0.cpp, sip/sipQTermWidgetpart1.cpp, sip/sipQTermWidgetpart2.cpp, sip/sipQTermWidgetpart3.cpp, sip/sipQTermWidgetpart4.cpp, sip/sipQTermWidgetpart5.cpp, sip/sipQTermWidgetpart6.cpp, sip/sipQTermWidgetpart7.cpp                                                                                                             

[ 91%] Building CXX object pyqt/CMakeFiles/python_module_QTermWidget.dir/sip/sipQTermWidgetpart0.cpp.o
In file included from lxqt/08-qtermwidget-git/src/qtermwidget/pyqt/sip/qtermwidget.sip:14:
In file included from lxqt/08-qtermwidget-git/src/qtermwidget/pyqt/../lib/qtermwidget.h:26:
lxqt/08-qtermwidget-git/src/qtermwidget/lib/Filter.h:296:7: error: visibility does not match previous declaration
class QTERMWIDGET_NO_EXPORT FilterObject : public QObject
      ^
lxqt/08-qtermwidget-git/src/build/lib/qtermwidget_export.h:20:50: note: expanded from macro 'QTERMWIDGET_NO_EXPORT'
#    define QTERMWIDGET_NO_EXPORT __attribute__((visibility("hidden")))
                                                 ^
lxqt/08-qtermwidget-git/src/qtermwidget/pyqt/sip/qtermwidget.sip:4:13: note: previous attribute is here
#pragma GCC visibility push(default)
            ^
1 error generated.                                                                                                     
make[2]: *** [pyqt/CMakeFiles/python_module_QTermWidget.dir/build.make:104: pyqt/CMakeFiles/python_module_QTermWidget.dir/sip/sipQTermWidgetpart0.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:181: pyqt/CMakeFiles/python_module_QTermWidget.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...


Possible Solution

I've tried to add "-fvisibility=hidden" to the flags, but no luck there

Steps to Reproduce (for bugs)
  1. Usual AUR build pointing CC/CXX to clang
Context

No big deal here, I'm just trying to build everything with clang.

System Information
  • Distribution & Version: Garuda
  • Kernel: 5.14.7-zen1-1-zen
  • Qt Version: 5.15
  • lxqt-build-tools Version: git
  • Package version: git
@iamthesenate1
Copy link

iamthesenate1 commented Sep 25, 2021

I can confirm this issue. I believe this is the commit that is causing the issue, specifically this part:

%ModuleHeaderCode
#pragma GCC visibility push(default)
%End

For a better explanation you can read this bug report.

Edit: While doing more research on this matter I'm starting to believe that this might be a clang bug after all....

@yan12125
Copy link
Member

Oops, I created a fix some time ago and forgot about it 06cdf87

this might be a clang bug after all....

Maybe. The good news is there is a simple fix.

@yan12125 yan12125 added the bug label Sep 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants