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

[0.7.8] ./.libs/libusbguard.so: error: undefined reference to 'pthread_cond_clockwait' #432

Closed
hartwork opened this issue Nov 24, 2020 · 2 comments · Fixed by #445
Closed

Comments

@hartwork
Copy link
Contributor

Hi!

I am aware that USBguard does not use pthread_cond_clockwait directly, yet thee is a downstream bug report with a link error like this:

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/usbguard-0.7.8 --htmldir=/usr/share/doc/usbguard-0.7.8/html --with-sysroot=/ --libdir=/usr/lib64 --with-dbus --without-ldap --with-polkit --disable-static --enable-systemd
[..]
      libqb: system-wide; -pthread -lqb
     crypto: system-wide;  -lsodium
   libaudit: system-wide; -laudit
    libldap: None; building without LDAP support
 libseccomp: system-wide; -lseccomp
  libcap-ng: system-wide; -lcap-ng
   protobuf: system-wide; -pthread -lprotobuf
      Catch: system-wide; -I/usr/include/catch 
      PEGTL: system-wide;  ; version <= 2.6.0: 
      GDBus: system-wide; -pthread -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/lib64/libffi/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -ldbus-1 -lgio-2.0 -lgobject-2.0 -lglib-2.0
   umockdev: system-wide; -lumockdev -lgobject-2.0 -lglib-2.0
[..]
libtool: link: x86_64-pc-linux-gnu-g++ -std=c++11 -pipe -O2 -march=znver1 -fvisibility=hidden -pedantic -Wno-unknown-pragmas -Wall -Wextra -Wformat=2 -Wredundant-decls -Wcast-align -Wmissing-declarations -Wmissing-include-dirs -Wmissing-format-attribute -Wswitch-enum -Wswitch-default -Winvalid-pch -Wformat-nonliteral -Wno-deprecated-register -Wno-missing-field-initializers -Wno-implicit-fallthrough -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -o .libs/usbguard-rule-parser src/CLI/usbguard_rule_parser-usbguard-rule-parser.o  ./.libs/libusbguard.so -lqb -lprotobuf -lsodium -lumockdev -lgobject-2.0 -lglib-2.0
./.libs/libusbguard.so: error: undefined reference to 'pthread_cond_clockwait'
./.libs/libusbguard.so: error: undefined reference to 'pthread_create'
[..]

I have not been able to reproduce it yet. This is with GCC 10.2.0 but probably not specific to that version.
Any ideas how to best proceed?

devurandom added a commit to devurandom/usbguard that referenced this issue Jan 16, 2021
`CFLAGS` is needed in addition to `LIBS`, because on some systems it
contains `-pthread` and `LIBS` is empty.

Closes: USBGuard#432
@devurandom
Copy link
Contributor

#445 should fix this. Can you please try, @hartwork?

@hartwork
Copy link
Contributor Author

@devurandom hi! I could not reproduce the initial report on my own system locally so my feedback on the proposed fixed version is of limited value: If it links fine, there is no new information. Does that make sense? Any ideas how to enable me to help for real?

radosroka pushed a commit that referenced this issue Jan 18, 2021
`CFLAGS` is needed in addition to `LIBS`, because on some systems it
contains `-pthread` and `LIBS` is empty.

Closes: #432
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.

2 participants