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

thirdparty/ykcore: link against libpthread #7807

Merged
merged 1 commit into from
Apr 15, 2022

Conversation

Piraty
Copy link
Contributor

@Piraty Piraty commented Apr 6, 2022

keepassxc failed to link ykcore library due to missing -pthread flag.

Build Log

<...>
[382/549] Linking CXX executable src/keepassxc
FAILED: src/keepassxc 
: && /usr/lib/ccache/bin/g++ -DNDEBUG -fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -Og -ggdb3    -fdebug-prefix-map=/builddir/keepassxc-2.7.1=. -fno-common -Wall -Wextra -Wundef -Wpointer-arith -Wno-long-long -Wformat=2 -Wmissing-format-attribute -fvisibility=hidden -fvisibility-inlines-hidden -fstack-protector-strong -Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual -Werror=format-security -Wcast-align -fsized-deallocation -Wno-deprecated-declarations -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -Wl,--no-add-needed -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro,-z,now -pie   -Wl,--export-dynamic -rdynamic  -fPIE -pie src/CMakeFiles/keepassxc.dir/keepassxc_autogen/mocs_compilation.cpp.o src/CMakeFiles/keepassxc.dir/main.cpp.o -o src/keepassxc  src/libkeepassx_core.a  src/libautotype.a  src/browser/libkeepassxcbrowser.a  src/qrcode/libqrcode.a  /usr/lib/libQt5Svg.so.5.15.2  /usr/lib/libqrencode.so  src/fdosecrets/libfdosecrets.a  /usr/lib/libQt5Concurrent.so.5.15.2  /usr/lib64/libpcsclite.so  src/libzxcvbn.a  /usr/lib/libargon2.so  src/thirdparty/ykcore/libykcore.a  /usr/lib/libusb-1.0.so  src/sshagent/libsshagent.a  /usr/lib/libQt5Network.so.5.15.2  src/keeshare/libkeeshare.a  /usr/lib/libQt5Widgets.so.5.15.2  /usr/lib/libbotan-2.so  /usr/lib/libz.so  /usr/lib/libminizip.so  /usr/lib/libQt5DBus.so.5.15.2  /usr/lib/libQt5X11Extras.so.5.15.2  /usr/lib/libQt5Gui.so.5.15.2  /usr/lib/libQt5Core.so.5.15.2  -lX11 && :
/usr/bin/ld: src/thirdparty/ykcore/libykcore.a(ykcore.c.o): undefined reference to symbol 'pthread_setspecific@@GLIBC_2.2.5'
/usr/bin/ld: /lib64/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
<...>

Testing strategy

Build for Void Linux

# consult https://github.com/void-linux/void-packages/tree/da6b404aa293c3df6de54a2c8827e010dab54f42#foreign 
git clone https://github.com/void-linux/void-packages/ && cd void-packages
# modify `srcpkgs/keepassxc/template` to build keepassxc-2.7.1
./xbps-src pkg keepassxc 

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

@Piraty Piraty force-pushed the develop-fix-ykcore-pthread branch from 83bc756 to c87a7f2 Compare April 6, 2022 15:04
@codecov-commenter
Copy link

codecov-commenter commented Apr 6, 2022

Codecov Report

Merging #7807 (6abc55c) into develop (692c95b) will decrease coverage by 0.03%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #7807      +/-   ##
===========================================
- Coverage    64.31%   64.29%   -0.03%     
===========================================
  Files          339      339              
  Lines        43430    43430              
===========================================
- Hits         27932    27919      -13     
- Misses       15498    15511      +13     
Impacted Files Coverage Δ
...rc/fdosecrets/widgets/SettingsWidgetFdoSecrets.cpp 56.06% <0.00%> (-3.03%) ⬇️
src/fdosecrets/dbus/DBusMgr.cpp 52.20% <0.00%> (-1.47%) ⬇️
src/core/Entry.cpp 82.65% <0.00%> (-0.20%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 692c95b...6abc55c. Read the comment docs.

src/thirdparty/ykcore/CMakeLists.txt Outdated Show resolved Hide resolved
@Piraty Piraty force-pushed the develop-fix-ykcore-pthread branch 2 times, most recently from 9011b83 to fdb66bf Compare April 12, 2022 22:46
@phoerious
Copy link
Member

Could you rebase your branch to the latest develop HEAD, please?

it was missing the -pthread flag

```
[382/549] Linking CXX executable src/keepassxc
FAILED: src/keepassxc
: && /usr/lib/ccache/bin/g++ -DNDEBUG -fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -Og -ggdb3    -fdebug-prefix-map=/builddir/keepassxc-2.7.1=. -fno-common -Wall -Wextra -Wundef -Wpointer-arith -Wno-long-long -Wformat=2 -Wmissing-format-attribute -fvisibility=hidden -fvisibility-inlines-hidden -fstack-protector-strong -Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual -Werror=format-security -Wcast-align -fsized-deallocation -Wno-deprecated-declarations -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -Wl,--no-add-needed -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro,-z,now -pie   -Wl,--export-dynamic -rdynamic  -fPIE -pie src/CMakeFiles/keepassxc.dir/keepassxc_autogen/mocs_compilation.cpp.o src/CMakeFiles/keepassxc.dir/main.cpp.o -o src/keepassxc  src/libkeepassx_core.a  src/libautotype.a  src/browser/libkeepassxcbrowser.a  src/qrcode/libqrcode.a  /usr/lib/libQt5Svg.so.5.15.2  /usr/lib/libqrencode.so  src/fdosecrets/libfdosecrets.a  /usr/lib/libQt5Concurrent.so.5.15.2  /usr/lib64/libpcsclite.so  src/libzxcvbn.a  /usr/lib/libargon2.so  src/thirdparty/ykcore/libykcore.a  /usr/lib/libusb-1.0.so  src/sshagent/libsshagent.a  /usr/lib/libQt5Network.so.5.15.2  src/keeshare/libkeeshare.a  /usr/lib/libQt5Widgets.so.5.15.2  /usr/lib/libbotan-2.so  /usr/lib/libz.so  /usr/lib/libminizip.so  /usr/lib/libQt5DBus.so.5.15.2  /usr/lib/libQt5X11Extras.so.5.15.2  /usr/lib/libQt5Gui.so.5.15.2  /usr/lib/libQt5Core.so.5.15.2  -lX11 && :
/usr/bin/ld: src/thirdparty/ykcore/libykcore.a(ykcore.c.o): undefined reference to symbol 'pthread_setspecific@@GLIBC_2.2.5'
/usr/bin/ld: /lib64/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
```
@Piraty Piraty force-pushed the develop-fix-ykcore-pthread branch from fdb66bf to 6abc55c Compare April 13, 2022 08:01
@Piraty
Copy link
Contributor Author

Piraty commented Apr 13, 2022

rebased

@phoerious phoerious added this to the v2.7.2 milestone Apr 15, 2022
@phoerious phoerious merged commit 7edecee into keepassxreboot:develop Apr 15, 2022
@phoerious phoerious added the pr: backport pending Pull request yet to be backported to a previous release label Apr 15, 2022
droidmonkey pushed a commit that referenced this pull request Jun 27, 2022
@droidmonkey droidmonkey added pr: backported Pull request backported to previous release and removed pr: backport pending Pull request yet to be backported to a previous release labels Jun 27, 2022
t-h-e pushed a commit to t-h-e/keepassxc that referenced this pull request Sep 8, 2022
droidmonkey pushed a commit that referenced this pull request Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system pr: backported Pull request backported to previous release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants