Summary: | sys-auth/oath-toolkit-2.6.2 pam_oath.c:346:8: error: variable '_pam_oath_modstruct' has initializer but incomplete type | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alessandro Barbieri <lssndrbarbieri> |
Component: | Current packages | Assignee: | Robin Johnson <robbat2> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ionen, sysadmin |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
oath-toolkit-2.6.2:20210310-161542.log
successful build.log + emerge --info.txt |
Description
Alessandro Barbieri
2021-03-10 17:27:29 UTC
Created attachment 690534 [details]
oath-toolkit-2.6.2:20210310-161542.log
buildlog
Seems to happen when -DPIC isn't set: /* Libtool defines PIC for shared objects */ #ifndef PIC #define PAM_STATIC #endif [...] #ifdef PAM_STATIC struct pam_module _pam_oath_modstruct = { (In reply to Alessandro Barbieri from comment #0) > doesn't build with either slibtoo, libtool, bash, dash, lld, bfd, > gnubinutils and llvmbinutils However I can't seem to reproduce, I tried libtool/rlibtool/clang/lld/bfd and all seems fine, e.g. one of my pam_oath line is: rlibtool: compile: x86_64-pc-linux-gnu-clang -DHAVE_CONFIG_H -I. -I./../liboath -march=native -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -c pam_oath.c -DPIC -fPIC -o .libs/pam_oath.o While yours lacks -DPIC: slibtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I./../liboath -Os -pipe -march=native -Os -pipe -march=native -Wimplicit-function-declaration -Wno-error=implicit-function-declaration -c pam_oath.c -o pam_oath.o Didn't look further. If I were to guess it may be something bashrc-mv is doing (I don't use it). You are comparing two different lines: I have -DPIC while building .libs/pam_oath.o (like yours) and it lacks the following line libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I./../liboath -Os -pipe -march=native -Os -pipe -march=native -Wimplicit-function-declaration -Wno-error=implicit-function-declaration -c pam_oath.c -fPIC -DPIC -o.libs/pam_oath.o libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I./../liboath -Os -pipe -march=native -Os -pipe -march=native -Wimplicit-function-declaration -Wno-error=implicit-function-declaration -c pam_oath.c -o pam_oath.o >/dev/null 2>&1 Created attachment 690615 [details]
successful build.log + emerge --info.txt
And that's interesting because I don't have a line with '-o pam_oath.o' without .libs. Looks like it's compiling the same .c twice for you, and the second time there's no -DPIC causing the error.
Attaching my own log to compare.
Had another quick look at this given other bugs indicate you use MAKE='make LIBTOOL=libtool' even for GNU libtool. fails: MAKE='make LIBTOOL=libtool' fails: MAKE='make LIBTOOL=slibtool' fails: MAKEFLAGS='LIBTOOL=libtool/slibtool' works: MAKEFLAGS='LIBTOOL=rlibtool' works: setting nothing The last two is what I typically use to test slibtool + normal libtool. So, seems rlibtool works over slibtool, and GNU libtool only fails if LIBTOOL is set. I've tried again with libtool but it's using slibtool instead ... The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93b66e313c8f85be009ac2c6ee3a70938ee49058 commit 93b66e313c8f85be009ac2c6ee3a70938ee49058 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-03-05 12:35:32 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-03-05 12:37:22 +0000 sys-auth/oath-toolkit: add 2.6.7 Bug: https://bugs.gentoo.org/719314 Closes: https://bugs.gentoo.org/683864 Closes: https://bugs.gentoo.org/719310 Closes: https://bugs.gentoo.org/775278 Closes: https://bugs.gentoo.org/827887 Closes: https://bugs.gentoo.org/837791 Closes: https://bugs.gentoo.org/898740 Signed-off-by: Sam James <sam@gentoo.org> sys-auth/oath-toolkit/Manifest | 1 + .../oath-toolkit-2.6.7-new-xmlsec-tests.patch | 74 ++++++++++++++++++++++ sys-auth/oath-toolkit/oath-toolkit-2.6.7.ebuild | 74 ++++++++++++++++++++++ 3 files changed, 149 insertions(+) |