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.23.8: --disable-debug breaks build #97

Closed
Polynomial-C opened this issue Aug 18, 2017 · 1 comment
Closed

0.23.8: --disable-debug breaks build #97

Polynomial-C opened this issue Aug 18, 2017 · 1 comment

Comments

@Polynomial-C
Copy link

Commit efe6dc5 broke --disable-debug build:

libtool: link: x86_64-pc-linux-gnu-gcc -march=native -mtune=native -O2 -pipe -Wa
ll -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wnested-exte
rns -Wpointer-arith -Wdeclaration-after-statement -Wformat=2 -Winit-self -Waggre
gate-return -Wno-missing-format-attribute -fno-strict-aliasing -fno-common -Wmis
sing-include-dirs -Wundef -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common -Wl,--a
s-needed -o p11-kit/.libs/p11-kit p11-kit/lists.o p11-kit/p11-kit.o  ./.libs/lib
p11-kit.so -L/usr/lib64/../lib64 -lffi ./.libs/libp11-tool.a ./.libs/libp11-comm
on.a -ldl -lpthread
./.libs/libp11-kit.so: undefined reference to `p11_debug'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:2328: p11-kit/p11-kit] Error 1
make[2]: Leaving directory '/var/tmp/portage/app-crypt/p11-kit-0.23.8_pre/work/p
11-kit-0.23.8-abi_x86_64.amd64'
make[1]: *** [Makefile:3894: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-crypt/p11-kit-0.23.8_pre/work/p
11-kit-0.23.8-abi_x86_64.amd64'
make: *** [Makefile:1750: all] Error 2

because the commit removed #define p11_debug(... from common/debug.h file.
Simple fix:

--- p11-kit-0.23.8/common/debug.h
+++ p11-kit-0.23.8/common/debug.h
@@ -144,6 +144,10 @@
 
 #else /* !defined (WITH_DEBUG) */
 
+#undef p11_debug
+#define p11_debug(format, ...) \
+       do {} while (false)
+
 #undef p11_debug_err
 #define p11_debug_err(errnum, format, ...) \
        do {} while (false)
ueno added a commit to ueno/p11-kit that referenced this issue Aug 18, 2017
This was mistakenly removed in commit efe6dc5.
Pointed by Lars Wendler in issue p11-glue#97.
@ueno
Copy link
Member

ueno commented Aug 18, 2017

Good catch, thank you for the report.

ueno added a commit that referenced this issue Aug 18, 2017
This was mistakenly removed in commit efe6dc5.
Pointed by Lars Wendler in issue #97.
@ueno ueno closed this as completed Aug 23, 2017
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

No branches or pull requests

2 participants